mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-30 15:10:40 +00:00
log: Add structured logging (#1171)
* basic implementation * log: deprecate duplicate function, add tests and refine calls. * linter: fixes * linter: update struct * linter and new type * log tests: update to not lint issue * linter: stop complaining please * glorious: nits * log: rm comment code * glorious: nits * glorious: nits * glorious: nits * glorious: nits missed --------- Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
This commit is contained in:
@@ -160,7 +160,7 @@ func (m *DatabaseConnectionManager) run(wg *sync.WaitGroup) {
|
||||
case <-t.C:
|
||||
err := m.checkConnection()
|
||||
if err != nil {
|
||||
log.Error(log.DatabaseMgr, "Database connection error:", err)
|
||||
log.Errorln(log.DatabaseMgr, "Database connection error:", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -186,7 +186,7 @@ func (m *DatabaseConnectionManager) checkConnection() error {
|
||||
}
|
||||
|
||||
if !m.dbConn.IsConnected() {
|
||||
log.Info(log.DatabaseMgr, "Database connection reestablished")
|
||||
log.Infoln(log.DatabaseMgr, "Database connection reestablished")
|
||||
m.dbConn.SetConnected(true)
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user