flying-squid icon indicating copy to clipboard operation
flying-squid copied to clipboard

Log more things

Open rom1504 opened this issue 9 years ago • 2 comments

For example command used by players aren't logged currently. Those would be useful for debugging. What does the vanilla server log ?

rom1504 avatar Jan 19 '16 11:01 rom1504

Chat and errors, that's about it. Would be nice to allow other things to log, however.

Perhaps allow a "logging" option for plugins. Then plugins use a built-in this.log that acts like console.log except adds a timestamp and doesn't run if logging is set to false. I imagine chat would be set to true.

demipixel avatar Feb 15 '16 23:02 demipixel

This built in this.log function may also want to have log levels. Then, instead of just having logging as true or false in the config, a log-level could be provided to specify how verbose to be. Here is my proposal:

  • debug-trace - prints all debug info, as well as printing a stack trace whenever something is logged. (Useful for debugging.)
  • debug - prints all logs marked as debug as well as any higher levels. Preferably in green.
  • info - prints all logs marked as info as well as any higher levels. Preferably in blue.
  • warn - prints all logs marked as warn as well as any higher levels. Preferably in yellow.
  • error - prints all logs marked as error as well as any higher levels. Preferably in red.
  • off - disables logging.

bdsomer avatar Jul 21 '18 18:07 bdsomer