removed log.py

This commit is contained in:
Pranav Jerry 2021-09-06 15:00:34 +05:30
parent 2d9aee4d3a
commit 0bcd31b6e3
No known key found for this signature in database
GPG Key ID: F1DCDC4FED0A0C5B

View File

@ -1,31 +0,0 @@
#!/usr/bin/env python3
"""
log.py
------
This file contains the logger object, which is required for logging
to the systemd journal
"""
import logging
from systemd import journal
from naxalnet.config import parse_args
def get_logger():
"""returns the logger object for logging"""
args = parse_args()
if args.systemd:
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
logger.addHandler(journal.JournalHandler())
else:
# logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
return logger
logger = get_logger()