Debugging Nginx apps

| | [C]olor

By default nginx buffers its logs. This is good for performance because it reduces the number of file writes. But I prefer unbuffered logging for debugging:

log_format my_format <format> buffer=0;
access_log <logfile> my_format;

this logs requests instantly which makes it easier to identify problems.