|
From: <ni...@us...> - 2010-11-14 09:55:04
|
Revision: 119
http://openautomation.svn.sourceforge.net/openautomation/?rev=119&view=rev
Author: nilss1
Date: 2010-11-14 09:54:53 +0000 (Sun, 14 Nov 2010)
Log Message:
-----------
add defaultencoding option
Modified Paths:
--------------
PyWireGate/trunk/WireGate.py
Modified: PyWireGate/trunk/WireGate.py
===================================================================
--- PyWireGate/trunk/WireGate.py 2010-11-14 09:53:57 UTC (rev 118)
+++ PyWireGate/trunk/WireGate.py 2010-11-14 09:54:53 UTC (rev 119)
@@ -62,7 +62,8 @@
'datastore' : "%s/datastore.db" % self.scriptpath,
'logfile' : "%s/wiregated.log" % self.scriptpath,
'errorlog' : "%s/wiregated-error.log" % self.scriptpath,
- 'loglevel': 'info'
+ 'loglevel': 'info',
+ 'defaultencoding': 'UTF-8'
}
self.checkconfig("WireGate",defaultconfig)
@@ -117,7 +118,6 @@
def run(self):
- import time
for configpart in self.config.keys():
if "connector" in self.config[configpart]:
name = configpart
@@ -249,7 +249,7 @@
logger.setLevel(level)
if filename:
## python handle logrotating
- handler = log.logging.handlers.TimedRotatingFileHandler(filename,'MIDNIGHT',encoding='utf-8',backupCount=7)
+ handler = log.logging.handlers.TimedRotatingFileHandler(filename,'MIDNIGHT',encoding=self.WG.config['WireGate']['defaultencoding'],backupCount=7)
## Handler if logrotate handles Logfiles
#handler = logging.handlers.WatchedFileHandle(filename)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|