blob: bd4c6ef3701c1cc94b51cb622c20ed5a95c4f333 [file] [log] [blame]
#!/usr/bin/env python
""" Logger initialization """
import logging
def define_logger(name):
""" Initialization of logger"""
logger = logging.getLogger(name)
logger.setLevel(logging.INFO)
ch = logging.StreamHandler()
ch.setLevel(logging.INFO)
logger.addHandler(ch)
log_format = '%(asctime)s - %(levelname)s - %(name)s - %(message)s'
formatter = logging.Formatter(log_format,
"%H:%M:%S")
ch.setFormatter(formatter)
return logger