Log weather changes #897
Labels
No Label
#P1 CRITICAL
#P2: HIGH
#P3: elevated
#P4 priority: medium
#P6: low
#Review
annoying
API
bug
code quality
combat
commands
compatibility
configurability
contribution inside
controls
core feature
creative mode
delayed for engine release
documentation
duplicate
enhancement
environment
feature request
gameplay
graphics
ground content conflict
GUI/HUD
help wanted
incomplete feature
invalid / won't fix
items
looking for contributor
mapgen
meta
mineclone2+
Minecraft >= 1.13
Minecraft >= 1.17
missing feature
mobile
mobs
mod support
model needed
multiplayer
Needs adoption
needs discussion
needs engine change
needs more information
needs research
nodes
non-mob entities
performance
player
possible close
redstone
release notes
schematics
Skyblock
sounds
Testing / Retest
tools
translation
unconfirmed
mcl5
mcla
Media missing
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: VoxeLibre/VoxeLibre#897
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is it possible to log weather changes? They're rare anyway, so it wouldn't hurt to have them. It would improve debugging odd cases, like the one I mentioned in #896.
Examples:
date + time [EVENT] Server: Weather changed from clear to thunder
date + time [EVENT] Server: Weather changed from thunder to snow
date + time [EVENT] Server: Weather changed from snow to clear
date + time [EVENT] Server: Weather changed from clear to rain
date + time [EVENT] Server: Weather changed from rain to clear
I specifically added both states in a single line, because it's a short text anyway, and it saves you time from searching the previous change event.
@kneekoo This is implemented already. Can you please check?
If debug_log_level is set to verbose, you get the messages like that:
[mcl_weather] Weather data saved: state=[STATE] end_time=[END_TIME]
Changing level to action now
That's something else - it saves the state of the weather on server shutdown. What I asked was if it's possible to log the weather changes, for a better context surrounding certain events.
Now thanks to the commit mentioned here I noticed that it's possible to log it from this block (in the mclweather.setrandomweather function implementation):
This would probably work:
If I understand correctly, it saves the whether not only on shutdowns but on any change, that's why I thought it's what you want. Sorry if I'm wrong. Let's check it :)
To manually change the weather via chat, I did this and it works:
I don't know how to specify who changed the weather, but this would be nicer:
Indeed, save_weather() is called in
mcl_weather.change_weather
, so I guess it should log it. It's just that it won't have the before/after format I mentioned.P.S. Finally, the weather changed on its own and the other line of code did its job as expected. Again, my whole point was to log both weather states in a single line.
Okay, made the single lines... quite fun for me:
Why don't you make it say "clear" instead of "none"?
Clear would be fine, really,
feel free to fixreplaced