From 0ad27c384033977c86427011785d0182af91df4a Mon Sep 17 00:00:00 2001 From: alecpl Date: Thu, 23 Apr 2009 18:12:42 +0000 Subject: - Added log_date_format option (#1485709) --- program/include/main.inc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'program/include/main.inc') diff --git a/program/include/main.inc b/program/include/main.inc index b3d0dab2a..1149429ff 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -862,10 +862,11 @@ function write_log($name, $line) if (!is_string($line)) $line = var_export($line, true); - - $log_entry = sprintf("[%s]: %s\n", - date("d-M-Y H:i:s O", mktime()), - $line); + + if (empty($CONFIG['log_date_format'])) + $CONFIG['log_date_format'] = 'd-M-Y H:i:s O'; + + $log_entry = sprintf("[%s]: %s\n", date($CONFIG['log_date_format']), $line); if ($CONFIG['log_driver'] == 'syslog') { if ($name == 'errors') -- cgit v1.2.3