How to set ENV variable to an apache log directive?

How to set ENV variable to an apache log directive?

am 24.01.2010 05:39:46 von jbiskofski

--00504502af8271d794047de1a464
Content-Type: text/plain; charset=ISO-8859-1

Hello,

Im using Apache 2.0.63 and a module called mod-log-firstbyte that enables a
log
directive %F which is very similar %D. The difference is instead of
storing the time it takes to serve the request, it stores the time
between the request being read to the first byte being served.
( http://code.google.com/p/mod-log-firstbyte/ )

Id like to have access to this variable in my web applications. Im
thinking theres a way to use SetEnvIf to set this value, but am unsure
how to proceed.

I unsuccessfully tried this and a few variations :

SetEnvIf Request_URI .* FIRSTBYTE_TIME=%F

I was unable to gather any more clues from the SetEnvIf documentation.

Which I understand as : if the Request_URI matches .* (anything) set
the ENV variable FIRSTBYTE_TIME to the value of %F.

I ended up with an ENV variable set literally to '%F' instead of the
value.

Any help/insight would be very much appreciated.

Thanks!

-Jose Biskofski

--00504502af8271d794047de1a464
Content-Type: text/html; charset=ISO-8859-1

Hello,



Im using Apache 2.0.63 and a module called mod-log-firstbyte that enables a log

directive %F which is very similar %D. The difference is instead of

storing the time it takes to serve the request, it stores the time

between the request being read to the first byte being served.

( )


Id like to have access to this variable in my web applications. Im

thinking theres a way to use SetEnvIf to set this value, but am unsure

how to proceed.



I unsuccessfully tried this and a few variations :



SetEnvIf Request_URI .* FIRSTBYTE_TIME=%F

I was unable to gather any more clues from the SetEnvIf documentation.



Which I understand as : if the Request_URI matches .* (anything) set

the ENV variable FIRSTBYTE_TIME to the value of %F.



I ended up with an ENV variable set literally to '%F' instead of the

value.



Any help/insight would be very much appreciated.



Thanks!



-Jose Biskofski

--00504502af8271d794047de1a464--

Re: How to set ENV variable to an apache log directive?

am 24.01.2010 13:12:00 von Dan Poirier

>>>>> "jbiskofski" == jbiskofski writes:

jbiskofski> Hello, Im using Apache 2.0.63 and a module called
jbiskofski> mod-log-firstbyte that enables a log directive %F which
jbiskofski> is very similar %D. The difference is instead of storing
jbiskofski> the time it takes to serve the request, it stores the
jbiskofski> time between the request being read to the first byte
jbiskofski> being served. (
jbiskofski> http://code.google.com/p/mod-log-firstbyte/ )

jbiskofski> Id like to have access to this variable in my web
jbiskofski> applications. Im thinking theres a way to use SetEnvIf
jbiskofski> to set this value, but am unsure how to proceed.

There's not really a variable called %F. mod-log-firstbyte is just
computing that value when it sees %F in the log format string.

It's not clear that what you are asking is possible anyway. When your
web application is invoked, the first byte of the response hasn't been
served yet, so there's no way to know the value of %F.

Dan


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org