Skip to content

Commit

Permalink
Fix logging
Browse files Browse the repository at this point in the history
  • Loading branch information
EinKrebs committed Dec 22, 2023
1 parent 71746d7 commit 4d79e76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type Instance struct {
CryptoCnf Crypto `json:"crypto" toml:"crypto" yaml:"crypto"`

LogPath string `json:"log_path" toml:"log_path" yaml:"log_path"`
LogLevel string `json:"log_level" toml:"log_level" yaml:"log_level"`
SocketPath string `json:"socket_path" toml:"socket_path" yaml:"socket_path"`

SystemdNotificationsDebug bool `json:"sd_notifications_debug" toml:"sd_notifications_debug" yaml:"sd_notifications_debug"`
Expand Down
3 changes: 3 additions & 0 deletions pkg/core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ type Instance struct {

func (i *Instance) Run(instanceCnf *config.Instance) error {

ylogger.ReloadLogger(instanceCnf.LogPath)
ylogger.UpdateZeroLogLevel(instanceCnf.LogLevel)

sigs := make(chan os.Signal, 1)
signal.Notify(sigs, syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGUSR1, syscall.SIGUSR2)

Expand Down

0 comments on commit 4d79e76

Please sign in to comment.