ucar.util
Class RMILogger
java.lang.Object
|
+--ucar.util.AbstractLogger
|
+--ucar.util.RMILogger
- All Implemented Interfaces:
- Logger
- public class RMILogger
- extends AbstractLogger
- implements Logger
This is a concrete implementation of the Logger interface
which retains consistancy and interoperability with the logging
done by java.rmi.server.RemoteServer
If the log level of this is set to a value greater than
Logger.NOTICE, then rmi server logging is turned on,
directed to the same output stream.
|
Constructor Summary |
RMILogger()
Default construct prints messages of
priority up to Logger.NOTICE
on System.err. |
RMILogger(int maxLevel,
java.io.OutputStream logStream)
Construct a logger that prints messages of
priority up to maxLevel on logStream. |
|
Method Summary |
void |
log(int level,
java.lang.String message)
Arrange to log the message
at the given level. |
void |
logUpTo(int maxLevel)
Control the verbosity of this Logger. |
void |
setLog(java.io.OutputStream logStream)
Set the OutputStream where log messages will be printed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RMILogger
public RMILogger(int maxLevel,
java.io.OutputStream logStream)
- Construct a logger that prints messages of
priority up to
maxLevel on logStream.
RMILogger
public RMILogger()
- Default construct prints messages of
priority up to
Logger.NOTICE
on System.err.
setLog
public void setLog(java.io.OutputStream logStream)
- Set the OutputStream where log messages will be printed.
If the log level is greater than
Logger.NOTICE,
then java.rmi.server.RemoteServer.setLog(logStream)
is called.
- See Also:
RemoteServer.setLog(java.io.OutputStream)
logUpTo
public void logUpTo(int maxLevel)
- Control the verbosity of this Logger.
Messages tagged with level above
maxLevel are discarded.
- Specified by:
logUpTo in interface Logger
log
public void log(int level,
java.lang.String message)
throws java.io.IOException
- Arrange to log the
message
at the given level.
- Specified by:
log in interface Logger
- Following copied from interface:
ucar.util.Logger
- Parameters:
level - Int value which is one of
EMERG,
ALERT,
CRIT,
ERR,
WARNING,
NOTICE,
INFO, or
DEBUG.String - message to be logged.