Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Nginx configuration to log datetime, bytes sent and total request time for cowboy performance monitoring on local server. Also ignores a bunch of static file types to keep the logs clean.
map $request $loggable {
~*\.css|\.js|\.png|\.woff 0;
default 1;
}
log_format slim '[$time_local] - $body_bytes_sent - $request_time - "$request" $status';
include bcore/local-nginx-default;
include mime.types;
default_type application/octet-stream;
access_log /path/to/access.log slim if=$loggable;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment