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
Merged

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

merged 1 commit into from Mar 28, 2019

Conversation

robinchow
Copy link
Contributor

@robinchow robinchow 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 has been minimized.

@webknjaz webknjaz closed this Feb 15, 2019
@webknjaz webknjaz reopened this Feb 15, 2019
@codecov
Copy link

@codecov codecov bot 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
Copy link
Contributor Author

@robinchow robinchow commented Mar 28, 2019

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

@webknjaz
Copy link
Member

@webknjaz webknjaz commented Mar 28, 2019

I've restarted tests, will merge after success

@robinchow
Copy link
Contributor Author

@robinchow robinchow 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
Copy link
Member

@webknjaz webknjaz 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
@webknjaz
Copy link
Member

@webknjaz webknjaz commented Mar 28, 2019

Thanks!

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.

None yet

2 participants