Author: justi9
Date: 2008-12-16 11:53:21 -0500 (Tue, 16 Dec 2008)
New Revision: 3007
Modified:
mgmt/trunk/mint/python/mint/tools.py
Log:
Prevent double logging
Modified: mgmt/trunk/mint/python/mint/tools.py
===================================================================
--- mgmt/trunk/mint/python/mint/tools.py 2008-12-16 16:50:39 UTC (rev 3006)
+++ mgmt/trunk/mint/python/mint/tools.py 2008-12-16 16:53:21 UTC (rev 3007)
@@ -64,13 +64,14 @@
sys.exit(0)
level = opts.get("log-level", "warn")
+
+ if "debug" in opts:
+ level = "debug"
+
file = opts.get("log-file", sys.stderr)
-
+
enable_logging("mint", level, file)
- if "debug" in opts:
- enable_logging("mint", "debug", sys.stderr)
-
data = opts.get("data",
"postgresql://cumin@localhost/cumin")
freq = int(opts.get("expire-frequency", 600))
threshold = int(opts.get("expire-threshold", 24 * 3600))
Show replies by date