Skip to content

Commit

Permalink
chore: change config file log line to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktop committed Apr 13, 2023
1 parent fb07b08 commit 4d2be40
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
3 changes: 1 addition & 2 deletions cmd/ipswd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ THE SOFTWARE.
package cmd

import (
"fmt"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -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 changes: 4 additions & 0 deletions config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions internal/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 4d2be40

Please sign in to comment.