-
Notifications
You must be signed in to change notification settings - Fork 4
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
Standardize Logging #1045
Draft
fernandohds564
wants to merge
36
commits into
master
Choose a base branch
from
add-logger-dev
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Standardize Logging #1045
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fernandohds564
requested review from
anacso17,
murilobalves,
vellosok75,
xresende and
Gabrielrezende-asc
November 23, 2023 12:37
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR attempts to make use of the functionalities of the logging library to log messages. This will help standardize logging across all libraries to provide information to IOCs and HLA windows without the need of using callbacks or any other in-house developed strategy.
In order to review this PR, I recommend reading the basic and advanced tutorials of the logging library [1], to understand the basics of how it works. The main feature of this library that is not intuitive at first, but makes a lot of sense when you get used to it, is the hierarchy of loggers and how records are passed up in this hierarchy.
Another good reference is [2], where the best practices of the use of the library are explained. I tried to follow those, but I'm not sure if I succeded, since I'm still a newby in this subject.
Currently I have a doubt on how to define loggers. By the name of the module of the class or by the name of the module+the name of the class. It would be helpful to get an input from you guys on this matter.
Finally, feel free to add more reviewers for the PR. And help in implementation and testing is always welcome 😄.
[1] https://docs.python.org/3/howto/logging.html#logging-basic-tutorial
[2] https://coralogix.com/blog/python-logging-best-practices-tips/