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

How do I log to multiple files from fmtlog. I want to write different messages to different files. #32

Open
alphanso opened this issue Mar 15, 2022 · 4 comments

Comments

@alphanso
Copy link

No description provided.

@MengRao
Copy link
Owner

MengRao commented Mar 15, 2022

Currently it's not supported. But you can register log handler callback to handle it yourself.

@alphanso
Copy link
Author

I believe I will need to do that in background thread. Please share an example for writing in 2 different files .

@MengRao
Copy link
Owner

MengRao commented Mar 16, 2022

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.

@alphanso
Copy link
Author

Thanks. I will give this a try. It will be great if we can add this feature.

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

2 participants