Francis Daly
May 11, 2016 03:38AM
On Wed, May 11, 2016 at 01:39:14AM -0400, meteor8488 wrote:

> log_format plog '$remote_addr - $remote_user [$time_local] "$request" '
> '$status $body_bytes_sent "$http_referer" '
> '"$http_user_agent" "$http_x_forwarded_for" "$request_body"';

What do you think that the last element of that log_format definition does?

http://nginx.org/r/$request_body

> Is that because I changed client_body_buffer_size from 16K to 256K caused
> the size change of the log file?
> For now the client_body_buffer_size is big enough, when users upload a file,
> then nginx will put it into the buffer instead of a temp file, and then also
> write this file into post.log? Am I right?

Yes.

> If I'm right, then how can I exclude file upload from the post log? The
> $request_uri for the upload is mod=swfupload.

If you don't want the request body logged, don't log the request body.

If you don't want the request body logged for one $request_uri only,
you can finish handling that in a specific location{} and use a different
access_log there.

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

change client_body_buffer_size from 16K to 256K made the nginx logs size from 50M to 1G..

meteor8488 May 11, 2016 01:39AM

Re: change client_body_buffer_size from 16K to 256K made the nginx logs size from 50M to 1G..

Francis Daly May 11, 2016 03:38AM

Re: change client_body_buffer_size from 16K to 256K made the nginx logs size from 50M to 1G..

meteor8488 May 11, 2016 07:26AM

Re: change client_body_buffer_size from 16K to 256K made the nginx logs size from 50M to 1G..

meteor8488 May 11, 2016 09:19AM

Re: change client_body_buffer_size from 16K to 256K made the nginx logs size from 50M to 1G..

Valentin V. Bartenev May 11, 2016 09:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 162
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready