LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > Format of log

Reply
 
Thread Tools Display Modes
  #1  
Old 06-27-2012, 11:21 AM
damienm damienm is offline
New Member
 
Join Date: Jun 2012
Posts: 2
Default Format of log

Hi,

for the log format the server states

"The syntax of log format is compatible with Apache 2.0's custom log format."

However it appears some things are unsupported, or have bugs?

Per the apache 2.0 documentation there are some things not functioning.
http://httpd.apache.org/docs/2.0/mod...g.html#formats

1) I am interested in outputting environmental variables after setting them in a rewrite, for example:

%{FOOBAR}e

From apache:
"%...{FOOBAR}e The contents of the environment variable FOOBAR"

I can never get the variable output in the log though I can confirm it is set in the environment.

2) I also wish to use the < > modifiers with %U

%>U and %<U

From apache:
"The modifiers "<" and ">" can be used for requests that have been internally redirected to choose whether the original or final (respectively) request should be consulted. By default, the % directives %s, %U"

The modifiers seem to have no effect.

cheers for your assistance
Reply With Quote
  #2  
Old 06-27-2012, 06:20 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,220
1) try in .htaccess

RewriteRule \.php$ - [E=isPHP:1]

this set environment variable "isPHP"

in log format, add %{isPHP}e

will look into 2) later.
Reply With Quote
  #3  
Old 06-27-2012, 08:41 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,220
my test result regarding 2) on latest 4.1.13:

%<U --- not work, will simply leave U in log file
%U equal to %>U, the final request URI.

test env:
.htaccess:
RewriteRule abc.html test.php

when access 127.0.0.1/abc.html?c=3&d=5, the log for "%r" %<U %U %>U is:
"GET /abc.html?c=3&d=5 HTTP/1.1" U /test.php /test.php
i.e.,
"%r" --> "GET /abc.html?c=3&d=5 HTTP/1.1"
%<U --> U
%U --> /test.php
%>U --> /test.php
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:41 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.