flying-squid
flying-squid copied to clipboard
Log more things
For example command used by players aren't logged currently. Those would be useful for debugging. What does the vanilla server log ?
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.
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 alldebug
info, as well as printing a stack trace whenever something is logged. (Useful for debugging.) -
debug
- prints all logs marked asdebug
as well as any higher levels. Preferably in green. -
info
- prints all logs marked asinfo
as well as any higher levels. Preferably in blue. -
warn
- prints all logs marked aswarn
as well as any higher levels. Preferably in yellow. -
error
- prints all logs marked aserror
as well as any higher levels. Preferably in red. -
off
- disables logging.