fix middleware logging bytes (#20624)

This commit is contained in:
Gustavo Trott 2024-07-02 15:35:15 -03:00 committed by GitHub
parent e4b2494bb8
commit fb7f0b45be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 5 additions and 5 deletions

View File

@ -203,7 +203,7 @@ func parseGraphQLMutation(query string, variables map[string]interface{}) (strin
if len(paramParts) != 2 {
continue // Skip invalid params
}
paramName, paramValue := paramParts[0], paramParts[1]
paramName, paramValue := strings.Trim(paramParts[0], " \t"), paramParts[1]
// Handle variable substitution
if strings.HasPrefix(paramValue, "$") {

View File

@ -55,7 +55,7 @@ func HasuraConnectionReader(hc *common.HasuraConnection, fromHasuraToBrowserChan
continue
}
log.Tracef("received from hasura: %v", message)
log.Tracef("received from hasura: %s", string(message))
handleMessageReceivedFromHasura(hc, fromHasuraToBrowserChannel, fromBrowserToHasuraChannel, message)
}

View File

@ -205,7 +205,7 @@ RangeLoop:
continue
}
log.Tracef("sending to hasura: %v", fromBrowserMessage)
log.Tracef("sending to hasura: %s", string(fromBrowserMessage))
errWrite := hc.Websocket.Write(hc.Context, websocket.MessageText, fromBrowserMessage)
if errWrite != nil {
if !errors.Is(errWrite, context.Canceled) {

View File

@ -53,7 +53,7 @@ func BrowserConnectionReader(
return
}
log.Tracef("received from browser: %v", message)
log.Tracef("received from browser: %s", string(message))
if messageType != websocket.MessageText {
log.Warnf("received non-text message: %v", messageType)

View File

@ -113,7 +113,7 @@ func sendBbbCoreMsgToRedis(name string, body map[string]interface{}) {
return
}
log.Tracef("JSON message sent to channel %s:\n%s\n", channelName, messageJSON)
log.Tracef("JSON message sent to channel %s:\n%s\n", channelName, string(messageJSON))
}
func SendUserGraphqlReconnectionForcedEvtMsg(sessionToken string) {