summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-05-12 10:45:41 +0200
committerAleksander Machniak <alec@alec.pl>2014-05-12 10:45:41 +0200
commit596d43be13156b24325e45b3f3716722c61fafa2 (patch)
tree0a06c121078c64c34454e61d4ec32c42bd0b8b9d
parent06798312daf5392feb08faebd7802229c421c359 (diff)
Add session ID (first 8 chars) to the log
-rw-r--r--program/lib/Roundcube/rcube.php5
1 files changed, 5 insertions, 0 deletions
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);