Ejemplo n.º 1
0
def setup_logging():
    logger = setup_file_logging('update_repositories', LOG_FILENAME)
    handler = logging.StreamHandler()
    handler.setLevel(logging.DEBUG)
    formatter = logging.Formatter('%(asctime)s %(name)s: %(levelname)s: %(message)s')
    handler.setFormatter(formatter)
    logger.addHandler(handler)

    return logger
Ejemplo n.º 2
0
def setup_logging():
    logger = setup_file_logging('post_commit_hook', LOG_FILENAME)
    # mail
    mail_handler = logging.handlers.SMTPHandler(u'localhost',
                                                u'*****@*****.**',
                                                LOG_EMAIL_ADDRESSES,
                                                u'Error on git_post_commit')
    mail_handler.setLevel(logging.WARNING)
    logger.addHandler(mail_handler)

    return logger
Ejemplo n.º 3
0
def setup_logging():
    logger = setup_file_logging('post_commit_hook', LOG_FILENAME)
    # mail
    mail_handler = logging.handlers.SMTPHandler(
        u'localhost',
        u'*****@*****.**',
        LOG_EMAIL_ADDRESSES,
        u'Error on git_post_commit')
    mail_handler.setLevel(logging.WARNING)
    logger.addHandler(mail_handler)

    return logger