Skip to content

Commit

Permalink
adjust some log levels
Browse files Browse the repository at this point in the history
  • Loading branch information
omriharel committed May 5, 2020
1 parent 8d826d8 commit 78b85ac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (cc *CanonicalConfig) Load() error {
}

cc.logger.Info("Loaded config successfully")
cc.logger.Debugw("Config values",
cc.logger.Infow("Config values",
"sliderMapping", cc.SliderMapping,
"processRefreshFreq", cc.SessionRefreshThreshold,
"connectionInfo", cc.ConnectionInfo)
Expand Down
4 changes: 2 additions & 2 deletions session_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (m *sessionMap) getAndAddSessions() error {
m.add(session)
}

m.logger.Debugw("Got all audio sessions successfully", "sessionMap", m)
m.logger.Infow("Got all audio sessions successfully", "sessionMap", m)

// mark completion
m.lastSessionRefresh = time.Now()
Expand All @@ -80,7 +80,7 @@ func (m *sessionMap) setupOnConfigReload() {
for {
select {
case <-configReloadedChannel:
m.logger.Debug("Detected config reload, attempting to re-acquire all audio sessions")
m.logger.Info("Detected config reload, attempting to re-acquire all audio sessions")
m.refreshSessions()
}
}
Expand Down
5 changes: 3 additions & 2 deletions tray.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,21 @@ func (d *Deej) initializeTray(onDone func()) {

// quit
case <-quit.ClickedCh:
logger.Debug("Quit menu item clicked, stopping")
logger.Info("Quit menu item clicked, stopping")

d.signalStop()

// edit config
case <-editConfig.ClickedCh:
logger.Debug("Edit config menu item clicked, opening config for editing")
logger.Info("Edit config menu item clicked, opening config for editing")

if err := util.OpenExternal(logger, "notepad.exe", configFilepath); err != nil {
logger.Warnw("Failed to open config file for editing", "error", err)
}

// refresh sessions
case <-refreshSessions.ClickedCh:
logger.Info("Refresh sessions menu item clicked, triggering session map refresh")
d.sessions.refreshSessions()
}
}
Expand Down

0 comments on commit 78b85ac

Please sign in to comment.