Commit 05a710bc authored by U. Artie Eoff's avatar U. Artie Eoff Committed by Chad Versace
Browse files

Add synchronization to Logger functions.

Add synchronization decorator to Logger functions for multithreaded
logging support.
parent 6388cf7b
......@@ -21,13 +21,16 @@
from threads import synchronized_self
from patterns import Singleton
import logging
class Logger(Singleton):
def __logMessage(self, logfunc, message, **kwargs):
[logfunc(line, **kwargs) for line in message.split('\n')]
def getLogger(self, channel = None):
if 0 == len(logging.root.handlers):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment