-
Notifications
You must be signed in to change notification settings - Fork 49
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
Remove support for the 'fileline' attribute in log formats #678
Conversation
This non-standard attribute has been the cause of many problems, so reverting back to using only the default attributes.
conf_files/log.yaml
Outdated
@@ -7,8 +7,7 @@ logger: | |||
datefmt: '%H:%M:%S' | |||
detail: | |||
style: '{' | |||
# See FilenameLineFilter in logger.py for fileline description | |||
format: '{levelname:.1s}{asctime}.{msecs:03.0f} {fileline:20s} {message}' | |||
format: '{levelname:.1s}{asctime}.{msecs:03.0f} {filename} {lineno} {message}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer we still have a fixed length for filename
and lineno
so the the message
always start with a left flush. I could live without but I think it makes reading easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Codecov Report
@@ Coverage Diff @@
## develop #678 +/- ##
==========================================
- Coverage 78.06% 77.9% -0.16%
==========================================
Files 61 61
Lines 5069 5064 -5
Branches 696 696
==========================================
- Hits 3957 3945 -12
- Misses 898 903 +5
- Partials 214 216 +2
Continue to review full report at Codecov.
|
Should fix #393. |
Right align the filename in a 25 char field space (if it fits), and pad the lineno to 3 chars with zero if lower than 100. For most of our files, this will result in a fixed length prefix before the message, thus making it somewhat easier to find the message.
The ] will be on all log lines, between the (usually) fixed length prefix and the message.
This non-standard attribute has been the cause of many problems,
so reverting back to using only the default attributes.