def create(logger_name, logfile='<STR_LIT>'):
logger = logging.getLogger(logger_name)<EOL>logger.setLevel(logging.DEBUG)<EOL>logfile = logging.FileHandler(logfile)<EOL>logfile_formatter = logging.Formatter('<STR_LIT>')<EOL>logfile.setFormatter(logfile_formatter)<EOL>logger.addHandler(logfile)<EOL>console = logging.StreamHandler()<EOL>console.setLevel(logging.INFO)<EOL>formatter = logging.Formatter('<STR_LIT>')<EOL>console.setFormatter(formatter)<EOL>logger.addHandler(console)<EOL>return logger<EOL>
Create a top level logger.

    - The file logger logs everything (including DEBUG).
    - The console logger only logs INFO and above.

    Logging to a file and the console.

    See http://docs.python.org/library/logging.html?#logging-to-multiple-destinations

    The top level logger of the library is named 'gromacs'.  Note that
    we are configuring this logger with console output. If the root
    logger also does this then we will get two output lines to the
    console. We'll live with this because this is a simple
    convenience library...