本文整理汇总了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;
}
示例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;
}
}
示例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;
}
}
示例4: setUp
@Override
protected void setUp()
throws Exception
{
super.setUp();
updateCheckManager = new DefaultUpdateCheckManager( new ConsoleLogger( Logger.LEVEL_DEBUG, "test" ) );
}
示例5: PrintStreamLogger
public PrintStreamLogger() {
this( Logger.LEVEL_DEBUG, "console", System.out );
}
示例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");
}
示例7: LoggingRule
public LoggingRule() {
this(new DefaultLog(new ConsoleLogger(Logger.LEVEL_DEBUG, "junit")));
}