0

I need to log events from some modules to separate log files while keep logging all other events to the default location. In Python, I would configure separate loggers with propagate=False and let root logger to handle everything else that is not being logged to one of these loggers.

I can do it by configuring a separate layer per target, and "everything else" layer needs to filter out all events already handled by one of the dedicated layers. Having logic like if metadata.target() != target_1 && metadata.target() != target_2 ... in the filter does not feel right.

Is there a better way to achieve this with tracing crate?

0 Answers0