def glances_logger(env_key='LOG_CFG'):
 _logger = logging.getLogger()
 config = LOGGING_CFG
 user_file = os.getenv(env_key, None)
 if (user_file and os.path.exists(user_file)):
  with open(user_file, 'rt') as f:
   config = json.load(f)
 logging.config.dictConfig(config)
 return _logger

def glances_logger ( env_key = 'LOG_CFG' ) : _logger = logging . getLogger ( ) config = LOGGING_CFG user_file = os . getenv ( env_key , None ) if ( user_file and os . path . exists ( user_file ) ) : with open ( user_file , 'rt' ) as f : config = json . load ( f ) logging . config . dictConfig ( config ) return _logger
build and return the logger .