[tor-commits] r24530: {arm} Dropping config query cache hits from the log. (in arm/trunk: . src/interface/connections src/util)
Damian Johnson
atagar1 at gmail.com
Sat Apr 2 01:47:53 UTC 2011
Author: atagar
Date: 2011-04-02 01:47:53 +0000 (Sat, 02 Apr 2011)
New Revision: 24530
Modified:
arm/trunk/armrc.sample
arm/trunk/src/interface/connections/connPanel.py
arm/trunk/src/util/torTools.py
Log:
Dropping config query cache hits from the log.
Modified: arm/trunk/armrc.sample
===================================================================
--- arm/trunk/armrc.sample 2011-04-02 01:35:15 UTC (rev 24529)
+++ arm/trunk/armrc.sample 2011-04-02 01:47:53 UTC (rev 24530)
@@ -233,6 +233,7 @@
log.torGetInfo DEBUG
log.torGetInfoCache NONE
log.torGetConf DEBUG
+log.torGetConfCache NONE
log.torSetConf INFO
log.torEventTypeUnrecognized NOTICE
log.torPrefixPathInvalid NOTICE
Modified: arm/trunk/src/interface/connections/connPanel.py
===================================================================
--- arm/trunk/src/interface/connections/connPanel.py 2011-04-02 01:35:15 UTC (rev 24529)
+++ arm/trunk/src/interface/connections/connPanel.py 2011-04-02 01:47:53 UTC (rev 24530)
@@ -77,10 +77,6 @@
for entry in self._entries:
if isinstance(entry, connEntry.ConnectionEntry):
entry.getLines()[0].isInitialConnection = True
-
- # TODO: should listen for tor shutdown
- # TODO: hasn't yet had its pausing functionality tested (for instance, the
- # key handler still accepts events when paused)
def setPaused(self, isPause):
"""
Modified: arm/trunk/src/util/torTools.py
===================================================================
--- arm/trunk/src/util/torTools.py 2011-04-02 01:35:15 UTC (rev 24529)
+++ arm/trunk/src/util/torTools.py 2011-04-02 01:47:53 UTC (rev 24530)
@@ -75,6 +75,7 @@
"log.torGetInfo": log.DEBUG,
"log.torGetInfoCache": None,
"log.torGetConf": log.DEBUG,
+ "log.torGetConfCache": None,
"log.torSetConf": log.INFO,
"log.torPrefixPathInvalid": log.NOTICE,
"log.bsdJailFound": log.INFO,
@@ -569,9 +570,12 @@
elif fetchType == "map": cacheValue = dict(result)
self._cachedConf[(param.lower(), fetchType)] = cacheValue
- runtimeLabel = "cache fetch" if isFromCache else "runtime: %0.4f" % (time.time() - startTime)
- msg = "GETCONF %s (%s)" % (param, runtimeLabel)
- log.log(CONFIG["log.torGetConf"], msg)
+ if isFromCache:
+ msg = "GETINFO %s (cache fetch)" % param
+ log.log(CONFIG["log.torGetConfCache"], msg)
+ else:
+ msg = "GETINFO %s (runtime: %0.4f)" % (param, time.time() - startTime)
+ log.log(CONFIG["log.torGetConf"], msg)
self.connLock.release()
More information about the tor-commits
mailing list