Use yaml logging config format because it is much nicer
This commit is contained in:
parent
b90d377af4
commit
30595b466f
|
@ -18,6 +18,7 @@ from synapse.util.logcontext import LoggingContextFilter
|
||||||
from twisted.python.log import PythonLoggingObserver
|
from twisted.python.log import PythonLoggingObserver
|
||||||
import logging
|
import logging
|
||||||
import logging.config
|
import logging.config
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
|
||||||
class LoggingConfig(Config):
|
class LoggingConfig(Config):
|
||||||
|
@ -79,7 +80,7 @@ class LoggingConfig(Config):
|
||||||
logger.addHandler(handler)
|
logger.addHandler(handler)
|
||||||
logger.info("Test")
|
logger.info("Test")
|
||||||
else:
|
else:
|
||||||
logging.config.fileConfig(self.log_config)
|
logging.config.dictConfig(yaml.load(self.log_config))
|
||||||
|
|
||||||
observer = PythonLoggingObserver()
|
observer = PythonLoggingObserver()
|
||||||
observer.start()
|
observer.start()
|
||||||
|
|
Loading…
Reference in New Issue