-
Notifications
You must be signed in to change notification settings - Fork 77
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 logger setup #4657
Fix logger setup #4657
Conversation
Changelog(s) in markdown:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
""" | ||
global logger | ||
_setup_neo4j_logger() | ||
|
||
logger.remove(None) # Removes all pre-existing handlers | ||
logger.remove() # Removes all pre-existing handlers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you sure passing None vs nothing still achieves what we wanted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default value is None then yes, and it is less confusing that way imo. https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.remove
Co-authored-by: dorschw <81086590+dorschw@users.noreply.github.com>
Changelog(s) in markdown:
|
Related Issues
fixes: CIAC-12159
Description
When using 'demisto-sdk' as a library within content scripts/integrations, the new logging setup/initialization conflicts with existing logger and causes the container to crash when initialized statically.
Additionally, logs does not show up on default python's logging which is used in content scripts/integration.
Solution: