def setup_file_logger(filename, formatting, log_level):
logger = logging.getLogger()<EOL>if logger.handlers:<EOL><INDENT>logger.removeHandler(logger.handlers[<NUM_LIT:0>])<EOL><DEDENT>handler = logging.FileHandler(filename)<EOL>logger.addHandler(handler)<EOL>formatter = logging.Formatter(*formatting)<EOL>handler.setFormatter(formatter)<EOL>logger.setLevel(log_level)<EOL>handler.setLevel(log_level)<EOL>return logger<EOL>
A helper function for creating a file logger.
Accepts arguments, as it is used in Status and LoggingWriter.