Utilities

Common utilities used across modules.
from pkg_name.utils import *

source

get_logger

 get_logger (name:str, fmt:str='[%(levelname)s] [%(asctime)s.%(msecs)d]
             [pid %(process)d]
             [%(pathname)s:%(lineno)d:%(funcName)s]\n%(message)s',
             datefmt:str='%Y-%m-%d %H:%M:%S', level:int=20,
             log_path:Optional[str]=None, file_mode:str='w')

Get a configured logger.

Type Default Details
name str
fmt str [%(levelname)s] [%(asctime)s.%(msecs)d] [pid %(process)d] [%(pathname)s:%(lineno)d:%(funcName)s]
%(message)s
datefmt str %Y-%m-%d %H:%M:%S
level int 20
log_path Optional None
file_mode str w
Returns Logger Configured logger instance.