how can I fetch byte logs in nginx like "%{%s}t %I .\n%{%s}t %O ."
Joe Shang
joe.shang at gmail.com
Fri Nov 14 23:59:23 MSK 2008
I am trying to convert Apache to nginx in a box I have, but I want to
use the tools already this control panel uses, so I try to make sure
there is no interference , and smooth, if this is successful, this
would be very sweet.
There is no way to cut down the format so its in like 1226686777 form
? would there be future implementation for bytes received ?
Joe
On Fri, Nov 14, 2008 at 12:33 PM, Igor Sysoev <is at rambler-co.ru> wrote:
> On Fri, Nov 14, 2008 at 12:22:31PM -0600, Joe Shang wrote:
>
>> basically the outcome of the byte-log files would be:
>>
>> 1226686775 238 .
>> 1226686776 527 .
>> 1226686776 5270 .
>> 1226686776 448 .
>> 1226686776 5455 .
>> 1226686777 391 .
>> 1226686777 5274 .
>> 1226686777 549 .
>> 1226686777 196 .
>> 1226686777 456 .
>> 1226686777 197 .
>> 1226686777 154 .
>> 1226686777 5455 .
>> 1226686896 66 .
>> 1226686896 251 .
>> 1226686896 284 .
>> 1226686896 1949 .
>
> The near approximation is
>
> log_format bytes "$msec - .\n$msec $bytes_sent .";
>
> but time will be in 1226686777.123 form and there will be no "bytes received".
>
> BTW, how do you distinguish input lines from output ones in the log ?
>
>> On Fri, Nov 14, 2008 at 12:16 PM, mike <mike503 at gmail.com> wrote:
>> > to save us lazy people some time can you define what each of these is?
>> >
>> > On Fri, Nov 14, 2008 at 9:58 AM, Joe Shang <joe.shang at gmail.com> wrote:
>> >> In Apache I fetch byte logs using:
>> >>
>> >> CustomLog /usr/local/apache/logs/DOMAIN.COM-bytes_log "%{%s}t %I .\n%{%s}t %O ."
>> >>
>> >> Can I achieve the similar effect this does in Apache, in nginx ?
>> >>
>> >> If so, can anyone give me the proper syntax to do so in nginx config?
>> >>
>> >> Joe
>> >>
>> >>
>> >
>> >
>
> --
> Igor Sysoev
> http://sysoev.ru/en/
>
>
More information about the nginx
mailing list