netbox-agent/netbox_agent/logging.py

12 lines
190 B
Python
Raw Normal View History

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