Adjust websocket tracker logging levels

This commit is contained in:
Matt Joiner 2020-04-28 09:14:24 +10:00
parent 15fff58d7b
commit 188aa800b2
1 changed files with 5 additions and 1 deletions

View File

@ -91,7 +91,11 @@ func (tc *TrackerClient) Run() error {
for !tc.closed { for !tc.closed {
tc.mu.Unlock() tc.mu.Unlock()
err := tc.doWebsocket() err := tc.doWebsocket()
tc.Logger.WithDefaultLevel(log.Warning).Printf("websocket instance ended: %v", err) level := log.Info
if tc.closed {
level = log.Debug
}
tc.Logger.WithDefaultLevel(level).Printf("websocket instance ended: %v", err)
time.Sleep(time.Minute) time.Sleep(time.Minute)
tc.mu.Lock() tc.mu.Lock()
} }