本文整理汇总了Java中java.rmi.server.LogStream.BRIEF属性的典型用法代码示例。如果您正苦于以下问题:Java LogStream.BRIEF属性的具体用法?Java LogStream.BRIEF怎么用?Java LogStream.BRIEF使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类java.rmi.server.LogStream
的用法示例。
在下文中一共展示了LogStream.BRIEF属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getLog
/**
* 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,
int override)
{
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);
}
示例2: getLog
/**
* 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 {@literal <} 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,
int override)
{
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);
}