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

Reduce third party debug logging #290

Merged
merged 2 commits into from
May 5, 2024
Merged

Conversation

Marshall-Hallenbeck
Copy link
Collaborator

@Marshall-Hallenbeck Marshall-Hallenbeck commented May 4, 2024

There was a lot of annoying useless logs being shown since we set the global logger to DEBUG. This sets the global logger higher, but keeps ours dependent on what the user specifies.

This also fixes a weird error noticed in #288 where the exception data wasn't being populated during debugging, so I added a check to make sure that its set, and if it's not, set it to the error message (which is what it should be).

Before, with a lot of annoying useless stuff:
before_debug_logging

After:
after_debug_logging

@Marshall-Hallenbeck Marshall-Hallenbeck added the enhancement New feature or request label May 4, 2024
@Marshall-Hallenbeck Marshall-Hallenbeck self-assigned this May 4, 2024
@NeffIsBack
Copy link
Contributor

Do you have a before&after for the bug fix?

@mpgn
Copy link
Collaborator

mpgn commented May 5, 2024

It's in the initial message @NeffIsBack

Copy link
Contributor

@NeffIsBack NeffIsBack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Marshall-Hallenbeck
Copy link
Collaborator Author

It's in the initial message @NeffIsBack

Spoke with @NeffIsBack about this - he meant the bugfix I referenced, which is this line: https://github.com/Pennyw0rth/NetExec/pull/290/files#diff-e9ef40513b31bc1fbcadcc3400cf6e6148782623051421322e22fff1bd574861R57

I didn't include a picture, but essentially we received debug logs for #288 where the exception message was actually being triggered inside the Python logging library because for some reason the exception data wasnt being filled in, even though the error message existed.

@Marshall-Hallenbeck Marshall-Hallenbeck merged commit a677b37 into main May 5, 2024
6 checks passed
@Marshall-Hallenbeck Marshall-Hallenbeck deleted the marshall-fix-logging branch May 5, 2024 17:15
@Marshall-Hallenbeck Marshall-Hallenbeck added the bug-fix This Pull Request fixes a bug label May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix This Pull Request fixes a bug enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants