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