mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-01 21:50:29 +03:00
Pull request: 4046 darwin service message
Merge in DNS/adguard-home from 4046-log-dir to master Closes #4046. Squashed commit of the following: commit 05140550b14f477f52487c575f56428ce9e6fa10 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Jan 5 17:54:11 2022 +0500 all: add macOS service msg
This commit is contained in:
parent
e9c59b098e
commit
34c95f99f8
3 changed files with 15 additions and 29 deletions
internal/home
|
@ -393,9 +393,9 @@ func run(args options, clientBuildFS fs.FS) {
|
|||
// Go memory hacks
|
||||
memoryUsage(args)
|
||||
|
||||
// print the first message after logger is configured
|
||||
// Print the first message after logger is configured.
|
||||
log.Println(version.Full())
|
||||
log.Debug("Current working directory is %s", Context.workDir)
|
||||
log.Debug("current working directory is %s", Context.workDir)
|
||||
if args.runningAsService {
|
||||
log.Info("AdGuard Home is running as a service")
|
||||
}
|
||||
|
@ -631,13 +631,13 @@ func configureLogger(args options) {
|
|||
log.SetLevel(log.DEBUG)
|
||||
}
|
||||
|
||||
// Make sure that we see the microseconds in logs, as networking stuff
|
||||
// can happen pretty quickly.
|
||||
// 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
|
||||
// When running as a Windows service, use eventlog by default if nothing
|
||||
// else is configured. Otherwise, we'll simply lose the log output.
|
||||
ls.LogFile = configSyslog
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue