-
Notifications
You must be signed in to change notification settings - Fork 272
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
Document event logging #1260
Document event logging #1260
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.
Awesome @Zsailer, thanks! I just had a few grammatical adjustments and a question that I think I answered but would like your confirmation (in case others encounter the same).
|
||
event_handler = FileHandler("events.log") | ||
|
||
c.EventLogger.handlers = [event_handler] |
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.
Does this work? I believe when I tried this, I found I had to use register_handler()
, otherwise the _logger
attribute doesn't get set.
Ah, is this because this is a config entry and the EventLogger
instance does not yet exist, in which case its initializer will do the right thing? I had been trying to set the handlers list after EventLogger
's instantiation.
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.
Ah, is this because this is a config entry
Yeah, that's exactly right. This is a config syntax. If you do this after instantiation, the handlers trait does not update.
Co-authored-by: Kevin Bates <kbates4@gmail.com>
Co-authored-by: Kevin Bates <kbates4@gmail.com>
Co-authored-by: Kevin Bates <kbates4@gmail.com>
Co-authored-by: Kevin Bates <kbates4@gmail.com>
Adding some documentation about event-logging from Jupyter Server.
This was initiated by #1252.
Todo