How write at access log only part of $request?

Hi All,

I have next question:
is it possible at nginx access log file decrease stored $request to
smaller
size?

We have very big traffic, and $request part is significant for us only
at
some start substring of $request value.

Is it possible write at log for example some kind of SubString(
$request, 0,
someLengthFromStart ) instead of full $request length ?

Thanks

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,256976,256976#msg-256976

Hello!

On Mon, Mar 02, 2015 at 05:32:34AM -0500, ertyi wrote:

someLengthFromStart ) instead of full $request length ?
For example, you can do something like this using map:

map $request $request_truncated {
“~(?.{0,100})” $tmp;
}

See log_format directive description for details on how to
configure custom access logging formats.

http://nginx.org/r/map
http://nginx.org/r/log_format


Maxim D.
http://nginx.org/

thanks very much - checking )

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,256976,256984#msg-256984

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs