def start_logger(log_to_file=False,log_to_stream=False,log_to_file_level=logging.INFO,log_to_stream_level=logging.INFO,log_filename=None,log_stream=None,log_rotate=True,log_size=<NUM_LIT>,log_number=<NUM_LIT:3>):
if log_rotate:<EOL><INDENT>log_filename = log_filename or '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>run_time = "<STR_LIT:_>".join(map(str, time.localtime()[<NUM_LIT:0>:<NUM_LIT:5>]))<EOL>log_filename = '<STR_LIT>' % run_time<EOL><DEDENT>root_log = logging.getLogger()<EOL>formatter = logging.Formatter(<EOL>"<STR_LIT>",datefmt='<STR_LIT>')<EOL>root_log.setLevel(logging.DEBUG)<EOL>if log_to_file:<EOL><INDENT>if log_rotate:<EOL><INDENT>file_handler = logging.handlers.RotatingFileHandler(log_filename,maxBytes=log_size, backupCount=log_number)<EOL><DEDENT>else:<EOL><INDENT>file_handler = logging.FileHandler(log_filename, '<STR_LIT:w>')<EOL><DEDENT>file_handler.setLevel(log_to_file_level)<EOL>file_handler.setFormatter(formatter)<EOL>root_log.addHandler(file_handler)<EOL><DEDENT>if log_to_stream:<EOL><INDENT>stream_handler = logging.StreamHandler(log_stream)<EOL>stream_handler.setLevel(log_to_stream_level)<EOL>stream_handler.setFormatter(formatter)<EOL>root_log.addHandler(stream_handler)<EOL><DEDENT>
Configures and starts a logger to monitor the execution of a **PaPy** 
pipeline.

Arguments:

  - log_to_file(``bool``) [default: ``True``] Should we write logging 
    messages into a file?
  - log_to_stream(``bool`` or ``object``) [default: ``False``] Should we 
    print logging messages to a stream? If ``True`` this defaults to 
    ``stderr``. 
  - log_to_file_level(``int``) [default: ``INFO``] The minimum logging 
    level of messages to be written to file. 
  - log_to_screen_level(``int``) [default: ``ERROR``] The minimum logging 
    level of messages to be printed to the stream.
  - log_filename(``str``) [default: ``"PaPy_log"`` or ``"PaPy_log_$TIME$"``]
    Name of the log file. Ignored if "log_to_file" is ``False``.
  - log_rotate(``bool``) [default: ``True``] Should we limit the number of 
    logs? Ignored if "log_to_file" is ``False``.
  - log_size(``int``) [default: ``524288``] Maximum number of ``bytes`` 
    saved in a single log file. Ignored if "log_to_file" is ``False``.
  - log_number(``int``) [default: ``3``] Maximum number of rotated log files
    Ignored if "log_to_file" is ``False``.