diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultJavascriptLogger.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultJavascriptLogger.java index 0594a5f18..37a320a2f 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultJavascriptLogger.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultJavascriptLogger.java @@ -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; }