add central logger #25

Open
opened 2025-09-05 17:00:06 +02:00 by thetxt · 2 comments
Owner

implement a central logger that can be used to log events, distinguishing between different levels of severity and modules.
Add config for which levels/modules should be written to a log file, send to stdout/stderr and send ingame to operators

implement a central logger that can be used to log events, distinguishing between different levels of severity and modules. Add config for which levels/modules should be written to a log file, send to stdout/stderr and send ingame to operators
Contributor

Do you think it should be implemented with separate functions like log() warn() and error() for each log level or as an argument like log(2) for a log level of 2. In addition, where would be an appropriate place to implement it, in the lib or server?

Do you think it should be implemented with separate functions like log() warn() and error() for each log level or as an argument like log(2) for a log level of 2. In addition, where would be an appropriate place to implement it, in the lib or server?
Author
Owner

I haven't thought a lot about it yet, but I think having separate functions should be cleaner. It would probably make more sense in the lib with an instance of it being part of the central Game struct

I haven't thought a lot about it yet, but I think having separate functions should be cleaner. It would probably make more sense in the lib with an instance of it being part of the central Game struct
thetxt added this to the 0.4.0 milestone 2025-10-28 16:33:28 +01:00
Sign in to join this conversation.
No description provided.