本文整理汇总了Java中org.codehaus.plexus.logging.Logger.LEVEL_INFO属性的典型用法代码示例。如果您正苦于以下问题:Java Logger.LEVEL_INFO属性的具体用法?Java Logger.LEVEL_INFO怎么用?Java Logger.LEVEL_INFO使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.codehaus.plexus.logging.Logger
的用法示例。
在下文中一共展示了Logger.LEVEL_INFO属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: tearDown
@After
public void tearDown() {
ByteArrayOutputStream logStream = new ByteArrayOutputStream();
Log log = new DefaultLog( new PrintStreamLogger( Logger.LEVEL_INFO, "test", new PrintStream( logStream ) ) );
new FitNesseHelper( log ).shutdownFitNesseServer( PORT );
assertThat( new FitNesseThreadLocator( log ).findFitNesseServerThread(), nullValue() );
}
示例4: setUp
@Before public void setUp() {
logStream = new ByteArrayOutputStream();
Log log = new DefaultLog( new PrintStreamLogger( Logger.LEVEL_INFO, "test", new PrintStream( logStream ) ) );
fitNesseHelper = new FitNesseHelper( log );
baseDir = new File( "/tmp", BASE_DIR );
baseDir.mkdir();
baseDirWhitespace = new File( "/tmp", BASE_DIR.replace( "BASEDIR", "BASE DIR" ) );
baseDirWhitespace.mkdir();
}
示例5: 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;
}
}
示例6: PrintStreamLogger
public PrintStreamLogger( Provider provider )
{
super( Logger.LEVEL_INFO, Maven.class.getName() );
if ( provider == null )
{
throw new IllegalArgumentException( "output stream provider missing" );
}
this.provider = provider;
}
示例7: createDefaultLog
public static Log createDefaultLog(ByteArrayOutputStream logStream) {
return new DefaultLog( new PrintStreamLogger( Logger.LEVEL_INFO, "test", new PrintStream( logStream ) ) );
}
示例8: PlexusLoggerWrapper
public PlexusLoggerWrapper(Log log) {
super(Logger.LEVEL_INFO, log.toString());
this.log = log;
}