You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my case, I create loggers for each module on init. Then as soon as remote logging endpoint auth is available I apply remote plugin. But the logs from loggers created before that moment are not being sent:
log.enableAll();
const loggerTwo = log.getLogger('module-two');
// ...
// auth is available, applying remote plugin:
remote.apply(log, options);
log.debug('this message will be sent to remote`);
loggerTwo.debug('this message will NOT be sent to remote`);
And there is no way to apply remote plugin to module-two logger separately:
remote.apply(log.getLogger('module-two'), options); // will fail
Since .apply() is expecting root logger and will throw: Argument is not a root loglevel object error.
Any help is appreciated!
The text was updated successfully, but these errors were encountered:
sergeyphi
changed the title
Plugin is not applied to not-root loggers
Logs from not-root loggers created before applying plugin are not being sent
Jan 30, 2023
In my case, I create loggers for each module on init. Then as soon as remote logging endpoint auth is available I apply
remote
plugin. But the logs from loggers created before that moment are not being sent:And there is no way to apply
remote
plugin tomodule-two
logger separately:Since
.apply()
is expecting root logger and will throw:Argument is not a root loglevel object
error.Any help is appreciated!
The text was updated successfully, but these errors were encountered: