Pull request: all: add us to logs

Merge in DNS/adguard-home from imp-logs to master

Squashed commit of the following:

commit b463825196625f59b19977920f828f57e4b87f0d
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue May 18 14:08:24 2021 +0300

    all: add us to logs
This commit is contained in:
Ainar Garipov 2021-05-18 14:20:50 +03:00
parent 397b0ccdf7
commit b2e3e4d088
4 changed files with 11 additions and 3 deletions
internal/home

View file

@ -493,6 +493,10 @@ func configureLogger(args options) {
log.SetLevel(log.DEBUG)
}
// Make sure that we see the microseconds in logs, as networking stuff
// can happen pretty quickly.
log.SetFlags(log.LstdFlags | log.Lmicroseconds)
if args.runningAsService && ls.LogFile == "" && runtime.GOOS == "windows" {
// When running as a Windows service, use eventlog by default if nothing else is configured
// Otherwise, we'll simply loose the log output