Add timestamps to log messages.
authorJan Schneider <jan@horde.org>
Thu, 8 Jan 2009 18:27:24 +0000 (19:27 +0100)
committerJan Schneider <jan@horde.org>
Thu, 8 Jan 2009 18:27:24 +0000 (19:27 +0100)
framework/Imap_Client/lib/Horde/Imap/Client/Socket.php

index 238a908..749ab4b 100644 (file)
@@ -2976,7 +2976,7 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base
         }
 
         if ($this->_debug) {
-            fwrite($this->_debug, 'C: ' . (empty($options['debug']) ? $query : $options['debug']) . "\n");
+            fwrite($this->_debug, 'C (' . microtime(true) . '): ' . (empty($options['debug']) ? $query : $options['debug']) . "\n");
         }
 
         fwrite($this->_stream, $query . "\r\n");
@@ -3028,7 +3028,7 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base
         }
 
         if ($this->_debug) {
-            fwrite($this->_debug, 'S: ' . $read . "\n");
+            fwrite($this->_debug, 'S (' . microtime(true) . '): ' . $read . "\n");
         }
 
         $read = explode(' ', $read, 3);
@@ -3117,7 +3117,7 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base
                         $debug_line = $binary
                             ? "[BINARY DATA - $literal_len bytes]"
                             : $line;
-                        fwrite($this->_debug, 'S: ' . $debug_line . "\n");
+                        fwrite($this->_debug, 'S (' . microtime(true) . ': ' . $debug_line . "\n");
                     }
                 } while (true);