| Method from sun.rmi.runtime.Log Detail: |
public static Log getLog(String loggerName,
String oldLogName,
int override) {
boolean useOld =
Boolean.valueOf(java.security.AccessController.
doPrivileged(new sun.security.action.GetPropertyAction(
"sun.rmi.log.useOld"))).booleanValue();
/* set factory to select the logging facility to use */
logFactory = (useOld ? (LogFactory) new LogStreamLogFactory() :
(LogFactory) new LoggerLogFactory());
Level level;
if (override < 0) {
level = null;
} else if (override == LogStream.SILENT) {
level = Level.OFF;
} else if ((override > LogStream.SILENT) &&
(override < = LogStream.BRIEF)) {
level = BRIEF;
} else if ((override > LogStream.BRIEF) &&
(override < = LogStream.VERBOSE))
{
level = VERBOSE;
} else {
level = Level.FINEST;
}
return logFactory.createLog(loggerName, oldLogName, level);
}
Access log for a tri-state system property.
Need to first convert override value to a log level, taking
care to interpret a range of values between BRIEF, VERBOSE and
SILENT.
An override < 0 is interpreted to mean that the logging
configuration should not be overridden. The level passed to the
factories createLog method will be null in this case.
Note that if oldLogName is null and old logging is on, the
returned LogStreamLog will ignore the override parameter - the
log will never log messages. This permits new logs that only
write to Loggers to do nothing when old logging is active.
Do not call getLog multiple times on the same logger name.
Since this is an internal API, no checks are made to ensure
that multiple logs do not exist for the same logger. |
public static Log getLog(String loggerName,
String oldLogName,
boolean override) {
Level level = (override ? VERBOSE : null);
return logFactory.createLog(loggerName, oldLogName, level);
}
Access logs associated with boolean properties
Do not call getLog multiple times on the same logger name.
Since this is an internal API, no checks are made to ensure
that multiple logs do not exist for the same logger. |
abstract public PrintStream getPrintStream()
|
abstract public boolean isLoggable(Level level)
"logger like" API to be used by RMI implementation |
abstract public void log(Level level,
String message)
|
abstract public void log(Level level,
String message,
Throwable thrown)
|
abstract public void setOutputStream(OutputStream stream)
get and set the RMI server call output stream |