示例#1
0
def log(message, tags='notset'):

    data = {'message': message, 'tags': tags}

    if config.protocol == 'http':
        return post_http(data, type='log')
    elif config.protocol == 'zeromq':
        from amonpy.protocols.zeromq import zeromq_handler

        return zeromq_handler.post(data, type='log')
示例#2
0
文件: sender.py 项目: daemon13/amonpy
def log(message, tags='notset'):

    data = {'message': message, 'tags': tags}

    if config.protocol == 'http':
       return post_http(data, type='log')
    elif config.protocol == 'zeromq':
       from amonpy.protocols.zeromq import zeromq_handler
       
       return zeromq_handler.post(data, type='log')
示例#3
0
def exception(data):

    if config.protocol == 'http':
        return post_http(data, type='exception')
    elif config.protocol == 'zeromq':
        return zeromq_handler.post(data, type='exception')
示例#4
0
文件: sender.py 项目: daemon13/amonpy
def exception(data):
    
    if config.protocol == 'http':
        return post_http(data, type='exception')
    elif config.protocol == 'zeromq':
        return zeromq_handler.post(data, type='exception')