Skip to content

Instantly share code, notes, and snippets.

@tclancy
Created May 29, 2014 20:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tclancy/0c47c6f61744e1d312f1 to your computer and use it in GitHub Desktop.
Save tclancy/0c47c6f61744e1d312f1 to your computer and use it in GitHub Desktop.
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