@Deprecated
public final class RT_LogHandler
extends java.util.logging.Handler
During use of the API, status and error messages are logged to stderr by
default. This class should be used to specify a file to log to. In addition,
applications can use this Handler
to log their own messages.
To use this class, this Handler
should be added to a
Logger
instance by invoking the
Logger.addHandler(Handler)
method.
Logger
Constructor and Description |
---|
RT_LogHandler(java.lang.String filename)
Deprecated.
Constructs an
RT_LogHandler that will log to the given file. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
Closes the
RT_LogHandler and associated file. |
void |
flush()
Deprecated.
Returns silently.
|
boolean |
isLoggable(java.util.logging.LogRecord record)
Deprecated.
Check if this
RT_LogHandler would actually log a given
LogRecord . |
void |
publish(java.util.logging.LogRecord record)
Deprecated.
Publishes a
LogRecord to the associated log file. |
void |
setLevel(java.util.logging.Level newLevel)
Deprecated.
|
java.lang.String |
toString()
Deprecated.
Returns a brief description of this
RT_LogHandler . |
public RT_LogHandler(java.lang.String filename) throws java.io.FileNotFoundException
RT_LogHandler
that will log to the given file.
If the file exists, the old file will be renamed with a ".old" extension.
filename
- the file to publish log messages tojava.io.FileNotFoundException
- if the file could not be openedjava.lang.NullPointerException
- if filename
is nullpublic void publish(java.util.logging.LogRecord record)
LogRecord
to the associated log file.
The logging request was made initially to a Logger
object,
which initialized the LogRecord
and forwarded it here.
publish
in class java.util.logging.Handler
record
- a description of the log eventpublic void setLevel(java.util.logging.Level newLevel) throws java.lang.SecurityException
setLevel
in class java.util.logging.Handler
java.lang.SecurityException
public void flush()
flush
in class java.util.logging.Handler
public void close()
RT_LogHandler
and associated file.
After close has been called this RT_LogHandler
should no
longer be used. Method calls will be silently ignored.
close
in class java.util.logging.Handler
public boolean isLoggable(java.util.logging.LogRecord record)
RT_LogHandler
would actually log a given
LogRecord
.
This method checks if the log file is open, the LogRecord
has an appropriate Level
and whether it satisfies any
Filter
.
isLoggable
in class java.util.logging.Handler
record
- a description of the log eventpublic java.lang.String toString()
RT_LogHandler
.toString
in class java.lang.Object
RT_LogHandler
.