diff options
author | Robin Jarry <robin@jarry.cc> | 2023-06-07 21:34:34 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-06-12 11:23:14 +0200 |
commit | 263d8cbec504bf56791dd3aa8c1e440d96b27d4a (patch) | |
tree | 4d358915e7ae2eed0850f4efb9b6dde5c3ddf0e2 /worker/imap/observer.go | |
parent | 1bd6612c78dc00fd04ef5d614d729e3c0ece7ac8 (diff) | |
download | aerc-263d8cbec504bf56791dd3aa8c1e440d96b27d4a.tar.gz |
logging: remove ultra verbose trace logs
Every message exchanged between the UI and the worker(s) is logged at
least twice with some obscure IDs and struct pointer names.
When enabling trace logging, this floods the files for very little or no
benefit and makes the meaningful logging message hard to catch.
Also, other messages tend to flood the output for no specific reason.
These are most of the time leftovers from the development process and
are not useful for tracking potential issues.
Remove these.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
Diffstat (limited to 'worker/imap/observer.go')
-rw-r--r-- | worker/imap/observer.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/worker/imap/observer.go b/worker/imap/observer.go index 8bc07c93..1c481bed 100644 --- a/worker/imap/observer.go +++ b/worker/imap/observer.go @@ -66,7 +66,6 @@ func (o *observer) IsRunning() bool { func (o *observer) Start() { if o.running { - o.log("runs already") return } if o.client == nil { @@ -79,14 +78,13 @@ func (o *observer) Start() { defer log.PanicHandler() select { case <-o.client.LoggedOut(): - o.log("<-logout") if o.autoReconnect { o.emit("logged out") } else { o.log("ignore logout (auto-reconnect off)") } case <-o.done: - o.log("<-done") + break } o.running = false o.log("stopped") @@ -140,11 +138,9 @@ func (o *observer) DelayedReconnect() error { } func (o *observer) emit(errMsg string) { - o.log("disconnect done->") o.worker.PostMessage(&types.Done{ Message: types.RespondTo(&types.Disconnect{}), }, nil) - o.log("connection error->") o.worker.PostMessage(&types.ConnError{ Error: fmt.Errorf(errMsg), }, nil) |