diff --git a/app.go b/app.go index 7c0b6b20..e7ca88c8 100644 --- a/app.go +++ b/app.go @@ -66,7 +66,7 @@ func run(args options) { // print the first message after logger is configured log.Printf("AdGuard Home, version %s\n", VersionString) - log.Printf("Current working directory is %s", config.ourBinaryDir) + log.Tracef("Current working directory is %s", config.ourBinaryDir) if args.runningAsService { log.Printf("AdGuard Home is running as a service") } diff --git a/config.go b/config.go index e53a9b15..751e3c41 100644 --- a/config.go +++ b/config.go @@ -115,7 +115,7 @@ func getLogSettings() logSettings { // parseConfig loads configuration from the YAML file func parseConfig() error { configFile := config.getConfigFilename() - log.Printf("Reading YAML file: %s", configFile) + log.Tracef("Reading YAML file: %s", configFile) yamlFile, err := readConfigFile() if err != nil { log.Printf("Couldn't read config file: %s", err) @@ -158,7 +158,7 @@ func (c *configuration) write() error { return nil } configFile := config.getConfigFilename() - log.Printf("Writing YAML file: %s", configFile) + log.Tracef("Writing YAML file: %s", configFile) yamlText, err := yaml.Marshal(&config) if err != nil { log.Printf("Couldn't generate YAML file: %s", err) diff --git a/dhcpd/helpers.go b/dhcpd/helpers.go index 04a3ae62..24cfb029 100644 --- a/dhcpd/helpers.go +++ b/dhcpd/helpers.go @@ -31,11 +31,11 @@ func getIfaceIPv4(iface *net.Interface) *net.IPNet { } if ipnet.IP.To4() == nil { - log.Printf("Got IP that is not IPv4: %v", ipnet.IP) + log.Tracef("Got IP that is not IPv4: %v", ipnet.IP) continue } - log.Printf("Got IP that is IPv4: %v", ipnet.IP) + log.Tracef("Got IP that is IPv4: %v", ipnet.IP) return &net.IPNet{ IP: ipnet.IP.To4(), Mask: ipnet.Mask, diff --git a/dnsforward/dnsforward.go b/dnsforward/dnsforward.go index f362ec4e..b2cf0556 100644 --- a/dnsforward/dnsforward.go +++ b/dnsforward/dnsforward.go @@ -110,7 +110,7 @@ func (s *Server) startInternal(config *ServerConfig) error { return err } - log.Printf("Loading stats from querylog") + log.Tracef("Loading stats from querylog") err = fillStatsFromQueryLog() if err != nil { return errorx.Decorate(err, "failed to load stats from querylog") @@ -152,7 +152,7 @@ func (s *Server) startInternal(config *ServerConfig) error { // Initializes the DNS filter func (s *Server) initDNSFilter() error { - log.Printf("Creating dnsfilter") + log.Tracef("Creating dnsfilter") s.dnsFilter = dnsfilter.New(&s.Config) // add rules only if they are enabled if s.FilteringEnabled { diff --git a/filter.go b/filter.go index 9c7a73dd..49b54f0e 100644 --- a/filter.go +++ b/filter.go @@ -228,7 +228,7 @@ func (filter *filter) load() error { } filterFilePath := filter.Path() - log.Printf("Loading filter %d contents to: %s", filter.ID, filterFilePath) + log.Tracef("Loading filter %d contents to: %s", filter.ID, filterFilePath) if _, err := os.Stat(filterFilePath); os.IsNotExist(err) { // do nothing, file doesn't exist @@ -240,7 +240,7 @@ func (filter *filter) load() error { return err } - log.Printf("File %s, id %d, length %d", filterFilePath, filter.ID, len(filterFileContents)) + log.Tracef("File %s, id %d, length %d", filterFilePath, filter.ID, len(filterFileContents)) rulesCount, _, rules := parseFilterContents(filterFileContents) filter.RulesCount = rulesCount diff --git a/upgrade.go b/upgrade.go index 3d79e744..02629797 100644 --- a/upgrade.go +++ b/upgrade.go @@ -34,7 +34,7 @@ func upgradeConfig() error { } schemaVersionInterface, ok := diskConfig["schema_version"] - log.Printf("%s(): got schema version %v", _Func(), schemaVersionInterface) + log.Tracef("got schema version %v", schemaVersionInterface) if !ok { // no schema version, set it to 0 schemaVersionInterface = 0