mt-mods / technic

Technic mod for Minetest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Should the server log be spammed with warnings every second?

MCLV-pandorabox opened this issue · comments

commented

get_RE_charge
and set_RE_charge
issue warning to the server log(like a lot)
but contain no real information to resolve the issue (location)
and will happen every time a player puts something that doesn't belong in the charge or discharge port.

Should the warning even be issued?
In it's current form it is quite pointless (unless your point is to produce large server logs)
On a server with lots of new users,putting all kinds of stuff in the charge/discharge ports of battery boxes, who might never return this could get out of hand quickly.
Even if a moderator would be willing to hunt down the object that can't be charged/discharged, he can't easily find it.

Easy fix would be to just remove the warning.

Kind regards,
Keep up the amazing work,
MCLV

Log output in question:

2023-02-25 20:47:10: WARNING[Server]: technic.get_RE_charge item not registered as power tool: 
2023-02-25 20:47:10: WARNING[Server]: technic.get_RE_charge item not registered as power tool: 
2023-02-25 20:47:10: WARNING[Server]: technic.get_RE_charge item not registered as power tool: 
2023-02-25 20:47:10: WARNING[Server]: technic.get_RE_charge item not registered as power tool: 

Code locations:

minetest.log("error", "technic.set_RE_charge item not registered as power tool: "..stack:get_name())

and:

minetest.log("warning", "technic.get_RE_charge item not registered as power tool: "..stack:get_name())

IMO: the log statement can be removed