mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +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:
|
if logger:
|
||||||
logger.log(level, text, *args, **kwargs)
|
logger.log(level, text, *args, **kwargs)
|
||||||
else:
|
else:
|
||||||
world.log_queue.append((level, text))
|
world._log_queue.append((level, text))
|
||||||
|
|
||||||
def validateConf(conf, logger=None):
|
def validateConf(conf, logger=None):
|
||||||
"""Validates a parsed configuration dict."""
|
"""Validates a parsed configuration dict."""
|
||||||
|
8
log.py
8
log.py
@ -89,12 +89,12 @@ if files:
|
|||||||
for filename, config in files.items():
|
for filename, config in files.items():
|
||||||
makeFileLogger(filename, config.get('loglevel'))
|
makeFileLogger(filename, config.get('loglevel'))
|
||||||
|
|
||||||
log.debug("log: Emptying log_queue")
|
log.debug("log: Emptying _log_queue")
|
||||||
# Process and empty the log queue
|
# Process and empty the log queue
|
||||||
while world.log_queue:
|
while world._log_queue:
|
||||||
level, text = world.log_queue.popleft()
|
level, text = world._log_queue.popleft()
|
||||||
log.log(level, text)
|
log.log(level, text)
|
||||||
log.debug("log: Emptied log_queue")
|
log.debug("log: Emptied _log_queue")
|
||||||
|
|
||||||
class PyLinkChannelLogger(logging.Handler):
|
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
|
# 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.
|
# 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.
|
# Determines whether we have a PID file that needs to be removed.
|
||||||
_should_remove_pid = False
|
_should_remove_pid = False
|
||||||
|
Loading…
Reference in New Issue
Block a user