Документ взят из кэша поисковой машины. Адрес оригинального документа : http://angel.cs.msu.su/projects/system/toolsdoc/netcdf_java/ucar/util/RMILogger.html
Дата изменения: Tue Dec 28 20:59:06 2004
Дата индексирования: Sun Apr 10 00:13:27 2016
Кодировка:
: Class RMILogger

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.


Fields inherited from interface ucar.util.Logger
ALERT, CRIT, DEBUG, EMERG, ERR, INFO, NOTICE, WARNING
 
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 ucar.util.AbstractLogger
logDebug, logError, logInfo, logLogException, logNotice
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ucar.util.Logger
logDebug, logError, logInfo, logNotice
 

Constructor Detail

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.
Method Detail

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.