mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +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:
@@ -709,7 +709,7 @@ func (s *RPCServer) GetAccountInfoStream(r *gctrpc.GetAccountInfoRequest, stream
|
||||
defer func() {
|
||||
pipeErr := pipe.Release()
|
||||
if pipeErr != nil {
|
||||
log.Error(log.DispatchMgr, pipeErr)
|
||||
log.Errorln(log.DispatchMgr, pipeErr)
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -2183,7 +2183,7 @@ func (s *RPCServer) GetExchangeOrderbookStream(r *gctrpc.GetExchangeOrderbookStr
|
||||
defer func() {
|
||||
pipeErr := pipe.Release()
|
||||
if pipeErr != nil {
|
||||
log.Error(log.DispatchMgr, pipeErr)
|
||||
log.Errorln(log.DispatchMgr, pipeErr)
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -2268,7 +2268,7 @@ func (s *RPCServer) GetTickerStream(r *gctrpc.GetTickerStreamRequest, stream gct
|
||||
defer func() {
|
||||
pipeErr := pipe.Release()
|
||||
if pipeErr != nil {
|
||||
log.Error(log.DispatchMgr, pipeErr)
|
||||
log.Errorln(log.DispatchMgr, pipeErr)
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -2321,7 +2321,7 @@ func (s *RPCServer) GetExchangeTickerStream(r *gctrpc.GetExchangeTickerStreamReq
|
||||
defer func() {
|
||||
pipeErr := pipe.Release()
|
||||
if pipeErr != nil {
|
||||
log.Error(log.DispatchMgr, pipeErr)
|
||||
log.Errorln(log.DispatchMgr, pipeErr)
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -4111,7 +4111,7 @@ func (s *RPCServer) SetDataHistoryJobStatus(_ context.Context, r *gctrpc.SetData
|
||||
status := "success"
|
||||
err := s.dataHistoryManager.SetJobStatus(r.Nickname, r.Id, dataHistoryStatus(r.Status))
|
||||
if err != nil {
|
||||
log.Error(log.GRPCSys, err)
|
||||
log.Errorln(log.GRPCSys, err)
|
||||
status = "failed"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user