diff -r 219eb584e133 MoinMoin/request.py
--- a/MoinMoin/request.py	Sun Nov 05 21:41:16 2006 +0100
+++ b/MoinMoin/request.py	Sun Nov 05 22:58:08 2006 +0100
@@ -762,6 +762,17 @@ class RequestBase(object):
         msg = '[%s] %s\n' % (time.asctime(), msg)
         sys.stderr.write(msg)
     
+    def timing_log(self, msg):
+        """ Log to stderr, which may be error.log """
+        msg = msg.strip()
+        # Encode unicode msg
+        if isinstance(msg, unicode):
+            msg = msg.encode(config.charset)
+        # Add time stamp
+        msg = '[%s] %s\n' % (time.asctime(), msg)
+        self.timing_logfile.write(msg)
+        self.timing_logfile.flush()
+    
     def write(self, *data):
         """ Write to output stream.
         """
@@ -1066,6 +1077,10 @@ class RequestBase(object):
             
             action = self.form.get('action', [None])[0]
 
+            if 1:
+                pid = os.getpid()
+                self.timing_log("pid %d %s %s" % (pid, action, self.url))
+
             # The last component in path_info is the page name, if any
             path = self.getPathinfo()
             if path.startswith('/'):
@@ -1169,6 +1184,23 @@ space between words. Group page name is 
             pass
         except Exception, err:
             self.fail(err)
+
+        if 1:
+            pid = os.getpid()
+            self.clock.stop('total')
+            total_secs = self.clock.timings['total']
+            if total_secs > 50:
+                action += '!!!!!'
+            elif total_secs > 20:
+                action += '!!!!'
+            elif total_secs > 10:
+                action += '!!!'
+            elif total_secs > 2:
+                action += '!!'
+            total = self.clock.value('total')
+            indicator = self.page.exists() and '+' or '-'
+            action = indicator + action
+            self.timing_log("%s pid %d %s %s" % (total, pid, action, self.url))
 
         return self.finish()
 
@@ -2041,6 +2073,13 @@ class RequestFastCGI(RequestBase):
         #sys.stderr.write(pformat(more_headers))
         #sys.stderr.write(pformat(self.user_headers))
 
+    def open_logs(self):
+        # create log file for catching stderr output
+        if not self.opened_logs:
+            sys.stderr = open(os.path.join(self.cfg.data_dir, 'error.log'), 'at')
+            self.timing_logfile = open('/tmp/moin-timing.log', 'at')
+            self.opened_logs = 1
+
 # WSGI --------------------------------------------------------------
 
 class RequestWSGI(RequestBase):
