A LogRecord object represents a logging request. It is passed
between the logging framework and individual logging handlers. Client
applications should not modify a LogRecord object that has
been passed into the logging framework.
The LogRecord class will infer the source method name and
source class name the first time they are accessed if the client application
didn't specify them explicitly. This automatic inference is based on the
analysis of the call stack and is not guaranteed to be precise. Client
applications should force the initialization of these two fields by calling
getSourceClassName or getSourceMethodName if
they expect to use them after passing the LogRecord object to
another thread or transmitting it over RMI.
Constructor Summary
public
LogRecord(Level level, String msg) Constructs a LogRecord object using the supplied the
logging level and message.
Constructs a LogRecord object using the supplied the
logging level and message. The millis property is set to the current
time. The sequence property is set to a new unique value, allocated in
increasing order within a VM. The thread ID is set to a unique value for
the current thread. All other properties are set to null.
Parameters: level - the logging level which may not be null Parameters: msg - the raw message
Sets the resource bundle used to localize the raw message during
formatting.
Parameters: resourceBundle - the resource bundle to set
setResourceBundleName
public void setResourceBundleName(String resourceBundleName)(Code)
Sets the name of the resource bundle.
Parameters: resourceBundleName - the name of the resource bundle to set
setSequenceNumber
public void setSequenceNumber(long sequenceNumber)(Code)
Sets the sequence number. It is usually unnecessary to call this method
to change the sequence number because the number is allocated when this
instance is constructed.
Parameters: sequenceNumber - the sequence number to set
setSourceClassName
public void setSourceClassName(String sourceClassName)(Code)
Sets the name of the class that issued the logging call.
Parameters: sourceClassName - the name of the class that issued the logging call
setSourceMethodName
public void setSourceMethodName(String sourceMethodName)(Code)
Sets the name of the method that issued the logging call.
Parameters: sourceMethodName - the name of the method that issued the logging call