2017-06-13 15:47:17 -07:00
|
|
|
# debug
|
|
|
|
|
|
2018-01-04 12:53:07 +00:00
|
|
|
## Name
|
2017-07-24 08:24:53 -07:00
|
|
|
|
2018-01-04 12:53:07 +00:00
|
|
|
*debug* - disables the automatic recovery upon a crash so that you'll get a nice stack trace.
|
|
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
|
|
|
|
|
Normally CoreDNS will recover from panics, using *debug* inhibits this. The main use of *debug* is
|
2018-04-19 07:41:56 +01:00
|
|
|
to help testing. A side effect of using *debug* is that `log.Debug` and `log.Debugf` will be printed
|
|
|
|
|
to standard output.
|
2018-01-04 12:53:07 +00:00
|
|
|
|
|
|
|
|
Note that the *errors* plugin (if loaded) will also set a `recover` negating this setting.
|
2017-06-13 15:47:17 -07:00
|
|
|
|
|
|
|
|
## Syntax
|
|
|
|
|
|
|
|
|
|
~~~ txt
|
|
|
|
|
debug
|
|
|
|
|
~~~
|
|
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
2018-04-19 07:41:56 +01:00
|
|
|
Disable the ability to recover from crashes and show debug logging:
|
2017-06-13 15:47:17 -07:00
|
|
|
|
2017-09-15 09:56:05 +01:00
|
|
|
~~~ corefile
|
|
|
|
|
. {
|
|
|
|
|
debug
|
|
|
|
|
}
|
2017-06-13 15:47:17 -07:00
|
|
|
~~~
|