quill
quill copied to clipboard
ConsoleHandler: fix for out of bounds array access with dynamic log level and coloured console output
When using a dynamic log level, ConsoleHandler::write() needs to get the log level by calling TransitEvent::log_level() instead of directly accessing the log level stored in MacroMetaData.
MacroMetadata::_log_level could be LogLevel::Dynamic, which will result in an out of bounds array access in ConsoleColours::colour_code().
Prior to this change, ConsoleHandler::write() was apparently not using the correct colour value for a dynamic log level (unless by accident).