August 2017
Intermediate to advanced
278 pages
8h 53m
English
To start with, we need to define our new log format:
log_format applogs '$remote_addr $remote_user $time_iso8601'
'"$request" $status $body_bytes_sent '
'$request_time $upstream_response_time';
Here, we've deviated from the combined format to change the time to the ISO 8601 format (which will look something like 2016-07-16T21:48:36+00:00), removed the HTTP referrer and user agent, but added the request processing time ($request_time) to get a better idea on how much time it's taking our application to generate responses.
With our new log format defined, we can now use this for our application logs:
access_log /var/log/nginx/meteor-access.log applogs;
We're using ...
Read now
Unlock full access