make info logging more consistent

This commit is contained in:
Egor 2026-02-27 18:26:01 -08:00
parent 70e6b8f17f
commit 6de81970b8
2 changed files with 5 additions and 5 deletions

View file

@ -101,7 +101,7 @@ func (m *Monitor) authenticateAndSetup(credStore *credentials.Store) error {
}
func (m *Monitor) refreshTokens(c *protonmail.Client, auth *protonmail.Auth, creds *credentials.ProtonCredentials) (*protonmail.Auth, error) {
m.logger.Info("Refreshing Proton session tokens")
m.logger.Debug("Refreshing Proton session tokens")
newAuth, err := c.AuthRefresh(auth)
if err != nil {
m.logger.Error("Token refresh failed", "error", err)
@ -128,7 +128,7 @@ func (m *Monitor) refreshTokens(c *protonmail.Client, auth *protonmail.Auth, cre
if err := m.credStore.SaveProton(updatedCreds); err != nil {
m.logger.Warn("Failed to save refreshed tokens", "error", err)
} else {
m.logger.Info("Proton tokens refreshed and saved")
m.logger.Debug("Proton tokens refreshed and saved")
}
return newAuth, nil

View file

@ -137,7 +137,7 @@ func (h *Handlers) HandleMarkRead(w http.ResponseWriter, r *http.Request) {
return
}
h.logger.Info("marked email as read", "uid", req.UID)
h.logger.Debug("marked email as read", "uid", req.UID)
w.Header().Set("Content-Type", "application/json")
if err := json.NewEncoder(w).Encode(map[string]bool{"success": true}); err != nil {
@ -172,7 +172,7 @@ func (h *Handlers) HandleArchive(w http.ResponseWriter, r *http.Request) {
return
}
h.logger.Info("archived email", "uid", req.UID)
h.logger.Debug("archived email", "uid", req.UID)
w.Header().Set("Content-Type", "application/json")
if err := json.NewEncoder(w).Encode(map[string]bool{"success": true}); err != nil {
@ -207,7 +207,7 @@ func (h *Handlers) HandleTrash(w http.ResponseWriter, r *http.Request) {
return
}
h.logger.Info("trashed email", "uid", req.UID)
h.logger.Debug("trashed email", "uid", req.UID)
w.Header().Set("Content-Type", "application/json")
if err := json.NewEncoder(w).Encode(map[string]bool{"success": true}); err != nil {