AdguardTeam / AdguardTeam/AdGuardHome
Use our own logger within the DHCP server
- Dominant language
- TypeScript
- Stars
- 36.9k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
The current DHCP server implementation uses package `dhcpv4` from module [insomniacslk/dhcp](https://github.com/insomniacslk/dhcp). Despite the fact that `dhcpv4.server4` package allows to specify the custom logger, the implementation still uses the default debug logger for some reason:
https://github.com/AdguardTeam/AdGuardHome/blob/e1e064db592278db7c07285d9be44fe3e4412bee/internal/dhcpd/v4.go#L1036
As a consequence, the potentially helpful log records from the server itself aren't written to `log_file` and appear in `stderr` instead. We definitely should make a simple stub implementation of `server4.Logger` interface, which would forward all the writings to our `golibs/log`.
It's also important to take care of duplicating log records which may appear because of currently existing logging.
Contributor guide
Assessment
This issue has not been assessed yet.