[Twisted-web] disabling logging in Nevow

Manlio Perillo manlio_perillo at libero.it
Thu Apr 5 16:22:05 CDT 2007


Since I'm using nginx to serve a Nevow application via mod_proxy I do 
not need logging in Nevow.

I have disabled logging changing a few line of code in
appserver.NevowRequest and appserver.NevowSite:

--- appserver.old.py    2007-04-05 23:03:02.000000000 +0200
+++ appserver.py        2007-04-05 23:04:03.000000000 +0200
@@ -156,8 +156,8 @@
          if pageContext is not errorMarker:
              return defer.maybeDeferred(
                  pageContext.tag.renderHTTP, pageContext
-            ).addBoth(
-                self._cbSetLogger, pageContext
+#            ).addBoth(
+#                self._cbSetLogger, pageContext
                  processingFailed, self, pageContext
@@ -306,6 +306,7 @@

      def log(self, request):
+        return
          if request._logger is None:
              server.Site.log(self, request)

Unfortunately I have noted (using Apache Bench) that there are very 
little performance improvements...

Regards  Manlio Perillo

More information about the Twisted-web mailing list