java.lang.Object | +--java.util.logging.LogRecordAll Implemented Interfaces:
LogRecord(java.util.logging.Level level, java.lang.String message) Constructs a |
java.util.logging.Level | getLevel()Returns the level of the LogRecord. |
java.lang.String | getLoggerName() Returns the name of the logger where this |
java.lang.String | getMessage() Returns the message for this |
long | getMillis() Returns the time when this |
java.lang.Object[] | getParameters()Returns the parameters to the log message. |
java.util.ResourceBundle | getResourceBundle() Returns the resource bundle that is used when the message
of this |
java.lang.String | getResourceBundleName() Returns the name of the resource bundle that is used when the
message of this |
long | getSequenceNumber() Returns the sequence number of this |
java.lang.String | getSourceClassName()Returns the name of the class where the event being logged has had its origin. |
java.lang.String | getSourceMethodName()Returns the name of the method where the event being logged has had its origin. |
int | getThreadID() Returns an identifier for the thread in which this
|
java.lang.Throwable | getThrown()Returns the Throwable associated with this |
void | setLevel(java.util.logging.Level level) Sets the severity level of this |
void | setLoggerName(java.lang.String name) Sets the name of the logger where this |
void | setMessage(java.lang.String message) Sets the message for this |
void | setMillis(long millis) Sets the time when this |
void | setParameters(java.lang.Object[] parameters)Sets the parameters to the log message. |
void | setResourceBundle(java.util.ResourceBundle bundle) Sets the resource bundle that is used when the message
of this |
void | setResourceBundleName(java.lang.String name) Sets the name of the resource bundle that is used when the
message of this |
void | setSequenceNumber(long seqNum) Sets the sequence number of this |
void | setSourceClassName(java.lang.String sourceClassName)Sets the name of the class where the event being logged has had its origin. |
void | setSourceMethodName(java.lang.String sourceMethodName)Sets the name of the method where the event being logged has had its origin. |
void | setThreadID(int threadID) Sets the identifier indicating in which thread this
|
void | setThrown(java.lang.Throwable thrown) Associates this |
public LogRecord(java.util.logging.Level level, java.lang.String message)LogRecord given a severity level and
an unlocalized message text. In addition, the sequence number,
creation time (as returned by getMillis()) and
thread ID are assigned. All other properties are set to
null.
level - the severity level, for example Level.WARNING.message - the message text (which will be used as key
for looking up the localized message text
if a resource bundle has been associated).public Level getLevel()Applications should be aware of the possibility that the
result is not necessarily one of the standard logging levels,
since the logging framework allows to create custom subclasses
of java.util.logging.Level. Therefore, filters
should perform checks like theRecord.getLevel().intValue()
== Level.INFO.intValue() instead of theRecord.getLevel()
== Level.INFO.
public String getLoggerName()LogRecord
has originated.
null if this LogRecord
does not originate from a Logger.public String getMessage()LogRecord before
any localization or parameter substitution.
A Logger will try to localize the message
if a resource bundle has been associated with this
LogRecord. In this case, the logger will call
getMessage() and use the result as the key
for looking up the localized message in the bundle.
If no bundle has been associated, or if the result of
getMessage() is not a valid key in the
bundle, the logger will use the raw message text as
returned by this method.
null if there
is no message text.public long getMillis()LogRecord was created.
public Object[] getParameters()null if
the message has no parameters.public ResourceBundle getResourceBundle()LogRecord needs to be localized.
null if this message does not need
to be localized.public String getResourceBundleName()LogRecord needs to be localized.
null if this message does not need
to be localized.public long getSequenceNumber()LogRecord.
public String getSourceClassName()null if this information could not
be obtained.public String getSourceMethodName()null if this information could not
be obtained.public int getThreadID()LogRecord was created. The identifier is not
necessarily related to any thread identifiers used by the
operating system.
public Throwable getThrown()LogRecord,
or null if the logged event is not related to an exception
or error.
public void setLevel(java.util.logging.Level level)LogRecord to a new
value.
As soon as a LogRecord has been handed over
to the logging framework, applications should not modify it
anymore. Therefore, this method should only be called on
freshly constructed LogRecords.
level - the new severity level, for example
Level.WARNING.public void setLoggerName(java.lang.String name)LogRecord
has originated.
As soon as a LogRecord has been handed over
to the logging framework, applications should not modify it
anymore. Therefore, this method should only be called on
freshly constructed LogRecords.
name - the name of the source logger, or null to
indicate that this LogRecord does not
originate from a Logger.public void setMessage(java.lang.String message)LogRecord.
A Logger will try to localize the message
if a resource bundle has been associated with this
LogRecord. In this case, the logger will call
getMessage() and use the result as the key
for looking up the localized message in the bundle.
If no bundle has been associated, or if the result of
getMessage() is not a valid key in the
bundle, the logger will use the raw message text as
returned by this method.
It is possible to set the message to either an empty String or
null, although this does not make the the message
very helpful to human users.
message - the message text (which will be used as key
for looking up the localized message text
if a resource bundle has been associated).public void setMillis(long millis)LogRecord was created.
As soon as a LogRecord has been handed over
to the logging framework, applications should not modify it
anymore. Therefore, this method should only be called on
freshly constructed LogRecords.
millis - the time of creation in milliseconds since the
beginning of January 1, 1970.public void setParameters(java.lang.Object[] parameters)As soon as a LogRecord has been handed over
to the logging framework, applications should not modify it
anymore. Therefore, this method should only be called on
freshly constructed LogRecords.
parameters - the parameters to the message, or null
to indicate that the message has no parameters.public void setResourceBundle(java.util.ResourceBundle bundle)LogRecord needs to be localized.
As soon as a LogRecord has been handed over
to the logging framework, applications should not modify it
anymore. Therefore, this method should only be called on
freshly constructed LogRecords.
bundle - the resource bundle to be used, or
null to indicate that this
message does not need to be localized.public void setResourceBundleName(java.lang.String name)LogRecord needs to be localized.
As soon as a LogRecord has been handed over
to the logging framework, applications should not modify it
anymore. Therefore, this method should only be called on
freshly constructed LogRecords.
name - the name of the resource bundle to be used, or
null to indicate that this message
does not need to be localized.public void setSequenceNumber(long seqNum)LogRecord to a new
value.
As soon as a LogRecord has been handed over
to the logging framework, applications should not modify it
anymore. Therefore, this method should only be called on
freshly constructed LogRecords.
seqNum - the new sequence number.public void setSourceClassName(java.lang.String sourceClassName)As soon as a LogRecord has been handed over
to the logging framework, applications should not modify it
anymore. Therefore, this method should only be called on
freshly constructed LogRecords.
sourceClassName - the name of the class that issued the
logging request, or null to indicate that
this information could not be obtained.public void setSourceMethodName(java.lang.String sourceMethodName)As soon as a LogRecord has been handed over
to the logging framework, applications should not modify it
anymore. Therefore, this method should only be called on
freshly constructed LogRecords.
sourceMethodName - the name of the method that issued the
logging request, or null to indicate that
this information could not be obtained.public void setThreadID(int threadID)LogRecord was created. The identifier is not
necessarily related to any thread identifiers used by the
operating system.
As soon as a LogRecord has been handed over
to the logging framework, applications should not modify it
anymore. Therefore, this method should only be called on
freshly constructed LogRecords.
threadID - the identifier for the source thread.public void setThrown(java.lang.Throwable thrown)LogRecord with an exception or error.
As soon as a LogRecord has been handed over
to the logging framework, applications should not modify it
anymore. Therefore, this method should only be called on
freshly constructed LogRecords.
thrown - the exception or error to associate with, or
null if this LogRecord
should be made unrelated to an exception or error.
LogRecordcontains the state for an individual event to be logged.As soon as a LogRecord instance has been handed over to the logging framework, applications should not manipulate it anymore.