This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this outputs JSON formatted logs which are easy to parse for any logging agent (such as fluentd) | |
# the format conforms to Google Cloud Logging so logs are nicely structured in the logs viewer | |
# see also: https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#httprequest | |
# put the following lines in your nginx config | |
# /etc/nginx/nginx.conf | |
log_format json_combined escape=json | |
'{' | |
'"time":"$msec",' |