Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Appender per #1425

Open
thernstig opened this issue Apr 22, 2024 · 0 comments
Open

Feature: Appender per #1425

thernstig opened this issue Apr 22, 2024 · 0 comments

Comments

@thernstig
Copy link

thernstig commented Apr 22, 2024

https://log4js-node.github.io/log4js-node/categories.html clearly describes:

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant