From a7d51630981d0bbf68bfa1fa059cd56d3fc634ce Mon Sep 17 00:00:00 2001 From: Guillaume Mazoyer Date: Wed, 24 Sep 2014 15:04:36 +0200 Subject: Log format can be configured. The format for each log can be configured with the configuration option defined by $config['logs']['format']. %D is for the time, %R is for the requester IP address, %H is for the host on which the command has been executed and %C is for the command. Warning! The configuration option to choose the logs file has been moved from $config['misc']['logs'] to $config['logs']['file']. --- includes/utils.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'includes/utils.php') diff --git a/includes/utils.php b/includes/utils.php index 01b034c..ebbea2c 100644 --- a/includes/utils.php +++ b/includes/utils.php @@ -271,8 +271,8 @@ function fqdn_to_ip_address($fqdn) { function log_to_file($log) { global $config; - $log = '['.date("Y-m-d H:i:s").'] '.$log."\n"; - file_put_contents($config['misc']['logs'], $log, FILE_APPEND | LOCK_EX); + $log .= "\n"; + file_put_contents($config['logs']['file'], $log, FILE_APPEND | LOCK_EX); } // End of utils.php -- cgit v1.2.3