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

Logging #33

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Logging #33

wants to merge 6 commits into from

Conversation

wgledbetter
Copy link
Contributor

@wgledbetter wgledbetter commented May 29, 2023

Swapped all PSIOPT printing to spdlog. Output is now duplicated to terminal and log file. Current implementation has file level set to trace, and console level tied to the old PSIOPT::PrintLevel.

I don't love the filename uniqueness code, but I think we have to do something like that for when there are multiple PSIOPT instances, like in Jet.

Probably closes #25

@jbpezent
Copy link
Contributor

I'm having some issues building it on Windows, but I'll get that part figured out. In the meantime, from glancing at the code it looks like printlevel and log level are coupled together, so by default we would be dumping a bunch of uniquely named textfiles into the users directory everytime the console comes up. Instead, I think we should have it be toggleable and be off by default.

@wgledbetter
Copy link
Contributor Author

The unique files are for multiple PSIOPT instances and aren't directly related to the level. I wanted to avoid the case where multiple instances are all simultaneously dumping to the same file, which would make it basically unreadable. I do agree there should be a toggle though.

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

Successfully merging this pull request may close these issues.

File Based Logging
2 participants