diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-07-21 16:40:27 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-07-21 16:40:27 +0000 |
| commit | 4927a3af1d3a1d579c1b7e0953cad46f2588f248 (patch) | |
| tree | c0cc22e5887477fdf278dc521c99f23140a546e8 /roundcubemail/program/include | |
| parent | 61b5a6483ace42d0076f78e94e2f4f20c1b03621 (diff) | |
Pipe date string through write_log plugin hook (#1485979)
git-svn-id: https://svn.roundcube.net/trunk@2780 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
| -rw-r--r-- | roundcubemail/program/include/main.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index 3099a7290..ba2f690af 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/program/include/main.inc @@ -995,16 +995,19 @@ function write_log($name, $line) if (empty($CONFIG['log_date_format'])) $CONFIG['log_date_format'] = 'd-M-Y H:i:s O'; + $date = date($CONFIG['log_date_format']); + // trigger logging hook if (is_object($RCMAIL) && is_object($RCMAIL->plugins)) { - $log = $RCMAIL->plugins->exec_hook('write_log', array('name' => $name, 'line' => $line)); + $log = $RCMAIL->plugins->exec_hook('write_log', array('name' => $name, 'date' => $date, 'line' => $line)); $name = $log['name']; $line = $log['line']; + $date = $log['date']; if ($log['abort']) return; } - $log_entry = sprintf("[%s]: %s\n", date($CONFIG['log_date_format']), $line); + $log_entry = sprintf("[%s]: %s\n", $date, $line); if ($CONFIG['log_driver'] == 'syslog') { $prio = $name == 'errors' ? LOG_ERR : LOG_INFO; |
