AdguardTeam / AdguardTeam/AdGuardHome

Use our own logger within the DHCP server

Aperta
#3,641 0 commenti 0 reazioni 1 assegnatario Rivendicata da @EugeneOne1 Vedi su GitHub
enhancement P4: Low
Lingua principale
TypeScript
Stelle
36.9k
Fork
2.5k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.