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

Reduced log level for non-error events in win32.py #1769

Merged
merged 1 commit into from Mar 28, 2019

Conversation

Projects
None yet
2 participants
@robinchow
Copy link
Contributor

commented Feb 14, 2019

What kind of change does this PR introduce?

  • bug fix
  • feature
  • docs update
  • tests/coverage improvement
  • refactoring
  • other

What is the related issue number (starting with #)
N/A

What is the current behavior? (You can also link to an open issue here)
In win32.py's ConsoleCtrlHandler, if start/stop is called multiple times, this is logged at the ERROR (40) level.

What is the new behavior (if this is a feature change)?
If start/stop is called multiple times, this is logged at the INFO (20) level.

Other information:
Since the code handles the situation well, and there are no side effects to multiple calls, we shouldn't pollute the logs with error level entries.

Also, because ConsoleCtrlHandler is extremely proactive at removing itself (when it captures Ctrl+C or equivalent), even before it attempts to stop the bus, it sometimes ends up that the handler's stop is called multiple times (directly, then via a 'stop' publish event) during normal operations. There's no inherent badness to this, so while it should be noted/logged, it should be logged at a much lower level.

Checklist:

  • I think the code is well written
  • I wrote good commit messages
  • I have squashed related commits together after the changes have been approved
  • Unit tests for the changes exist
  • Integration tests for the changes exist (if applicable)
  • I used the same coding conventions as the rest of the project
  • The new code doesn't generate linter offenses
  • Documentation reflects the changes
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences
@rtd-helper

This comment was marked as resolved.

Copy link

commented Feb 14, 2019

The rtd-bot is activated, but no .github/config.yml found in this repository.
Make sure that you have it in your default branch.

@webknjaz webknjaz closed this Feb 15, 2019

@webknjaz webknjaz reopened this Feb 15, 2019

@codecov

This comment has been minimized.

Copy link

commented Feb 15, 2019

Codecov Report

Merging #1769 into master will decrease coverage by 0.02%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master    #1769      +/-   ##
==========================================
- Coverage   80.29%   80.26%   -0.03%     
==========================================
  Files         104      104              
  Lines       13642    13639       -3     
==========================================
- Hits        10954    10948       -6     
- Misses       2688     2691       +3
@robinchow

This comment has been minimized.

Copy link
Contributor Author

commented Mar 28, 2019

Hi, any update on this? Is there any additional work/discussion required?

@webknjaz

This comment has been minimized.

Copy link
Member

commented Mar 28, 2019

I've restarted tests, will merge after success

@robinchow

This comment has been minimized.

Copy link
Contributor Author

commented Mar 28, 2019

I scanned the failed builds, and I don't see anything that links the failed tests to this code change. I could be wrong though, happy to fix up someone points me in the general direction.

@webknjaz

This comment has been minimized.

Copy link
Member

commented Mar 28, 2019

Yeah, TravisCI build got fixed upon restart

@webknjaz webknjaz merged commit b648977 into cherrypy:master Mar 28, 2019

5 of 7 checks passed

codecov/patch CI failed.
Details
continuous-integration/appveyor/pr AppVeyor build failed
Details
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
LGTM analysis: JavaScript No code changes detected
Details
LGTM analysis: Python No new or fixed alerts
Details
WIP Ready for review
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@webknjaz

This comment has been minimized.

Copy link
Member

commented Mar 28, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.