From 0bcd31b6e3495e12c0f78b04c5158db074ea00ca Mon Sep 17 00:00:00 2001 From: Pranav Jerry Date: Mon, 6 Sep 2021 15:00:34 +0530 Subject: [PATCH] removed log.py --- naxalnet/log.py | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 naxalnet/log.py diff --git a/naxalnet/log.py b/naxalnet/log.py deleted file mode 100644 index 1aa93a2..0000000 --- a/naxalnet/log.py +++ /dev/null @@ -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()