netbox-agent/netbox_agent/logging.py

11 lines
193 B
Python
Raw Normal View History

2019-08-06 17:59:46 +02:00
import logging
2019-09-03 13:16:37 +02:00
from netbox_agent.config import config
2019-08-06 17:59:46 +02:00
logger = logging.getLogger()
2019-08-06 17:59:46 +02:00
2019-09-03 13:16:37 +02:00
if config.log_level == 'debug':
logger.setLevel(logging.DEBUG)
else:
logger.setLevel(logging.INFO)