autogestionale/autogestionale/logging.py

16 lines
239 B
Python
Raw Normal View History

2017-09-30 01:36:10 +02:00
import logging
import logging.config
2017-09-30 02:45:43 +02:00
from autogestionale.config import APP_NAME
2017-09-30 01:36:10 +02:00
root = logging.getLogger(APP_NAME)
def init_logging(config):
logging.config.dictConfig(config)
def get_logger(name):
return root.getChild(name)