mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-05 23:42:54 +03:00
Pull request: 6093-log-conf
Updates #6093. Squashed commit of the following: commit f3478b9ad30a025b2a4044ab4ca54517568c833d Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Fri Aug 11 15:27:51 2023 +0300 home: imp code commit 07b51d83eb1491f33ef959406495f3154aadd774 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Fri Aug 11 15:18:00 2023 +0300 all: imp docs commit 4892c8673af738d9f1b2abd5b1da854f60439bcf Merge: 7cb376c95c54635e8a
Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Fri Aug 11 13:57:02 2023 +0300 Merge remote-tracking branch 'origin/master' into 6093-log-conf commit 7cb376c953222437aba67120ab14f74341260b20 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Fri Aug 11 12:48:26 2023 +0300 all: docs commit 89f0d46bd99cebde234e56db6867fdf371d8191b Merge: 67c77676394cf50a53
Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Fri Aug 11 12:46:26 2023 +0300 Merge remote-tracking branch 'origin/master' into 6093-log-conf commit 67c7767631da510bcb05856a6556fb6aff172fda Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Fri Aug 11 12:39:26 2023 +0300 home: log conf
This commit is contained in:
parent
c54635e8a1
commit
85e87b9c1d
4 changed files with 108 additions and 98 deletions
internal/home
|
@ -431,25 +431,6 @@ func (c *configuration) getConfigFilename() string {
|
|||
return configFile
|
||||
}
|
||||
|
||||
// readLogSettings reads logging settings from the config file. We do it in a
|
||||
// separate method in order to configure logger before the actual configuration
|
||||
// is parsed and applied.
|
||||
func readLogSettings() (ls *logSettings) {
|
||||
conf := &configuration{}
|
||||
|
||||
yamlFile, err := readConfigFile()
|
||||
if err != nil {
|
||||
return &logSettings{}
|
||||
}
|
||||
|
||||
err = yaml.Unmarshal(yamlFile, conf)
|
||||
if err != nil {
|
||||
log.Error("Couldn't get logging settings from the configuration: %s", err)
|
||||
}
|
||||
|
||||
return &conf.Log
|
||||
}
|
||||
|
||||
// validateBindHosts returns error if any of binding hosts from configuration is
|
||||
// not a valid IP address.
|
||||
func validateBindHosts(conf *configuration) (err error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue