def get_file_logger(filename, level=logging.INFO):
 filepath = os.path.join(settings.LOG_ROOT, filename)
 handler = logging.FileHandler(filepath)
 handler.setLevel(level)
 logger = logging.getLogger(filepath)
 logger.addHandler(handler)
 logger.setLevel(level)
 return logger

def get_file_logger ( filename , level = logging . INFO ) : filepath = os . path . join ( settings . LOG_ROOT , filename ) handler = logging . FileHandler ( filepath ) handler . setLevel ( level ) logger = logging . getLogger ( filepath ) logger . addHandler ( handler ) logger . setLevel ( level ) return logger
return a logger that uses a file handler for the given filename but in the log_root .