Closed attilastrba closed 4 years ago
Each logger does not need it's own appender. You can add the appender to the root logger, and then all log messages will be appended to that location.
Logging::Logger.root.add_appenders(Logging.appenders.file("global.log"))
logger = Logging::Logger["test"]
logger.info("this message will show up in the 'global.log'")
You can always access the same appender by name
Logging.appenders["global.log"]
That ☝️will return the same file appender.
Apologies for the long delay.
Hi, If I try to add the file appender with the same layout and same file name it get's duplicated: So i have to look up the appender by the logfile name before and remove it:
Is this a bug or am I missing something?