summaryrefslogtreecommitdiffstats
path: root/Reaktor
diff options
context:
space:
mode:
authorroot <root@krebs>2011-09-14 20:36:40 +0200
committerroot <root@krebs>2011-09-14 20:36:40 +0200
commita8ab9dbc2de0ee3aa744485255360b5e5e8b45cd (patch)
treef168b9efa058a6ab5f035f94a59631f809ccc4c8 /Reaktor
parentd39f90f7c19b930b6b5bde0bbb716cbbbdb1d633 (diff)
Reaktor/asybot: add syslog logging feature
Diffstat (limited to 'Reaktor')
-rwxr-xr-xReaktor/IRC/asybot.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Reaktor/IRC/asybot.py b/Reaktor/IRC/asybot.py
index 9021d22f..99cb2fe6 100755
--- a/Reaktor/IRC/asybot.py
+++ b/Reaktor/IRC/asybot.py
@@ -15,8 +15,12 @@ from datetime import datetime as date, timedelta
from sys import exit
from re import split, search
-import logging
-log = logging.getLogger()
+import logging,logging.handlers
+log = logging.getLogger('asybot')
+hdlr = logging.handlers.SysLogHandler(facility=logging.handlers.SysLogHandler.LOG_DAEMON)
+formatter = logging.Formatter( '%(filename)s: %(levelname)s: %(message)s')
+hdlr.setFormatter(formatter)
+log.addHandler(hdlr)
class asybot(asychat):
def __init__(self, server, port, nickname, targets, **kwargs):