create_logger(logfilename=None,
extension='-driver.log',
related_filename=None,
verbose=False,
width=80)
|
|
Create a logger that can be used for logging information to a file
If running under job control, the log file this logger writes to will
be added to the backend as a Log File.
- Parameters:
logfilename (str) - The name of the log file the logger should write to. If not
supplied, the name will be based off the Job name if running
under job control or based off of the basename of a related_file
if not. As a last resort, the logfile name will use 'logfile' as
the base name.
extension (str) - The extension to add to the file name if logfilename is not
supplied.
related_filanem - The basename of this filename will be used as the base of the log
file name IF logfilename is not supplied directly and we are not
running under job control.
verbose (bool) - Whether to enable verbose logging
width (int) - Text width of the file
related_filename (str)
- Returns: (
logging.Logger , str)
- The logger and the name of the file it logs to.
|