changeset 4300:867da7983aba

Remove logging calls on proxy methods (performance hog)
author Florian Krupicka <florian.krupicka@googlemail.com>
date Mon, 11 Aug 2008 01:36:41 +0200
parents 1d3d282130c8
children c689dfa55de1
files MoinMoin/web/contexts.py
diffstat 1 files changed, 0 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/web/contexts.py	Sun Aug 10 20:15:32 2008 +0200
+++ b/MoinMoin/web/contexts.py	Mon Aug 11 01:36:41 2008 +0200
@@ -47,7 +47,6 @@
         property.__init__(self, self.get, self.set, self.delete)
 
     def get(self, obj):
-        logging.debug("GET: '%s' on '%r'", self.name, obj)
         if self.full_name in obj.environ:
             res = obj.environ[self.full_name]
         else:
@@ -61,11 +60,9 @@
         return res
 
     def set(self, obj, value):
-        logging.debug("SET: '%s' on '%r' to '%r'", self.name, obj, value)
         obj.environ[self.full_name] = value
 
     def delete(self, obj):
-        logging.debug("DEL: '%s' on '%r'", self.name, obj)
         del obj.environ[self.full_name]
 
     def __repr__(self):
@@ -168,9 +165,6 @@
 
     def write(self, *data):
         """ Write to output stream. """
-        if len(data) > 1:
-            logging.warning("Some code still uses write with multiple arguments, "
-                            "consider changing this soon")
         self.request.stream.writelines(data)
 
     # implementation of methods expected by RequestBase
@@ -384,9 +378,6 @@
                     ActionMixin, PageMixin, FormatterMixin):
     """ Context to act during the rendering phase. """
     def write(self, *data):
-        if len(data) > 1:
-            logging.warning("Some code still uses write with multiple arguments, "
-                            "consider changing this soon")
         self.request.stream.writelines(data)
 
 # TODO: extend xmlrpc context
@@ -413,9 +404,6 @@
         request.url = url
 
     def write(self, *data):
-        if len(data) > 1:
-            logging.warning("Some code still uses write with multiple arguments, "
-                            "consider changing this soon")
         for d in data:
             if isinstance(d, unicode):
                 d = d.encode(config.charset)