Skip to content

Enable logging to Console#213

Merged
6 commits merged intonextfrom
EWM12733_LogToConsole
Oct 13, 2025
Merged

Enable logging to Console#213
6 commits merged intonextfrom
EWM12733_LogToConsole

Conversation

@ghost
Copy link

@ghost ghost commented Oct 2, 2025

Description of work:

This changes the filename of the log from refred_m.log to quicknxs.log and adds a StreamHandler to also log to the console. The log level can be configured by a drop down menu in status bar of the main window. The default log level can be set with QUICKNXS_LOGLEVEL environment variable but is set to INFO variable is unset.

Check all that apply:
(if not, provide an explanation in the work description)

  • updated documentation and checked that it looks correct in the pull request preview
  • Source added/refactored
  • Added unit tests
  • Added integration tests

References:

  • Links to IBM EWM items: EWM 12733
  • Links to related issues or pull requests:

⚠️ Manual test for the reviewer

(instructions to set up the environment)

Open the QuickNXS GUI

  • Verify that the dropdown is present.
  • Verify the default can be set with the environment variable
  • Verify that the log level changes

Check list for the reviewer

  • best software practices
    • clearly named variables (better to be verbose in variable names)
    • code comments explaining the intent of code blocks
  • All the tests are passing
  • The documentation is up to date and looks correct in the pull request preview
  • code comments added when explaining intent

@codecov-commenter
Copy link

codecov-commenter commented Oct 2, 2025

Codecov Report

❌ Patch coverage is 96.42857% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 65.44%. Comparing base (dd2db02) to head (f6a3ce5).

Files with missing lines Patch % Lines
...quicknxs/interfaces/event_handlers/main_handler.py 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next     #213      +/-   ##
==========================================
+ Coverage   64.94%   65.44%   +0.49%     
==========================================
  Files          36       36              
  Lines        6810     6836      +26     
==========================================
+ Hits         4423     4474      +51     
+ Misses       2387     2362      -25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@glass-ships glass-ships requested a review from Copilot October 2, 2025 14:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables console logging by adding a configurable log level dropdown to the status bar and setting up both file and console output streams. The changes allow users to dynamically adjust logging levels through the GUI and configure the default level via an environment variable.

  • Adds a log level dropdown widget to the main window's status bar with dynamic level changing
  • Configures console logging output alongside existing file logging
  • Changes log filename from refred_m.log to quicknxs.log

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/quicknxs/interfaces/event_handlers/main_handler.py Adds log level dropdown UI component and methods to get/set logging levels
src/quicknxs/gui.py Configures logging with environment variable support and adds console stream handler
pyproject.toml Updates vulnerability ignore list for dependency auditing

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@glass-ships
Copy link
Member

it may be worth adding some simple tests:

  • that the log level can be retrieved from environment variable
  • that the log level in the UI matches what was set in gui.py
  • that changes to the log level from the GUI propagate to the python logger

@ghost ghost requested a review from Copilot October 3, 2025 12:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ghost ghost requested a review from glass-ships October 3, 2025 12:54
glass-ships
glass-ships previously approved these changes Oct 3, 2025
@ghost ghost force-pushed the EWM12733_LogToConsole branch from bcbdf92 to 6896c85 Compare October 6, 2025 05:42
@ghost ghost requested a review from glass-ships October 6, 2025 05:43
glass-ships
glass-ships previously approved these changes Oct 6, 2025
@ghost ghost force-pushed the EWM12733_LogToConsole branch from 6896c85 to f6a3ce5 Compare October 13, 2025 14:10
@ghost ghost merged commit a99630f into next Oct 13, 2025
5 checks passed
@ghost ghost deleted the EWM12733_LogToConsole branch October 13, 2025 21:20
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants