Is it possible to specify custom error log format on Nginx?

You can’t specify your own format, but in nginx build-in several level’s of error_log-ing.

Syntax: error_log file [ debug | info | notice | warn | error | crit ]

Default: ${prefix}/logs/error.log

Specifies the file where server (and fastcgi) errors are logged.

Default values for the error level:

  1. in the main section – error
  2. in the HTTP section – crit
  3. in the server section – crit

In my error_log, time always presented int begin of each error string in log.

Leave a Comment