This repository has been archived by the owner on Apr 22, 2024. It is now read-only.
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
Fix kytos#386 List of loggers that *were* disabled: - concurrent.futures logger - kytos.core.buffers logger - kytos.core.napps.manager logger - kytos.core.switch logger - kytos.core.tcp_server logger - socketio logger
beraldoleal
suggested changes
May 19, 2017
kytos/core/logs.py
Outdated
@@ -23,7 +23,7 @@ def load_logging_file(cls, logging_file): | |||
cls.configuration.read(logging_file) | |||
|
|||
try: | |||
config.fileConfig(logging_file) | |||
config.fileConfig(logging_file, disable_existing_loggers=False) | |||
except FileNotFoundError: | |||
cls.configuration.set('handler_syslog', 'args', '[]') | |||
config.fileConfig(cls.configuration) |
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.
Should not the line be here too?
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.
good catch. I refactored not to repeat code.
diraol
approved these changes
May 19, 2017
macartur
suggested changes
May 19, 2017
kytos/core/logs.py
Outdated
try: | ||
config.fileConfig(logging_file) | ||
except FileNotFoundError: | ||
cls.configuration.set('handler_syslog', 'args', '[]') |
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.
I guess you forgot to verify the handler_syslog. This line change the 'handler_syslog' if the file /dev/syslog don't exists.
Some details: - Preventing errors when no syslog is available - LogManager refactoring - Added many comments and tests (100% coverage of logs module) - Unified 2 files that was testing logs module Signed-off-by: Diego Rabatone Oliveira <diraol@ncc.unesp.br>
@beraldoleal and @macartur, I believe all the issues are solved now. There's also tests for this issues and 100% coverage of logs module. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fix #386
List of loggers that were disabled: