git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1436973 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2013-01-22 14:46:27 +00:00
parent caa032403d
commit e50dcce6e3
1 changed files with 25 additions and 2 deletions

View File

@ -27,7 +27,7 @@ import org.springframework.stereotype.Service;
* @author Olivier Lamy
* @since 1.4-M4
*/
@Service( "javascriptLogger#default" )
@Service("javascriptLogger#default")
public class DefaultJavascriptLogger
implements JavascriptLogger
{
@ -37,7 +37,10 @@ public class DefaultJavascriptLogger
{
Logger toUse =
javascriptLog.getLoggerName() == null ? logger : LoggerFactory.getLogger( javascriptLog.getLoggerName() );
if ( javascriptLog.getMessage() == null )
{
return Boolean.TRUE;
}
toUse.trace( javascriptLog.getMessage() );
return Boolean.TRUE;
}
@ -47,6 +50,11 @@ public class DefaultJavascriptLogger
Logger toUse =
javascriptLog.getLoggerName() == null ? logger : LoggerFactory.getLogger( javascriptLog.getLoggerName() );
if ( javascriptLog.getMessage() == null )
{
return Boolean.TRUE;
}
toUse.debug( javascriptLog.getMessage() );
return Boolean.TRUE;
}
@ -56,6 +64,11 @@ public class DefaultJavascriptLogger
Logger toUse =
javascriptLog.getLoggerName() == null ? logger : LoggerFactory.getLogger( javascriptLog.getLoggerName() );
if ( javascriptLog.getMessage() == null )
{
return Boolean.TRUE;
}
toUse.info( javascriptLog.getMessage() );
return Boolean.TRUE;
}
@ -65,6 +78,11 @@ public class DefaultJavascriptLogger
Logger toUse =
javascriptLog.getLoggerName() == null ? logger : LoggerFactory.getLogger( javascriptLog.getLoggerName() );
if ( javascriptLog.getMessage() == null )
{
return Boolean.TRUE;
}
toUse.warn( javascriptLog.getMessage() );
return Boolean.TRUE;
}
@ -74,6 +92,11 @@ public class DefaultJavascriptLogger
Logger toUse =
javascriptLog.getLoggerName() == null ? logger : LoggerFactory.getLogger( javascriptLog.getLoggerName() );
if ( javascriptLog.getMessage() == null )
{
return Boolean.TRUE;
}
toUse.error( javascriptLog.getMessage() );
return Boolean.TRUE;
}