-
Notifications
You must be signed in to change notification settings - Fork 26
Refresh logging #288
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
Refresh logging #288
Conversation
|
I went through error, warning, and info messages. Made just a few adjustments (mainly errors that should also raise). I also updated the developer guide a little based on this PR. The only point keeping this PR a draft is regarding the log file default. Mainly do we want multiple (individually timestamped) log files, a single log file, or no file as the default of ASPIRE. @janden do you have any preference? Currently the PR has the multiple timestamped setup. Thanks |
|
I would personally prefer to not log to file by default, but this will be very useful for bug reports. Timestamped log files I think are good for that reason too. Would a reasonable compromise be for log files to end up in a subdirectory (like |
|
Sure I'll set that up, thanks. |
8b794a2 to
766df4a
Compare
Closes #212 .
Most of the competing logging implementation was removed in #283 , so this PR isn't too big, nice.
__file__. We may have one specific place it would be reasonable to deviate from that convention that I am aware of (the tutorials), but it is not necessary the way I have implemented logging here (timestamped logfiles).pytest.ini, also fixes the stdout out duplication underpytest -s.fileHandlerwith configurable filename.:presents a problem, replaced with-)levelnameOne point of discussion is regarding the default log filename. This initial PR will drop a timestamped file name for each process where aspire package is imported. This is pretty common, but can be a little noisy. That is, if you are frantically developing and running tests, you might get many small files in your directory to
rm *.log, instead of one big one...Alternatively it is possible to turn off writing the file by default, and use a simple bool option like
log_to_fileinconfig.ini. This would shield users from the python logging configuration, which might seem complicated. (It isn't but certainly has nothing to do with CryoEM). This is easy to implement if desired.As it stands the log filenames look like
aspire-2020-10-08T14-50-13.456577.log, with a snippet example attached showing the new format.ex.log