コード例 #1
0
ファイル: clauselog.py プロジェクト: seecr/gustos-meresco
 def executeQuery(self, query, **kwargs):
     clauses = 0
     for expr in query.iter():
         if not expr.operator:
             clauses += 1
     collectLog(dict(cqlClauses=clauses))
     response = yield self.any.executeQuery(query=query, **kwargs)
     return response
コード例 #2
0
 def handleRequest(**kwarg):
     collectLog(dict(key='value'))
     yield okXml
     yield '<sru></sru>'
コード例 #3
0
 def handleRequest(**kwarg):
     collectLog(dict(key='value'))
     yield okXml
     yield '<sru></sru>'
コード例 #4
0
 def something(this):
     collectLog(dict(count=1))
コード例 #5
0
 def testCollectLog(self):
     __callstack_var_logCollector__ = LogCollector._logCollector()
     collectLog(dict(key='value1', key2='value2'))
     collectLog(dict(key='value3'))
     self.assertEquals(dict(key=['value1', 'value3'], key2=['value2']), __callstack_var_logCollector__)
コード例 #6
0
 def logMe(self, argument):
     collectLog(dict(logArgument=argument))
     return self.call.logMe(argument=argument)
コード例 #7
0
 def testCollectLogWithoutLogCollectorSet(self):
     # AttributeError is a good thing, calling local(...) without result can be expensive!
     self.assertRaises(AttributeError, lambda: collectLog(dict(key='value1', key2='value2')))