Skip to content

Commit

Permalink
Merge pull request #2 from birnevogel11/03-custom-default-logger
Browse files Browse the repository at this point in the history
Support propagating logs to upper level
  • Loading branch information
aigarius authored Jan 4, 2024
2 parents d837112 + 6c2bdf6 commit a543c57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nose/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ def __init__(self, **kw):
self.configSection = 'nosetests'
self.debug = env.get('NOSE_DEBUG')
self.debugLog = env.get('NOSE_DEBUG_LOG')
self.logPropagate = bool(env.get('NOSE_LOG_PROPAGATE', False))
self.exclude = None
self.getTestCaseNamesCompat = False
self.includeExe = env.get('NOSE_INCLUDE_EXE',
Expand Down Expand Up @@ -369,7 +370,7 @@ def configureLogging(self):
handler.setFormatter(format)

logger = logging.getLogger('nose')
logger.propagate = 0
logger.propagate = self.logPropagate

# only add our default handler if there isn't already one there
# this avoids annoying duplicate log messages.
Expand Down

0 comments on commit a543c57

Please sign in to comment.