Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
added data into SocketLoggerServer trace logs
Browse files Browse the repository at this point in the history
  • Loading branch information
rmazurok committed Jan 9, 2024
1 parent 6a2063e commit 052f47d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import java.io.DataInputStream;
import java.io.EOFException;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.LinkedHashMap;

import static oap.logstream.LogStreamProtocol.MESSAGE_TYPE;
Expand Down Expand Up @@ -124,8 +125,9 @@ private void readBinaryV2( ProtocolVersion version, String hostName, DataInputSt
var buffer = new byte[length];
in.readFully( buffer, 0, length );

log.trace( "[{}] logging (properties {} filePreffix {} logType {} headers {} types {}, {})",
hostName, properties, filePreffix, logType, headers, types, length );
log.trace( "[{}] logging (properties {} filePreffix {} logType {} headers {} types {} data {} length {})",
hostName, properties, filePreffix, logType, headers, types,
"|" + new String( buffer, StandardCharsets.UTF_8 ).replace( "\n", "|" ), length );

backend.log( version, clientHostname, filePreffix, properties, logType, headers, types, buffer, 0, length );
}
Expand Down

0 comments on commit 052f47d

Please sign in to comment.