Skip to content

Conversation

@chaubold
Copy link
Contributor

… allow reconfiguring it

The real issue is that KnimeLogHandler inherits from StreamHandler, which by default sets self.stream = sys.stderr. When logging.shutdown() is called during extension loading, it might be triggering a cascade where flushing stderr somehow loops back. The solution is to inherit from logging.Handler directly instead of StreamHandler, since we're not actually using a stream

@chaubold chaubold requested a review from a team as a code owner January 13, 2026 15:13
Copilot AI review requested due to automatic review settings January 13, 2026 15:13
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 fixes a logging shutdown issue where KnimeLogHandler inheriting from StreamHandler caused problems during extension loading when logging.shutdown() is called.

Changes:

  • Changed KnimeLogHandler base class from logging.StreamHandler to logging.Handler
  • Removed the self argument from the super().__init__() call

@marc-lehner marc-lehner requested a review from Copilot January 13, 2026 16:11
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 1 out of 1 changed files in this pull request and generated no new comments.

@marc-lehner
Copy link
Contributor

@chaubold looks fine to me. The branch does not contain the ticket number, but I guess that does not matter here

… allow reconfiguring it

The real issue is that KnimeLogHandler inherits from StreamHandler, which by default sets self.stream = sys.stderr. When logging.shutdown() is called during extension loading, it might be triggering a cascade where flushing stderr somehow loops back. The solution is to inherit from logging.Handler directly instead of StreamHandler, since we're not actually using a stream
@chaubold chaubold force-pushed the enh/fix-log-handler-recursion branch from ba50981 to e6af2db Compare January 13, 2026 19:44
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
50.0% Coverage on New Code (required ≥ 85%)

See analysis details on SonarQube Cloud

@chaubold chaubold merged commit 6be6e8f into master Jan 13, 2026
2 of 4 checks passed
@chaubold chaubold deleted the enh/fix-log-handler-recursion branch January 13, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants