mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-23 19:19:31 +01:00
Move world.log_queue to world._log_queue
This commit is contained in:
parent
91659ea992
commit
819ac4d406
2
conf.py
2
conf.py
@ -58,7 +58,7 @@ def _log(level, text, *args, logger=None, **kwargs):
|
||||
if logger:
|
||||
logger.log(level, text, *args, **kwargs)
|
||||
else:
|
||||
world.log_queue.append((level, text))
|
||||
world._log_queue.append((level, text))
|
||||
|
||||
def validateConf(conf, logger=None):
|
||||
"""Validates a parsed configuration dict."""
|
||||
|
8
log.py
8
log.py
@ -89,12 +89,12 @@ if files:
|
||||
for filename, config in files.items():
|
||||
makeFileLogger(filename, config.get('loglevel'))
|
||||
|
||||
log.debug("log: Emptying log_queue")
|
||||
log.debug("log: Emptying _log_queue")
|
||||
# Process and empty the log queue
|
||||
while world.log_queue:
|
||||
level, text = world.log_queue.popleft()
|
||||
while world._log_queue:
|
||||
level, text = world._log_queue.popleft()
|
||||
log.log(level, text)
|
||||
log.debug("log: Emptied log_queue")
|
||||
log.debug("log: Emptied _log_queue")
|
||||
|
||||
class PyLinkChannelLogger(logging.Handler):
|
||||
"""
|
||||
|
2
world.py
2
world.py
@ -32,7 +32,7 @@ fallback_hostname = 'pylink.int'
|
||||
|
||||
# Defines messages to be logged as soon as the log system is set up, for modules like conf that are
|
||||
# initialized before log. This is processed (and then not used again) when the log module loads.
|
||||
log_queue = deque()
|
||||
_log_queue = deque()
|
||||
|
||||
# Determines whether we have a PID file that needs to be removed.
|
||||
_should_remove_pid = False
|
||||
|
Loading…
Reference in New Issue
Block a user