aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xIRC/asybot.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/IRC/asybot.py b/IRC/asybot.py
index 9021d22..99cb2fe 100755
--- a/IRC/asybot.py
+++ b/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):