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 |
|---|---|
String |
getAppName()
Returns the application name of this Log Header.
|
String |
getContent()
Returns the entire content of this Log Header packet.
|
String |
getHostName()
Returns the hostname of this Log Header.
|
PacketType |
getPacketType()
Overridden.
|
int |
getSize()
Overridden.
|
void |
setAppName(String appName)
Sets the application name of this Log Header.
|
void |
setHostName(String hostName)
Sets the hostname of this Log Header.
|
getBytes, getLevel, getStringSize, getThreadId, isThreadSafe, lock, setBytes, setLevel, setThreadSafe, unlockpublic int getSize()
public PacketType getPacketType()
getPacketType in class Packetpublic String getContent()
public String getHostName()
public void setHostName(String hostName)
hostName - The new hostname of this Log Header. Can be nullpublic String getAppName()
The application name of a Log Header is usually set to the name of the application this Log Header is created in. This method can return null if this Log Header does not contain an application name.
public void setAppName(String appName)
appName - The new application name of this Log Header. Can be nullCopyright © 2023. All rights reserved.