* middleware/metrics: add more metrics middleware/cache: Add metrics for number of elements in the cache. Also export the total size. Update README to detail the new metrics. middleware/metrics Move metrics into subpackage called "vars". This breaks the import cycle and is cleaner. This allows vars.Report to be used in the the dnsserver to log refused queries. middleware/metrics: tests Add tests to the metrics framework. The metrics/test subpackage allows scraping of the local server. Do a few test scrape of the metrics that are defined in the metrics middleware. This also allows metrics integration tests to check if the caching and dnssec middleware export their metrics correctly. * update README * typos * fix tests |
||
---|---|---|
.. | ||
errors.go | ||
errors_test.go | ||
README.md | ||
setup.go | ||
setup_test.go |
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
orstderr
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 belog
.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