From 596d43be13156b24325e45b3f3716722c61fafa2 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Mon, 12 May 2014 04:45:41 -0400
Subject: [PATCH] Add session ID (first 8 chars) to the log

---
 program/lib/Roundcube/rcube.php |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php
index f2aeda7..d618fb6 100644
--- a/program/lib/Roundcube/rcube.php
+++ b/program/lib/Roundcube/rcube.php
@@ -1132,6 +1132,11 @@
                 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);

--
Gitblit v1.9.1