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

Add a logging BreachHandler #149

Merged
merged 10 commits into from
Aug 24, 2019
Merged

Add a logging BreachHandler #149

merged 10 commits into from
Aug 24, 2019

Conversation

komuw
Copy link
Owner

@komuw komuw commented Aug 23, 2019

Thank you for contributing to naz.
Every contribution to naz is important.

Contributor offers to license certain software (a “Contribution” or multiple
“Contributions”) to naz, and naz agrees to accept said Contributions,
under the terms of the MIT License.
Contributor understands and agrees that naz shall have the irrevocable and perpetual right to make
and distribute copies of any Contribution, as well as to create and distribute collective works and
derivative works of any Contribution, under the MIT License.

Now,

What(What have you changed?)

  • add a logging BreachHandler

Why(Why did you change it?)

  • Sometimes you may only want to log things when a certain log level is breached.
    And when that level is breached, you also want all the log records upto that point

References:

  1. https://tersesystems.com/blog/2019/07/28/triggering-diagnostic-logging-on-exception/
  2. https://docs.python.org/3.6/library/logging.handlers.html#logging.handlers.MemoryHandler

@codecov-io
Copy link

codecov-io commented Aug 23, 2019

Codecov Report

Merging #149 into master will increase coverage by 0.01%.
The diff coverage is 90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #149      +/-   ##
==========================================
+ Coverage   86.33%   86.34%   +0.01%     
==========================================
  Files          14       14              
  Lines        1295     1318      +23     
==========================================
+ Hits         1118     1138      +20     
- Misses        177      180       +3
Impacted Files Coverage Δ
naz/__version__.py 100% <ø> (ø) ⬆️
naz/logger.py 89.88% <90%> (-1.03%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d18dd96...889b7ef. Read the comment docs.

@komuw komuw merged commit 3e8931c into master Aug 24, 2019
@komuw komuw deleted the breachHandler branch August 24, 2019 00:36
@komuw komuw restored the breachHandler branch August 24, 2019 00:39
@komuw komuw deleted the breachHandler branch August 24, 2019 00:40
komuw added a commit that referenced this pull request Aug 24, 2019
What:
- Simplify Breach Log Handler

Why:
- In #149, we added a breach log handler.  
  In this PR, we simplify it's implementation
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.

2 participants