fmtlog
fmtlog copied to clipboard
How do I log to multiple files from fmtlog. I want to write different messages to different files.
Currently it's not supported. But you can register log handler callback to handle it yourself.
I believe I will need to do that in background thread. Please share an example for writing in 2 different files .
The registered callback is indeed called in background thread. You can refer to logcb
in https://github.com/MengRao/fmtlog/blob/main/test/log_test.cc, which simply prints the log msg to stdout.
Thanks. I will give this a try. It will be great if we can add this feature.