mirror of
https://github.com/luckfox-eng29/kvm.git
synced 2026-01-18 03:28:19 +01:00
chore: update logging
This commit is contained in:
@@ -74,11 +74,15 @@ func writeJSONRPCEvent(event string, params interface{}, session *Session) {
|
||||
}
|
||||
|
||||
requestString := string(requestBytes)
|
||||
jsonRpcLogger.Info().Str("data", requestString).Msg("Sending JSONRPC event")
|
||||
scopedLogger := jsonRpcLogger.With().
|
||||
Str("data", requestString).
|
||||
Logger()
|
||||
|
||||
scopedLogger.Info().Msg("sending JSONRPC event")
|
||||
|
||||
err = session.RPCChannel.SendText(requestString)
|
||||
if err != nil {
|
||||
jsonRpcLogger.Warn().Err(err).Str("data", requestString).Msg("Error sending JSONRPC event")
|
||||
scopedLogger.Warn().Err(err).Msg("error sending JSONRPC event")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user