diff --git a/napalm_sros/sros.py b/napalm_sros/sros.py index b8b014c..5a3df56 100644 --- a/napalm_sros/sros.py +++ b/napalm_sros/sros.py @@ -57,11 +57,11 @@ GET_IPV6_NEIGHBORS_TABLE,GET_LLDP_NEIGHBORS,GET_LLDP_NEIGHBORS_DETAIL, \ GET_NETWORK_INSTANCES,GET_NTP_PEERS,GET_NTP_SERVERS,GET_OPTICS, \ GET_PROBES_CONFIG,GET_ROUTE_TO,GET_SNMP_INFORMATION,GET_USERS -from napalm_sros.utils.utils import init_logging from .api import get_bgp_neighbors, get_bgp_neighbors_detail +import logging -log = init_logging() +log = logging.getLogger(__file__) class NokiaSROSDriver(NetworkDriver): """Napalm driver for Skeleton.""" diff --git a/napalm_sros/utils/utils.py b/napalm_sros/utils/utils.py deleted file mode 100644 index 7cd6e40..0000000 --- a/napalm_sros/utils/utils.py +++ /dev/null @@ -1,12 +0,0 @@ -import logging -from datetime import datetime - -LOG_FORMAT = '%(asctime)-15s %(filename)s %(funcName)s line %(lineno)d %(levelname)s: %(message)s' - - -def init_logging(): - date = datetime.now() - new_date = date.strftime('%Y-%m-%d %H.%M.%S') - file_path = "./logs_{}.log".format(new_date) - logging.basicConfig(filename=file_path, format=LOG_FORMAT, level=logging.DEBUG) - return logging.getLogger()