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
Categories are groups of log events. The category for log events is defined when you get a Logger from log4js (log4js.getLogger('somecategory')). Log events with the same category will go to the same appenders.
I am interested in achieving a higher level of control of where logs end up.
In my case, I want a log to have any random category name, but end up in different log files (different appenders) depending on a logging context such as logger.addContext('type', 'the type'); where each type ends up in different logging files.
But this seems far from how the APIs are structured. Is this a bad idea altogether, or just that log4js is not flexible enough for this?
The text was updated successfully, but these errors were encountered:
https://log4js-node.github.io/log4js-node/categories.html clearly describes:
I am interested in achieving a higher level of control of where logs end up.
In my case, I want a log to have any random category name, but end up in different log files (different appenders) depending on a logging context such as
logger.addContext('type', 'the type');
where each type ends up in different logging files.But this seems far from how the APIs are structured. Is this a bad idea altogether, or just that log4js is not flexible enough for this?
The text was updated successfully, but these errors were encountered: