当前位置: 首页>>代码示例>>Java>>正文


Java LogStream.VERBOSE属性代码示例

本文整理汇总了Java中java.rmi.server.LogStream.VERBOSE属性的典型用法代码示例。如果您正苦于以下问题:Java LogStream.VERBOSE属性的具体用法?Java LogStream.VERBOSE怎么用?Java LogStream.VERBOSE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在java.rmi.server.LogStream的用法示例。


在下文中一共展示了LogStream.VERBOSE属性的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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:41,代码来源:Log.java

示例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);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:41,代码来源:Log.java


注:本文中的java.rmi.server.LogStream.VERBOSE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。