feat: add console redis log and error log#911
Merged
Conversation
3d82e68 to
561235c
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the logging pipeline so IPython console input and console errors are published to Redis (and therefore can be forwarded to Grafana), alongside adding a dedicated CONSOLE_LOG_ERROR level and updating log message typing to support the new log type.
Changes:
- Add
CONSOLE_LOG_ERRORlog level and a dedicated Redis sink for console-level logs inBECLogger. - Extend
LogMessage.log_typeto includeconsole_log_error. - Update IPython client to log console input before execution and to publish exception details as
CONSOLE_LOG_ERROR, with new unit tests for both logger and client behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| bec_lib/bec_lib/logger.py | Adds CONSOLE_LOG_ERROR, refactors Redis publishing into _publish_log_message, and introduces console-specific Redis sink + filtering. |
| bec_lib/bec_lib/messages.py | Extends LogMessage.log_type Literal to accept console_log_error. |
| bec_lib/tests/test_bec_logger.py | Adds unit tests validating console Redis callback behavior and failure handling. |
| bec_ipython_client/bec_ipython_client/main.py | Moves console input logging to pre_run_cell and adds log_console_error + exception-handler integration. |
| bec_ipython_client/tests/client_tests/test_bec_client.py | Adds tests asserting exception handler logs CONSOLE_LOG_ERROR for key error types. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
561235c to
9273338
Compare
wyzula-jan
approved these changes
May 26, 2026
Contributor
wyzula-jan
left a comment
There was a problem hiding this comment.
Looks good, works as expected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adding console and console_error logs to redis. This will allow us to forward these logs also to grafana.
Type of Change
pre_runcellHow to test
Definition of Done