public class CentralLogRecord
extends java.lang.Object
implements java.io.Externalizable
LogRecord that implements the Externalizable interface. Used to
transfer log records between the client and the server.| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
fwdUser
The FWD account.
|
private java.util.logging.Level |
level
The level of the log msg.
|
private java.lang.String |
loggerName
The name of the logger.
|
private java.lang.String |
message
The log message.
|
private long |
millis
The event time in milliseconds since 1970.
|
private java.lang.Object[] |
parameters
The format parameters.
|
private long |
pid
Process ID.
|
private java.lang.String |
sessionId
The session ID.
|
private java.lang.String |
sourceClassName
The class where the msg originates from.
|
private java.lang.String |
sourceMethodName
The method where the msg originates from.
|
private java.lang.Integer |
threadId
The thread id.
|
private java.lang.String |
threadName
The thread name.
|
private java.lang.Throwable |
thrown
The Throwable associated with log message.
|
private java.lang.String |
userOS
OS user ID.
|
| Constructor and Description |
|---|
CentralLogRecord() |
| Modifier and Type | Method and Description |
|---|---|
static CentralLogRecord |
from(ContextLogRecord logRecord,
long pid,
java.lang.String userOS)
Converts a standard java
ContextLogRecord to CentralLogRecord. |
java.lang.String |
getFwdUser()
Getter for the FWD account.
|
java.util.logging.Level |
getLevel()
Getter for the log level.
|
java.lang.String |
getLoggerName()
Getter for the logger name.
|
java.lang.String |
getMessage()
Getter for the message.
|
long |
getMillis()
Getter for the millis.
|
java.lang.Object[] |
getParameters()
Getter for the parameters.
|
long |
getPid()
Getter for the process ID.
|
java.lang.String |
getSessionId()
Getter for the session ID.
|
java.lang.String |
getSourceClassName()
Getter for the source class name.
|
java.lang.String |
getSourceMethodName()
Getter for the source method name.
|
java.lang.Integer |
getThreadId()
Getter for the thread id.
|
java.lang.String |
getThreadName()
Getter for the thread name.
|
java.lang.Throwable |
getThrown()
Getter for the Throwable.
|
java.lang.String |
getUserOS()
Getter for the process OS user ID.
|
void |
readExternal(java.io.ObjectInput in)
Restores the contents of this object from the input stream from a format supported by Externalizable.
|
void |
setLevel(java.util.logging.Level level)
Setter for the log level.
|
void |
setLoggerName(java.lang.String loggerName)
Setter for the logger name.
|
void |
setMessage(java.lang.String message)
Setter for the message.
|
void |
setMillis(long millis)
Setter for the millis.
|
void |
setParameters(java.lang.Object... parameters)
Setter for the parameters.
|
void |
setSourceClassName(java.lang.String sourceClassName)
Setter for the source class name.
|
void |
setSourceMethodName(java.lang.String sourceMethodName)
Setter for the source method name.
|
void |
setThrown(java.lang.Throwable thrown)
Setter for the Throwable.
|
ContextLogRecord |
toLogRecord()
Returns this object converted to
LogRecord. |
void |
writeExternal(java.io.ObjectOutput out)
Writes the fields of this object to the out stream in a format supported by Externalizable.
|
private long pid
private java.lang.String userOS
private java.util.logging.Level level
private java.lang.String sourceClassName
private java.lang.String sourceMethodName
private java.lang.String message
private long millis
private java.lang.Throwable thrown
private java.lang.String loggerName
private java.lang.Object[] parameters
private java.lang.String threadName
private java.lang.String fwdUser
private java.lang.String sessionId
private java.lang.Integer threadId
public static CentralLogRecord from(ContextLogRecord logRecord, long pid, java.lang.String userOS)
ContextLogRecord to CentralLogRecord.logRecord - A log record.pid - A process ID.userOS - OS user ID.public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
NativeTypeSerializer.writeExternal in interface java.io.Externalizableout - The stream to write the object to.java.io.IOException - Any I/O exceptions that may occurpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
NativeTypeSerializer.readExternal in interface java.io.Externalizablein - The stream to read data from.java.io.IOException - Any I/O exceptions that may occurjava.lang.ClassNotFoundException - The class for an object being restored cannot be found.public ContextLogRecord toLogRecord()
LogRecord.public long getPid()
public java.lang.String getUserOS()
public java.util.logging.Level getLevel()
public void setLevel(java.util.logging.Level level)
level - The log level.public java.lang.String getSourceClassName()
public void setSourceClassName(java.lang.String sourceClassName)
sourceClassName - The source class name.public java.lang.String getSourceMethodName()
public void setSourceMethodName(java.lang.String sourceMethodName)
sourceMethodName - The source method name.public java.lang.String getMessage()
public void setMessage(java.lang.String message)
message - The message.public long getMillis()
public void setMillis(long millis)
millis - The millis.public java.lang.Throwable getThrown()
public void setThrown(java.lang.Throwable thrown)
thrown - The Throwable.public java.lang.String getLoggerName()
public void setLoggerName(java.lang.String loggerName)
loggerName - The logger name.public java.lang.Object[] getParameters()
public void setParameters(java.lang.Object... parameters)
parameters - The parameters.public java.lang.Integer getThreadId()
public java.lang.String getThreadName()
public java.lang.String getFwdUser()
public java.lang.String getSessionId()