Support for named loggers
The current implementation only works with one global logger. It could be further improved by managing "named" loggers in addition to the global "default" logger.
- A starting point is available as the global variable
g_log_namedLoggers
and the global procedureNAMED_LOGGER_INIT_CONFIG
. The value of a map can't be simply passed as a reference to a procedure (NAMED_LOGGER_INIT_CONFIG configFile:(fileLocation) loggerName:g_log_namedLoggers["someLoggerName"]
doesn't work) and even storing the value temporarily in a local variable only updates the local variable and not the value in the original map. So some additional procedures are probably necessary to handle updating the values properly. To follow the naming convention here they should start withNAMED_LOGGER_
instead ofLOGGER_
and useloggerName:string
instead of theloggerConfig:reference
parameter. - How to allow setting logging files / log levels for named loggers through the GUI without spamming the user too much? Consider that every module would use its own named logger and that there could be 10 or more modules used in an ADOxx library. Possible solutions are to use
"AdoScript" LISTBOX
, provide an option to filter the LISTBOX with a simple search or regex and the possibility to change the values of all loggers.