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

Document event logging #1260

Closed
wants to merge 6 commits into from

Conversation

Zsailer
Copy link
Member

@Zsailer Zsailer commented Apr 17, 2023

Adding some documentation about event-logging from Jupyter Server.

This was initiated by #1252.

Todo

  • Autodocument core event schemas.

Copy link
Member

@kevin-bates kevin-bates left a 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).

docs/source/developers/emitting-events.md Outdated Show resolved Hide resolved
docs/source/developers/emitting-events.md Outdated Show resolved Hide resolved
docs/source/developers/emitting-events.md Outdated Show resolved Hide resolved
docs/source/developers/emitting-events.md Outdated Show resolved Hide resolved

event_handler = FileHandler("events.log")

c.EventLogger.handlers = [event_handler]
Copy link
Member

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.

Copy link
Member Author

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.

Zsailer and others added 4 commits October 12, 2023 11:34
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants