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

Changing pattern dynamically? #53

Closed
SGarno opened this issue Feb 18, 2015 · 0 comments
Closed

Changing pattern dynamically? #53

SGarno opened this issue Feb 18, 2015 · 0 comments

Comments

@SGarno
Copy link

SGarno commented Feb 18, 2015

I am trying to write a logger that outputs in different formats (JSON, XML, Text, etc). To do so, I need to initially write out a opening tag, then log the entries, then write a closing tag. I attempted to do this by setting the pattern on instantiation and then during destruction, but I seem to be running into issues, and the set_pattern seems to reset the file.

Can the pattern be changed dynamically?

Edit: It was an oops on my side...I accidentally did not initialize the SizeInMB variable and it ended up writing a new log entry for every record.

@SGarno SGarno closed this as completed Feb 18, 2015
bachittle pushed a commit to bachittle/spdlog that referenced this issue Dec 22, 2022
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

1 participant