Logging Standards
The LogManager class initialises all of Deserted Chateau's frontend loggers. To use them, you must use the syntax shown below. The color() calls can be omitted when debugging something, but should be added later so that the logs remain consistent and easy to read.
See the LogManager class for a list of available logging objects.
The additional "color" method calls are used instead of wrapping log messages in a function to do that automatically, which would clobber the stack trace.
/*
* The color() functions work as follows:
* - color(): prints DEBUG in its corresponding color
* - colorI(): the same, but for INFO
* - colorW(): the same, but for WARN
* - colorE(): the same, but for ERROR
*
* This system is used to avoid wrapping log statements in another function,
* which would screw up the console stacktrace.
*/
// Normal logging statement
dcLogger.debug(color() + "Your mother was a hamster");
// Logging an object without a string
dcLogger.debug(color(), data);
// Logging a non-debug message: use a different Color function
dcLogger.error(colorE() + "Execute order 66");
// Logging a gallery-specific message
dcGalleryLogger.debug(color() + "General Kenobiiiii");