Mantis - Resin
Viewing Issue Advanced Details
4422 minor always 03-02-11 13:19 03-02-11 14:33
ferg  
ferg  
normal  
closed  
fixed  
none    
none 4.0.16  
0004422: access-log enhancement
(rep by Steffen Busch)


Please find below the suggested changes for two files:


Index: modules/resin/src/com/caucho/server/log/AccessLog.java
===================================================================
--- modules/resin/src/com/caucho/server/log/AccessLog.java (revision 7914)
+++ modules/resin/src/com/caucho/server/log/AccessLog.java (working copy)
@@ -319,7 +319,7 @@
       case 'r': case 's':
       case 'T': case 'D': case 'o':
       case 'u': case 'U':
- case 'v':
+ case 'v': case 'S':
         if (cb.length() > 0)
           segments.add(new Segment(this, Segment.TEXT, cb.toString()));
         cb.clear();
@@ -505,6 +505,15 @@
         else
           offset = print(buffer, offset, value);
         break;
+
+ // Session id, specified with the request
+ case 'S':
+ value = request.getRequestedSessionId();
+ if (! request.isRequestedSessionIdValid() || value == null)
+ buffer[offset++] = (byte) '-';
+ else
+ offset = print(buffer, offset, value);
+ break;

       case 'r':
         offset = print(buffer, offset, request.getMethod());




Index: doc/reference.xtp
===================================================================
--- doc/reference.xtp (revision 7914)
+++ doc/reference.xtp (working copy)
@@ -171,6 +171,8 @@
     <td>request URL</td></tr>
 <tr><td>%s</td>
     <td>status code</td></tr>
+<tr><td>%S</td>
+ <td>SessionId specified with the Request</td></tr>
 <tr><td>%{<var>xxx</var>}t</td>
     <td>request date with optional time format string.</td></tr>
 <tr><td>%T</td>




Notes
(0005103)
ferg   
03-02-11 14:33   
server/02ef