Under normal circumstances, we want logging to be as minimal as possible. Usually what's important is which URIs were called by which clients and when, and if there was an error, to show the resulting error message. If we want to see more information, that leads into a debug logging configuration.
To activate debug logging, the
nginx binary needs to have been compiled with the
--with-debug configure flag. As this flag is not recommended for high performance production systems, we may want to provide two separate
nginx binaries for our needs: one which we use in production, and one that has all the same configure options, with the addition of
--with-debug so that we may simply swap out the binary at runtime ...