# Log request only when they reached a size

**URL:** <https://www.ruby-forum.com/t/log-request-only-when-they-reached-a-size/214150>\
**Category:** NGINX\
**Created:** [November 23, 2011, 11:56am UTC](https://www.ruby-forum.com/t/log-request-only-when-they-reached-a-size/214150 "2011-11-23T11:56:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [November 23, 2011, 11:56am UTC](https://www.ruby-forum.com/t/log-request-only-when-they-reached-a-size/214150/1 "2011-11-23T11:56:58Z")

</div>

Dear list!

I’m new here, so I just hope I’m following the rules.

I would like to send a patch for http\_log\_module which I made for  
version nginx-1.0.10.

My company is in adserving business and it is important for us to log  
the big requests with the access\_log feature. But we were unable to do  
that with nginx, because logging all the requests would produce too much  
I/O load on our servers.

So I made a patch for http\_log\_module to accept a `size` parameter which  
is optional (the last parameter after the `buffer`). If this `size` is  
provided nginx logs only the big enough requests with access\_log (checks  
for `body_bytes_sent`).

I hope you find it useful and you will include this in the upstream.
