-
-
Notifications
You must be signed in to change notification settings - Fork 402
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: add format and datefmt to allow configuring the log output from cfg file #1512
Conversation
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'm 👍 on making logging more configurable, but this patch has at least one error that must be fixed before we can proceed. See the line notes for more detailed feedback.
oops! will fix that
will change this also. |
a652dfb
to
db74a99
Compare
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 think you can use intermediate variables more often, but otherwise: looks very good.
updated as suggested; please let me know if you have any add'l requests/suggestions. thnx! |
…rom cfg file also add IRC channel-specific logging params to set level, format, and datefmt for IRC channel logs, different from the local logs. This can be useful when the format of the IRC logs should be different than the format of the local logs. This is also quite useful when the local log level is set to DEBUG, as logging a huge volume of DEBUG logs to IRC is rarely useful.
(pushed minor indentation correction) |
LGTM 👍 🦄 |
This should fix #1097 or at least it should allow users to configure logging in a way that fixes it for them. |
@dgw another quick win PR for you to merge. |
@dgw I was looking at logging & the output redirect we use for Sopel, and I want to do some work around that. This PR would bring some very interesting feature I'd really like to reuse as soon as possible. If you didn't pick yet your next PR to merge, here is a very good candidate! |
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.
Seems straightforward enough to me. Let's get this onto the shortlist of "ready to merge" PRs!
logging currently uses the default msg format and date format; add cfg file parameters to allow users to specify what format they would like for both msgs and timestamps.