79 public abstract void log(Level level, String message, Throwable thrown);
80
81 /** get and set the RMI server call output stream */
82 public abstract void setOutputStream(OutputStream stream);
83 public abstract PrintStream getPrintStream();
84
85 /** factory interface enables Logger and LogStream implementations */
86 private static interface LogFactory {
87 Log createLog(String loggerName, String oldLogName, Level level);
88 }
89
90 /* access log objects */
91
92 /**
93 * Access log for a tri-state system property.
94 *
95 * Need to first convert override value to a log level, taking
96 * care to interpret a range of values between BRIEF, VERBOSE and
97 * SILENT.
98 *
99 * An override < 0 is interpreted to mean that the logging
100 * configuration should not be overridden. The level passed to the
101 * factories createLog method will be null in this case.
102 *
103 * Note that if oldLogName is null and old logging is on, the
104 * returned LogStreamLog will ignore the override parameter - the
105 * log will never log messages. This permits new logs that only
106 * write to Loggers to do nothing when old logging is active.
107 *
108 * Do not call getLog multiple times on the same logger name.
109 * Since this is an internal API, no checks are made to ensure
110 * that multiple logs do not exist for the same logger.
111 */
112 public static Log getLog(String loggerName, String oldLogName,
113 int override)
114 {
115 Level level;
116
117 if (override < 0) {
118 level = null;
119 } else if (override == LogStream.SILENT) {
|
79 public abstract void log(Level level, String message, Throwable thrown);
80
81 /** get and set the RMI server call output stream */
82 public abstract void setOutputStream(OutputStream stream);
83 public abstract PrintStream getPrintStream();
84
85 /** factory interface enables Logger and LogStream implementations */
86 private static interface LogFactory {
87 Log createLog(String loggerName, String oldLogName, Level level);
88 }
89
90 /* access log objects */
91
92 /**
93 * Access log for a tri-state system property.
94 *
95 * Need to first convert override value to a log level, taking
96 * care to interpret a range of values between BRIEF, VERBOSE and
97 * SILENT.
98 *
99 * An override {@literal <} 0 is interpreted to mean that the logging
100 * configuration should not be overridden. The level passed to the
101 * factories createLog method will be null in this case.
102 *
103 * Note that if oldLogName is null and old logging is on, the
104 * returned LogStreamLog will ignore the override parameter - the
105 * log will never log messages. This permits new logs that only
106 * write to Loggers to do nothing when old logging is active.
107 *
108 * Do not call getLog multiple times on the same logger name.
109 * Since this is an internal API, no checks are made to ensure
110 * that multiple logs do not exist for the same logger.
111 */
112 public static Log getLog(String loggerName, String oldLogName,
113 int override)
114 {
115 Level level;
116
117 if (override < 0) {
118 level = null;
119 } else if (override == LogStream.SILENT) {
|