Closed Zweihorn closed 1 year ago
I think this kind of verbose loading message ought to be something added to core Minetest, e.g. with a --verbose
command line argument.
minetest.log
, not print
. info
log-level stream. set debug_log_level = info
in minetest.conf, or pass the --info
argument to minetest when you launch it. --verbose
already exists as well@fluxionary
From the start my PR was aiming at compatibility with legacy clients and servers. If you scan the MT forum you will become aware that there seem to be quite many MT 0.4 servers around which are actively used by many players.
However, the best solution may be this example of a new piece of improved code, if I understand the MT Lua code correctly.
-- print to log after mod was loaded successfully
local load_message = "[MOD] XXX loaded"
if minetest.log then
minetest.log("info", load_message) -- aims at state of the art MT software
else
print (load_message) -- aims at legacy MT software used in the field
end
Hope this helps. I may provide a new PR in due time.
I am quite aware that devs have the state of the art in their mind. However, as community effort MT projects including this mod should always have the majority of MT players in the field in their mind as long this would be reasonable, I presume.
IMHO it should be worth some consideration and would be quite unfortunate if too much MT server admins would become unhappy or loosing MT players.
My apologies and obviously I made false assumptions.
closed
Add a final print to log at the end of
init.lua
to indicate the mod was loaded successfully. This idea was derived from other mods which are specifically aimed at MT servers.This could be useful not only for player support (e.g. in the MT forum) but would certainly be useful for MT server admins using the CLI and reading their server logs.