rollbar/__init__.py
def _create_agent_log():
    """
    Creates .rollbar log file for use with rollbar-agent
    """
    log_file = SETTINGS['agent.log_file']
    if not log_file.endswith('.rollbar'):
        log.error("Provided agent log file does not end with .rollbar, which it must. "
                  "Using default instead.")
        log_file = DEFAULTS['agent.log_file']

    retval = logging.getLogger('rollbar_agent')
    handler = logging.FileHandler(log_file, 'a', 'utf-8')
    formatter = logging.Formatter('%(message)s')
    handler.setFormatter(formatter)
    retval.addHandler(handler)
    retval.setLevel(logging.WARNING)
    return retval
def _create_agent_log():
    log_file = SETTINGS['agent.log_file']
    if not log_file.endswith('.rollbar'):
        log.error("Provided agent log file does not end with .rollbar, which it must. "
                  "Using default instead.")
        log_file = DEFAULTS['agent.log_file']

    retval = logging.getLogger('rollbar_agent')
    handler = logging.FileHandler(log_file, 'a', 'utf-8')
    formatter = logging.Formatter('%(message)s')
    handler.setFormatter(formatter)
    retval.addHandler(handler)
    retval.setLevel(logging.WARNING)
    return retval
def _create_agent_log ( ) : log_file = SETTINGS [ 'agent.log_file' ] if not log_file . endswith ( '.rollbar' ) : log . error ( "Provided agent log file does not end with .rollbar, which it must. " "Using default instead." ) log_file = DEFAULTS [ 'agent.log_file' ] retval = logging . getLogger ( 'rollbar_agent' ) handler = logging . FileHandler ( log_file , 'a' , 'utf-8' ) formatter = logging . Formatter ( '%(message)s' ) handler . setFormatter ( formatter ) retval . addHandler ( handler ) retval . setLevel ( logging . WARNING ) return retval
Creates .rollbar log file for use with rollbar-agent
Creates . rollbar log file for use with rollbar - agent