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


Java Logger.LEVEL_DEBUG属性代码示例

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


在下文中一共展示了Logger.LEVEL_DEBUG属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getThreshold

@Override
public int getThreshold()
{
    if ( delegate.isErrorEnabled() )
    {
        return Logger.LEVEL_ERROR;
    }
    else if ( delegate.isWarnEnabled() )
    {
        return Logger.LEVEL_WARN;
    }
    else if ( delegate.isInfoEnabled() )
    {
        return Logger.LEVEL_INFO;
    }

    return Logger.LEVEL_DEBUG;
}
 
开发者ID:simpligility,项目名称:android-ndk-maven-plugin,代码行数:18,代码来源:MavenToPlexusLogAdapter.java

示例2: getMavenLogLevel

private int getMavenLogLevel()
{
    switch (logLevel)
    {
        case "DEBUG":
            return Logger.LEVEL_DEBUG;
        case "WARN":
            return Logger.LEVEL_WARN;
        case "ERROR":
            return Logger.LEVEL_ERROR;
        case "FATAL":
            return Logger.LEVEL_FATAL;
        case "DISABLED":
            return Logger.LEVEL_DISABLED;
        case "INFO":
        default:
            return Logger.LEVEL_INFO;
    }
}
 
开发者ID:alexcojocaru,项目名称:elasticsearch-maven-plugin,代码行数:19,代码来源:AbstractElasticsearchBaseMojo.java

示例3: determineThreshold

/**
 * Determine a {@link Logger} level based on the configuration of the given
 * {@link Log}.
 * 
 * @param log
 *            The {@link Log} to determine the logger level.
 * @return A {@link Logger} level corresponding to the log level in the
 *         given {@link Log}.
 */
private static int determineThreshold(Log log) {
    if (log.isDebugEnabled()) {
        return Logger.LEVEL_DEBUG;
    } else if (log.isInfoEnabled()) {
        return Logger.LEVEL_INFO;
    } else if (log.isWarnEnabled()) {
        return Logger.LEVEL_WARN;
    } else if (log.isErrorEnabled()) {
        return Logger.LEVEL_ERROR;
    } else {
        return Logger.LEVEL_DISABLED;
    }
}
 
开发者ID:jrh3k5,项目名称:flume-plugin-maven-plugin,代码行数:22,代码来源:MojoLogger.java

示例4: setUp

@Override
protected void setUp()
    throws Exception
{
    super.setUp();

    updateCheckManager = new DefaultUpdateCheckManager( new ConsoleLogger( Logger.LEVEL_DEBUG, "test" ) );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:8,代码来源:DefaultUpdateCheckManagerTest.java

示例5: PrintStreamLogger

public PrintStreamLogger() {
   this( Logger.LEVEL_DEBUG, "console", System.out );
}
 
开发者ID:ZsZs,项目名称:FitNesseLauncher,代码行数:3,代码来源:PrintStreamLogger.java

示例6: sendsLogMessagesThrough

/**
 * Slf4jAdapter can send log messages through.
 * @throws Exception If something wrong inside
 * @checkstyle NoWhitespaceAfter (100 lines)
 * @checkstyle ExecutableStatementCount (100 lines)
 */
@Test
public void sendsLogMessagesThrough() throws Exception {
    final Slf4jAdapter logger = new Slf4jAdapter(
        new DefaultLog(
            new ConsoleLogger(
                Logger.LEVEL_DEBUG,
                Slf4jAdapterTest.class.getName()
            )
        ),
        "com.jcabi.test"
    );
    logger.isTraceEnabled();
    logger.isDebugEnabled();
    logger.isInfoEnabled();
    logger.isWarnEnabled();
    logger.isErrorEnabled();
    MatcherAssert.assertThat(
        Slf4jAdapter.class.getName(),
        Matchers.equalTo(logger.getName())
    );
    logger.trace("trace-test message");
    logger.trace("trace-test-2", new IllegalArgumentException("trace-ex"));
    logger.trace("trace-test {}", "trace-message");
    logger.trace("trace-test {} {}", "trc1", "trc2");
    logger.trace("trace-test-2 {} {}", "trace-1", "trace-2");
    logger.debug("debug-test message");
    logger.debug("debug-test-2", new IllegalArgumentException("debug-ex"));
    logger.debug("debug-test {}", "debug-message");
    logger.debug("debug-test {} {}", "dbg1", "dbg2");
    logger.debug("debug-test-2 {} {}", "debug-1", "debug-2");
    logger.info("info-test message");
    logger.info("info-test-2", new IllegalArgumentException("info-ex"));
    logger.info("info-test {}", "info-message");
    logger.info("info-test {} {}", "inf1", "inf2");
    logger.info("info-test-2 {} {}", "info-1", "info-2");
    logger.warn("warn-test message");
    logger.warn("warn-test-2", new IllegalArgumentException("warn-ex"));
    logger.warn("warn-test {}", "warn-message");
    logger.warn("warn-test {} {}", "warn--1", "warn--2");
    logger.warn("warn-test-2 {} {}", "warn-1", "warn-2");
    logger.error("error-test message");
    logger.error("error-test-2", new IllegalArgumentException("error-ex"));
    logger.error("error-test {}", "error-message");
    logger.error("error-test {} {}", "error-1", "error-2");
    logger.error("error-test-2 {} {}", "err-1", "err-2");
}
 
开发者ID:jcabi,项目名称:jcabi-maven-slf4j,代码行数:52,代码来源:Slf4jAdapterTest.java

示例7: LoggingRule

public LoggingRule() {
    this(new DefaultLog(new ConsoleLogger(Logger.LEVEL_DEBUG, "junit")));
}
 
开发者ID:ImmobilienScout24,项目名称:deadcode4j,代码行数:3,代码来源:LoggingRule.java


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