public class LogHeader extends Packet
The LogHeader class is used to store and transfer log metadata. After the PipeProtocol or TcpProtocol has established a connection, a Log Header packet with the metadata of the current logging context is created and written. Log Header packets are used by the SmartInspect Router application for its filter and trigger functionality.
This class is not guaranteed to be threadsafe. However, instances of this class will normally only be used in the context of a single thread.
PACKET_HEADER| Constructor and Description |
|---|
LogHeader() |
| Modifier and Type | Method and Description |
|---|---|
void |
addValue(String key,
String value)
Adds a key-value pair to this Log Header packet.
|
String |
getContent()
Returns the entire content of this Log Header packet.
|
PacketType |
getPacketType()
Overridden.
|
int |
getSize()
Overridden.
|
getBytes, getLevel, getStringSize, getThreadId, isThreadSafe, lock, setBytes, setLevel, setThreadSafe, unlockpublic int getSize()
public PacketType getPacketType()
getPacketType in class Packetpublic String getContent()
public void addValue(String key, String value)
key - The key to be associated with the specified valuevalue - The value to be associated with the specified keyCopyright © 2023. All rights reserved.