Exemplo n.º 1
0
Arquivo: log.py Projeto: Answeror/aip
def main():
    try:
        from setproctitle import setproctitle
        setproctitle('aiplog')
    except:
        print('no setproctitle')

    sub = RedisSub()
    with logbook.NullHandler().applicationbound():
        with handle('debug'):
            with handle('info'):
                with handle('error'):
                    sub.dispatch_forever()