sc4mp-server icon indicating copy to clipboard operation
sc4mp-server copied to clipboard

new logging implementation

Open jflann opened this issue 1 year ago • 1 comments

Implements custom logging with the logging library.

Features:

  • log to file and to console
  • colored output for console, plain output for log file
  • configurable msg format and color for each log level
  • a single function call builds the logger for you in the main program

Opening as a draft because of still needing to configure the behavior related to setting log levels and the implementation of a verbose flag. Currently the build_logger() function takes a verbose parameter, which then sets the log level on the logger. It is possible to set the log level on the handler level, specific to log destination (console vs file).

jflann avatar Sep 23 '23 17:09 jflann