[Otfbot-svn] r107 - in trunk: . modules

cato- at BerliOS cato-
So Jun 10 22:13:55 CEST 2007


Author: cato-
Date: 2007-06-10 22:13:54 +0200 (Sun, 10 Jun 2007)
New Revision: 107

Modified:
   trunk/modules/rdfMod.py
   trunk/otfbot.py
Log:
some adjustments to the loggingstuff

Modified: trunk/modules/rdfMod.py
===================================================================
--- trunk/modules/rdfMod.py	2007-06-10 19:16:35 UTC (rev 106)
+++ trunk/modules/rdfMod.py	2007-06-10 20:13:54 UTC (rev 107)
@@ -55,7 +55,8 @@
 			if not self.end:
 				for rdfUrl in self.rdfUrls:
 					self.postNews(rdfUrl)
-		self.logger.info("rdfMod: successfully stopped.")
+		# logging would be done after logging-subsys is closed
+		#self.logger.info("rdfMod: successfully stopped.")
 
 	def postNews(self, rdfUrl):
 		unread =[]

Modified: trunk/otfbot.py
===================================================================
--- trunk/otfbot.py	2007-06-10 19:16:35 UTC (rev 106)
+++ trunk/otfbot.py	2007-06-10 20:13:54 UTC (rev 107)
@@ -76,10 +76,11 @@
 		pass
 
 import logging
+import logging.handlers
 # Basic settings for logging
 # logging to logfile
-#filelogger = logging.RotatingFileHandler('otfbot.log','a',20480,5)
-filelogger = logging.FileHandler('otfbot.log','a')
+filelogger = logging.handlers.RotatingFileHandler('otfbot.log','a',20480,5)
+#filelogger = logging.FileHandler('otfbot.log','a')
 logging.getLogger('').setLevel(logging.DEBUG)
 formatter = logging.Formatter('%(asctime)s %(name)-18s %(module)-18s %(levelname)-8s %(message)s')
 filelogger.setFormatter(formatter)
@@ -453,7 +454,7 @@
 		self._apirunner("topicUpdated",{"user":user,"channel":channel,"newTopic":newTopic})
 
 	def lineReceived(self, line):
-		# self.logger.debug(str(line))
+		self.logger.debug(str(line))
 		# adding a correct hostmask for join, part and quit
 		if line.split(" ")[1] == "JOIN" and line[1:].split(" ")[0].split("!")[0] != self.nickname:
 			self.userJoined(line[1:].split(" ")[0],string.lower(line.split(" ")[2][1:]))




Mehr Informationen über die Mailingliste Otfbot-dev