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

fix: Remove duplicate check if debug logging is enabled #643

Merged
merged 1 commit into from Oct 26, 2020

Conversation

JakubOnderka
Copy link
Contributor

This check is not necessary, because logger.debug method is defined as:

    def debug(self, msg, *args, **kwargs):
        """
        Log 'msg % args' with severity 'DEBUG'.

        To pass exception information, use the keyword argument exc_info with
        a true value, e.g.

        logger.debug("Houston, we have a %s", "thorny problem", exc_info=1)
        """
        if self.isEnabledFor(DEBUG):
            self._log(DEBUG, msg, args, **kwargs)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 36.948% when pulling 6050ff1 on JakubOnderka:remove-duplicate-debug-check into 942f6e9 on MISP:main.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 36.948% when pulling 6050ff1 on JakubOnderka:remove-duplicate-debug-check into 942f6e9 on MISP:main.

@codecov
Copy link

codecov bot commented Oct 25, 2020

Codecov Report

Merging #643 into main will decrease coverage by 0.87%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #643      +/-   ##
==========================================
- Coverage   37.86%   36.98%   -0.88%     
==========================================
  Files          38       39       +1     
  Lines        7488     7750     +262     
==========================================
+ Hits         2835     2866      +31     
- Misses       4653     4884     +231     
Impacted Files Coverage Δ
pymisp/api.py 12.42% <0.00%> (-0.14%) ⬇️
pymisp/tools/emailobject.py 20.77% <0.00%> (-3.82%) ⬇️
pymisp/tools/peobject.py 22.52% <0.00%> (-1.07%) ⬇️
pymisp/mispevent.py 69.49% <0.00%> (-0.74%) ⬇️
pymisp/abstract.py 76.97% <0.00%> (-0.48%) ⬇️
tests/test_fileobject.py 100.00% <0.00%> (ø)
pymisp/tools/elfobject.py 27.02% <0.00%> (ø)
pymisp/tools/machoobject.py 28.16% <0.00%> (ø)
tests/testlive_comprehensive.py 0.00% <0.00%> (ø)
... and 3 more

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 2fb61d4...6050ff1. Read the comment docs.

@Rafiot
Copy link
Member

Rafiot commented Oct 26, 2020

Looks good, thank you!

@Rafiot Rafiot merged commit ad483b6 into MISP:main Oct 26, 2020
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

3 participants