chore: change config file log line to debug

This commit is contained in:
blacktop
2023-04-13 16:27:42 -06:00
parent fb07b08006
commit 4d2be40ba9
3 changed files with 10 additions and 6 deletions
+1 -2
View File
@@ -22,7 +22,6 @@ THE SOFTWARE.
package cmd
import (
"fmt"
"os"
"path/filepath"
"strings"
@@ -82,6 +81,6 @@ func initConfig() {
// If a config file is found, read it in.
if err := viper.ReadInConfig(); err == nil {
fmt.Fprintln(os.Stderr, "Using config file:", viper.ConfigFileUsed())
log.WithField("config", viper.ConfigFileUsed()).Debug("using config file")
}
}
+4
View File
@@ -5,6 +5,10 @@ daemon:
port: 3993
# socket: /tmp/ipsw.sock
debug: false
# logfile: /var/log/ipswd.log
database:
# driver: sqlite3
# dsn: /var/lib/ipswd/ipswd.db
# The lines beneath this are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/use them.
# yaml-language-server: $schema=https://blacktop.github.io/ipsw/static/schema.json
+5 -4
View File
@@ -36,10 +36,11 @@ func (d *daemon) Start() (err error) {
gin.SetMode(gin.ReleaseMode)
}
d.server = server.NewServer(&server.Config{
Host: d.conf.Daemon.Host,
Port: d.conf.Daemon.Port,
Socket: d.conf.Daemon.Socket,
Debug: d.conf.Daemon.Debug,
Host: d.conf.Daemon.Host,
Port: d.conf.Daemon.Port,
Socket: d.conf.Daemon.Socket,
Debug: d.conf.Daemon.Debug,
LogFile: d.conf.Daemon.LogFile,
})
return d.server.Start()
}