mirror of
https://github.com/pi-hole/docs.git
synced 2024-12-06 19:27:12 +01:00
Add logging instructions to unbound guide (#354)
* Add logging instructions to unbound guide * Remove leftovers * Remove copy&paste error * Fix markdownlint errors * Use --parent option with mkdir Signed-off-by: yubiuser <ckoenig@posteo.de> Co-authored-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
@@ -157,3 +157,43 @@ Finally, configure Pi-hole to use your recursive DNS server by specifying `127.0
|
||||

|
||||
|
||||
(don't forget to hit Return or click on `Save`)
|
||||
|
||||
### Add logging to unbound
|
||||
|
||||
!!! warning
|
||||
It's not recommonded to increase verbosity for daily use, as unbound logs a lot. But it might be helpful for debugging purposes.
|
||||
|
||||
There are five levels of verbosity
|
||||
|
||||
```
|
||||
Level 0 means no verbosity, only errors
|
||||
Level 1 gives operational information
|
||||
Level 2 gives detailed operational information
|
||||
Level 3 gives query level information
|
||||
Level 4 gives algorithm level information
|
||||
Level 5 logs client identification for cache misses
|
||||
```
|
||||
|
||||
First, specify the log file and the verbosity level in the `server` part of
|
||||
`/etc/unbound/unbound.conf.d/pi-hole.conf`:
|
||||
|
||||
```ini
|
||||
server:
|
||||
# If no logfile is specified, syslog is used
|
||||
logfile: "/var/log/unbound/unbound.log"
|
||||
verbosity: 1
|
||||
```
|
||||
|
||||
Second, create log dir and file, set permissions:
|
||||
|
||||
```
|
||||
sudo mkdir -p /var/log/unbound
|
||||
sudo touch /var/log/unbound/unbound.log
|
||||
sudo chown unbound /var/log/unbound/unbound.log
|
||||
```
|
||||
|
||||
Third, restart unbound:
|
||||
|
||||
```
|
||||
sudo service unbound restart
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user