Skip to content

Having multiple loggers as default_logger? #2444

Answered by gabime
bheemann asked this question in Q&A
Discussion options

You must be logged in to vote

A possible solution is to have a custom sink that forwards the logs to 2 async loggers, each with its own dedicated thread pool (async tcp+async file/stdout).

So the final setup would be 3 loggers:

  • Default logger with custom sink (sync logger, no need for async here).
  • Couple of async loggers

The downside is some performance hit since the data needs to be duplicated to 2 queues.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@bheemann
Comment options

Answer selected by bheemann
Comment options

You must be logged in to vote
1 reply
@tt4g
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants