From 596d43be13156b24325e45b3f3716722c61fafa2 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Mon, 12 May 2014 10:45:41 +0200 Subject: Add session ID (first 8 chars) to the log --- program/lib/Roundcube/rcube.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php index f2aeda7f0..d618fb64d 100644 --- a/program/lib/Roundcube/rcube.php +++ b/program/lib/Roundcube/rcube.php @@ -1132,6 +1132,11 @@ class rcube return true; } + // add session ID to the log + if ($sess = session_id()) { + $line = '<' . substr($sess, 0, 8) . '> ' . $line; + } + if ($log_driver == 'syslog') { $prio = $name == 'errors' ? LOG_ERR : LOG_INFO; syslog($prio, $line); -- cgit v1.2.3