netbox-agent/netbox_agent/logging.py
Solvik f06da32fc3
Virtual Machine feature (#122)
Add ability to create Virtual Machine in netbox with an auto-detecting feature (currently VirtualBox, Xen, Hyper-V, VMWare, GCP)

One caveat, I made the choice not to report the disk as Netbox model allow only one size but VM often have multiples.

Also, lot of code refactoring to be able to use create_or_update function style, fixing a lot of corner case
2020-04-19 12:28:49 +02:00

9 lines
200 B
Python

import logging
from netbox_agent.config import config
logger = logging.getLogger()
if config.log_level.lower() == 'debug':
logger.setLevel(logging.DEBUG)
else:
logger.setLevel(logging.INFO)