Commits

Adrian Dries  committed b5a9da6

less noisy logging

  • Participants
  • Parent commits 3e559d6

Comments (0)

Files changed (2)

File fenton/ext/crowd.py

 
         ttl = int(app.config.get('security.verify.ttl') or 0)
         if now - previous < ttl:
-            logging.log.debug('%d within TTL=%d, assuming authenticated', now - previous, ttl)
             return True
         token = context.request.cookies.get(cc.cookie_name)
         if not token:
-            logging.log.debug('No token!')
             raise security.NotAuthenticated
         u = context.request.user_agent
         r = context.request.remote_addr
         if not cc.isValidPrincipalToken(token, u, r):
-            logging.log.debug('Expired or invalid token: %s', token)
             context.request.user = security.ANONYMOUS
             raise security.NotAuthenticated
         self.touch()
         return xml
 
     def call(self, action, payload):
-
-        logging.log.info('CALL:%s' % action)
         rq = urllib2.Request(self.url)
         rq.add_header('SOAPAction', action)
         rq.add_header('Content-Type', 'text/xml')
-
         envelope = self.el('Envelope')
         body = self.el('Body', envelope)
         body.append(payload)
-
         response = self.send(rq, etree.tostring(envelope))
         if not response:
             raise SoapError('Empty response')

File fenton/web.py

                 continue
             t = util.timer() - t
             if t > max_age:
-                self.log('Purging old %s age=%s', id, int(t))
                 del self.stored_contexts[id]
 
     @util.property
         else:
             url = request.url.replace(request.host_url, '')
             logging.log.info('%s %s', request.method, url)
-            logging.log.info('%s', request.params)
+            if request.params:
+                logging.log.info('%s', request.params)
 
         try:
             response = self.respond(request)