[Svn] r3901 - trunk/roundcubemail/program/include

trac at roundcube.net trac at roundcube.net
Mon Aug 23 12:23:20 CEST 2010


Author: alec
Date: 2010-08-23 05:23:20 -0500 (Mon, 23 Aug 2010)
New Revision: 3901

Modified:
   trunk/roundcubemail/program/include/main.inc
Log:
- Don't add date to log when using syslog


Modified: trunk/roundcubemail/program/include/main.inc
===================================================================
--- trunk/roundcubemail/program/include/main.inc	2010-08-23 06:21:52 UTC (rev 3900)
+++ trunk/roundcubemail/program/include/main.inc	2010-08-23 10:23:20 UTC (rev 3901)
@@ -1117,14 +1117,14 @@
       return true;
   }
  
-  $log_entry = sprintf("[%s]: %s\n", $date, $line);
-
   if ($CONFIG['log_driver'] == 'syslog') {
     $prio = $name == 'errors' ? LOG_ERR : LOG_INFO;
-    syslog($prio, $log_entry);
+    syslog($prio, $line);
     return true;
   }
   else {
+    $line = sprintf("[%s]: %s\n", $date, $line);
+
     // log_driver == 'file' is assumed here
     if (empty($CONFIG['log_dir']))
       $CONFIG['log_dir'] = INSTALL_PATH.'logs';
@@ -1132,7 +1132,7 @@
     // try to open specific log file for writing
     $logfile = $CONFIG['log_dir'].'/'.$name;
     if ($fp = @fopen($logfile, 'a')) {
-      fwrite($fp, $log_entry);
+      fwrite($fp, $line);
       fflush($fp);
       fclose($fp);
       return true;

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list