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

Add support for basic error logging #5

Merged
merged 9 commits into from
Jan 23, 2024
Merged

Add support for basic error logging #5

merged 9 commits into from
Jan 23, 2024

Conversation

lohedges
Copy link
Contributor

@lohedges lohedges commented Jan 23, 2024

This PR adds support for basic diagnostic logging using loguru. This will make it much easier for users of the sander interface to track down errors, since the current exceptions are cryptically hidden in the orc_job.dat file generated by sander itself. By default, we now send diagnostic logs to sys.stderr. These can, instead, be sent to file by using the --log-file or EMLE_LOG_FILE option. For performance reasons we currently only log errors, but provide support for setting the log level via --log-level or EMLE_LOG_LEVEL, i.e. we can add other messages in future. The existing energy file is now specified using --energy-file or EMLE_ENERGY_FILE. The frequency at which energies are recorded is now controlled via --energy-frequency or EMLE_ENERGY_FREQUENCY. The default is now set to zero, which indicates that energies shouldn't be written, i.e. the user needs to explicitly turn energy logging on.

@lohedges lohedges added the enhancement New feature or request label Jan 23, 2024
@lohedges lohedges merged commit bc96e78 into main Jan 23, 2024
5 checks passed
@lohedges lohedges deleted the feature_logging branch January 23, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant