mirror of https://github.com/apache/maven.git
Added isXXXEnabled() methods to Log.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@168486 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
eb0807bb45
commit
acabb9d990
|
@ -76,4 +76,24 @@ public class DefaultLog
|
|||
logger.error( "", error );
|
||||
}
|
||||
|
||||
public boolean isDebugEnabled()
|
||||
{
|
||||
return logger.isDebugEnabled();
|
||||
}
|
||||
|
||||
public boolean isInfoEnabled()
|
||||
{
|
||||
return logger.isInfoEnabled();
|
||||
}
|
||||
|
||||
public boolean isWarnEnabled()
|
||||
{
|
||||
return logger.isWarnEnabled();
|
||||
}
|
||||
|
||||
public boolean isErrorEnabled()
|
||||
{
|
||||
return logger.isErrorEnabled();
|
||||
}
|
||||
|
||||
}
|
|
@ -6,24 +6,32 @@ package org.apache.maven.monitor.logging;
|
|||
public interface Log
|
||||
{
|
||||
|
||||
boolean isDebugEnabled();
|
||||
|
||||
void debug( CharSequence content );
|
||||
|
||||
void debug( CharSequence content, Throwable error );
|
||||
|
||||
void debug( Throwable error );
|
||||
|
||||
boolean isInfoEnabled();
|
||||
|
||||
void info( CharSequence content );
|
||||
|
||||
void info( CharSequence content, Throwable error );
|
||||
|
||||
void info( Throwable error );
|
||||
|
||||
boolean isWarnEnabled();
|
||||
|
||||
void warn( CharSequence content );
|
||||
|
||||
void warn( CharSequence content, Throwable error );
|
||||
|
||||
void warn( Throwable error );
|
||||
|
||||
boolean isErrorEnabled();
|
||||
|
||||
void error( CharSequence content );
|
||||
|
||||
void error( CharSequence content, Throwable error );
|
||||
|
|
|
@ -105,4 +105,25 @@ public class SystemStreamLog
|
|||
System.out.println( "[" + prefix + "] " + content.toString() + "\n\n" + sWriter.toString() );
|
||||
}
|
||||
|
||||
public boolean isDebugEnabled()
|
||||
{
|
||||
// TODO: Not sure how best to set these for this implementation...
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isInfoEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isWarnEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isErrorEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue