[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r16880: {projects} Add a configuration option for choosing a logging system. By (projects/gettor)



Author: ioerror
Date: 2008-09-12 21:34:59 -0400 (Fri, 12 Sep 2008)
New Revision: 16880

Modified:
   projects/gettor/gettor_config.py
Log:
Add a configuration option for choosing a logging system.
By default, we don't want to log anything. We set it to None.


Modified: projects/gettor/gettor_config.py
===================================================================
--- projects/gettor/gettor_config.py	2008-09-13 01:18:00 UTC (rev 16879)
+++ projects/gettor/gettor_config.py	2008-09-13 01:34:59 UTC (rev 16880)
@@ -22,6 +22,7 @@
     srcEmail = "gettor@xxxxxxxxxxxxxx"
     distDir = "/var/lib/gettor/pkg/"
     locale = "en"
+    logSubSystem = None
     configFile = "~/.gettorrc"
     config = ConfigParser.ConfigParser()
 
@@ -73,6 +74,11 @@
         else:
             self.config.set("global", "locale", self.locale)
 
+        if self.config.has_option("global", "logSubSystem"):
+            self.lang = self.config.get("global", "logSubSystem")
+        else:
+            self.config.set("global", "logSubSystem", self.logSubSystem)
+
     def printConfiguration(self):
         return self.config.write(sys.stdout)
 
@@ -91,7 +97,10 @@
 
     def getLang(self):
         return self.lang
-        
+
+    def getLogSubSystem(self):
+        return self.logSubSystem
+
 if __name__ == "__main__" :
     c = gettorConf()
     print "# This is a suitable default configuration. Tune to fit your needs."