coredns/middleware/errors
Miek Gieben c4ab98c6e3 Add middleware.NextOrFailure (#462)
This checks if the next middleware to be called is nil, and if so returns
ServerFailure and an error. This makes the next calling more robust and
saves some lines of code.

Also prefix the error with the name of the middleware to aid in
debugging.
2016-12-20 18:58:05 +00:00
..
errors.go Add middleware.NextOrFailure (#462) 2016-12-20 18:58:05 +00:00
errors_test.go Golint2 (#280) 2016-09-23 09:14:12 +01:00
README.md We dont support log rotation anymore 2016-10-18 07:03:51 +01:00
setup.go Golint2 (#280) 2016-09-23 09:14:12 +01:00
setup_test.go Golint2 (#280) 2016-09-23 09:14:12 +01:00

errors

errors enables error logging. TODO: what are errors.

Syntax

errors [LOGFILE]
  • LOGFILE is the path to the error log file to create (or append to), relative to the current working directory. It can also be stdout or stderr to write to the console, syslog to write to the system log (except on Windows), or visible to write the error (including full stack trace, if applicable) to the response. Writing errors to the response is NOT advised except in local debug situations. The default is stderr. The above syntax will simply enable error reporting on the server. To specify custom error pages, open a block:
errors {
    what where
}
  • what can only be log.
  • where is the path to the log file (as described above) and you can enable rotation to manage the log files.

Examples

Log errors into a file in the parent directory:

errors ../error.log

Make errors visible to the client (for debugging only):

errors visible