emabee / flexi_logger

A flexible logger for rust programs that can write to stderr, stdout, and/or to log files
Apache License 2.0
315 stars 55 forks source link

Support For Multiple Log Files #68

Closed raytiley closed 4 years ago

raytiley commented 4 years ago

Does FlexiLogger support multiple log files? Not sure if I see a clear way todo it from the examples.

The use case is I have an application that hosts a basic web api and services out a few assets using actix-web. The application also does a lot of background processing.

I want the web request logs to go into their own file vs the application logs. However everything is hosted in one process.

Thanks!

emabee commented 4 years ago

Hi Ray, yes, that should be doable. Did you try out what is described in the module writer? At first glance I think that registering and using different writers for the applications should match your ask.

raytiley commented 4 years ago

Thanks. That works great!