myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From we...@apache.org
Subject svn commit: r912236 [1/2] - in /myfaces/extensions/scripting/trunk: core/core-java6/src/main/java/org/apache/myfaces/scripting/loaders/java/jsr199/ core/core/src/main/java/org/apache/myfaces/scripting/api/ core/core/src/main/java/org/apache/myfaces/scr...
Date Sat, 20 Feb 2010 21:51:01 GMT
Author: werpu
Date: Sat Feb 20 21:50:59 2010
New Revision: 912236

URL: http://svn.apache.org/viewvc?rev=912236&view=rev
Log:
changing from commons-logging to jul

Modified:
    myfaces/extensions/scripting/trunk/core/core-java6/src/main/java/org/apache/myfaces/scripting/loaders/java/jsr199/JSR199Compiler.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/BaseWeaver.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/MyFacesBeanHandler.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/components/CompilerComponentRenderer.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/dependencyScan/DefaultDependencyScanner.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/reloading/SimpleReloadingStrategy.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/util/ReflectUtil.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/util/WeavingContext.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/jsf/StartupServletContextPlugin.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/GroovyScriptingWeaver.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/ScanningGroovyClassloader.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/compiler/GroovyCompiler.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/compiler/GroovyCompilerFacade.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaDependencyScanner.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaDependencyScannerMT.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/ScannerClassloader.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/ThrowawayClassloader.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/compiler/CompilerFacade.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/compiler/JavacCompiler.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/refresh/FileChangedDaemon.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/compiler/CompilerFactory.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/compiler/GroovyCompiler.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/compiler/JavacCompiler.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/loader/ClassLoaderUtils.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/loader/ReloadingClassLoader.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/loader/support/ClassFileLoader.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/servlet/CustomChainLoader.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/servlet/ScriptingServletFilter.java
    myfaces/extensions/scripting/trunk/core/core/src/test/java/org/apache/myfaces/extensions/scripting/dependencyScan/DependencyScannerTest.java
    myfaces/extensions/scripting/trunk/core/core/src/test/java/org/apache/myfaces/scripting/core/compilerTest/TestCompilerAPI.java
    myfaces/extensions/scripting/trunk/core/myfaces12-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ReroutingResourceResolver.java
    myfaces/extensions/scripting/trunk/core/myfaces12-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ELResolverProxy.java
    myfaces/extensions/scripting/trunk/core/myfaces12-extensions/src/main/java/org/apache/myfaces/scripting/servlet/StartupServletContextPluginChainLoader.java
    myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ReroutingResourceResolver.java
    myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ELResolverProxy.java
    myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BaseAnnotationScanListener.java
    myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BeanImplementationListener.java
    myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BehaviorImplementationListener.java
    myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BehaviorRendererImplementationListener.java
    myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/ComponentImplementationListener.java
    myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/RendererImplementationListener.java
    myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/servlet/StartupServletContextPluginChainLoader.java
    myfaces/extensions/scripting/trunk/examples/myfaces12-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/Blog.groovy
    myfaces/extensions/scripting/trunk/examples/myfaces12-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/BlogService.groovy
    myfaces/extensions/scripting/trunk/examples/myfaces12-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/JSFUtil.groovy
    myfaces/extensions/scripting/trunk/examples/myfaces12-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/Blog.java
    myfaces/extensions/scripting/trunk/examples/myfaces12-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/JSFUtil.java
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/Blog.groovy
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/BlogService.groovy
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/BlogService2.groovy
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/JSFUtil.groovy
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/Blog.java
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/componentTest/JavaTestRenderer1.java
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/validatorConverterTest/TestValidator1.java
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/validatorConverterTest/TestValidator2.java
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/web.xml

Modified: myfaces/extensions/scripting/trunk/core/core-java6/src/main/java/org/apache/myfaces/scripting/loaders/java/jsr199/JSR199Compiler.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core-java6/src/main/java/org/apache/myfaces/scripting/loaders/java/jsr199/JSR199Compiler.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core-java6/src/main/java/org/apache/myfaces/scripting/loaders/java/jsr199/JSR199Compiler.java (original)
+++ myfaces/extensions/scripting/trunk/core/core-java6/src/main/java/org/apache/myfaces/scripting/loaders/java/jsr199/JSR199Compiler.java Sat Feb 20 21:50:59 2010
@@ -18,20 +18,20 @@
  */
 package org.apache.myfaces.scripting.loaders.java.jsr199;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.scripting.sandbox.compiler.CompilationResult;
 import org.apache.myfaces.scripting.api.CompilationException;
 import org.apache.myfaces.scripting.api.CompilerConst;
 import org.apache.myfaces.scripting.api.ScriptingConst;
 import org.apache.myfaces.scripting.core.util.FileUtils;
 import org.apache.myfaces.scripting.core.util.WeavingContext;
+import org.apache.myfaces.scripting.sandbox.compiler.CompilationResult;
 
 import javax.tools.*;
 import java.io.File;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Locale;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * <p>
@@ -144,12 +144,12 @@
      */
     private void handleDiagnostics(DiagnosticCollector<JavaFileObject> diagnosticCollector) throws ClassNotFoundException {
         if (diagnosticCollector.getDiagnostics().size() > 0) {
-            Log log = LogFactory.getLog(this.getClass());
+            Logger log = Logger.getLogger(this.getClass().getName());
             StringBuilder errors = new StringBuilder();
             CompilationResult result = new CompilationResult("");
             for (Diagnostic diagnostic : diagnosticCollector.getDiagnostics()) {
                 String error = createErrorMessage(diagnostic);
-                log.error(error);
+                log.log(Level.WARNING, "[EXT-SCRIPTING] Compiler: {0}", error);
                 result.getErrors().add(new CompilationResult.CompilationMessage(diagnostic.getLineNumber(), diagnostic.getMessage(Locale.getDefault())));
                 errors.append(error);
             }
@@ -183,7 +183,7 @@
 
         String source = "No additional source info";
 
-        if(diagnostic.getSource() != null) {
+        if (diagnostic.getSource() != null) {
             source = diagnostic.getSource().toString();
         }
         retVal.append(source);
@@ -191,8 +191,8 @@
         return retVal.toString();
     }
 
-    private final Log getLog() {
-        return LogFactory.getLog(this.getClass());
+    private final Logger getLog() {
+        return Logger.getLogger(this.getClass().getName());
     }
 
 }

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/BaseWeaver.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/BaseWeaver.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/BaseWeaver.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/BaseWeaver.java Sat Feb 20 21:50:59 2010
@@ -18,18 +18,18 @@
  */
 package org.apache.myfaces.scripting.api;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.scripting.core.reloading.GlobalReloadingStrategy;
 import org.apache.myfaces.scripting.core.util.ClassUtils;
 import org.apache.myfaces.scripting.core.util.FileUtils;
 import org.apache.myfaces.scripting.core.util.WeavingContext;
-import org.apache.myfaces.scripting.refresh.ReloadingMetadata;
 import org.apache.myfaces.scripting.refresh.RefreshContext;
+import org.apache.myfaces.scripting.refresh.ReloadingMetadata;
 
 import javax.faces.context.FacesContext;
 import java.io.File;
 import java.util.*;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * @author Werner Punz
@@ -67,7 +67,8 @@
 
     private BeanHandler _beanHandler;
     protected String _classPath = "";
-    protected Log _log = LogFactory.getLog(this.getClass());
+
+    Logger _log = Logger.getLogger(this.getClass().getName());
 
     private String _fileEnding = null;
     private int _scriptingEngine = ScriptingConst.ENGINE_TYPE_NO_ENGINE;
@@ -156,7 +157,6 @@
      */
     public Class reloadScriptingClass(Class aclass) {
         ReloadingMetadata metadata = getClassMap().get(aclass.getName());
-        
 
         if (metadata == null)
             return aclass;
@@ -217,8 +217,8 @@
         return null;
     }
 
-    protected Log getLog() {
-        return LogFactory.getLog(this.getClass());
+    protected Logger getLog() {
+        return _log;
     }
 
     protected boolean assertScriptingEngine(ReloadingMetadata reloadMeta) {
@@ -336,7 +336,7 @@
                 if (!scriptPath.trim().equals(""))
                     _compiler.compileAllFiles(scriptPath, _classPath);
             } catch (ClassNotFoundException e) {
-                _log.error(e);
+                _log.log(Level.SEVERE, e.getMessage());
             }
 
         }
@@ -386,7 +386,7 @@
             return null;
         }
 
-        if (_log.isInfoEnabled()) {
+        if (_log.isLoggable(Level.INFO)) {
             _log.info(getLoadingInfo(file));
         }
 

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/MyFacesBeanHandler.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/MyFacesBeanHandler.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/MyFacesBeanHandler.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/MyFacesBeanHandler.java Sat Feb 20 21:50:59 2010
@@ -1,7 +1,5 @@
 package org.apache.myfaces.scripting.api;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.config.RuntimeConfig;
 import org.apache.myfaces.config.element.ListEntries;
 import org.apache.myfaces.config.element.ManagedBean;
@@ -14,6 +12,8 @@
 
 import javax.faces.context.FacesContext;
 import java.util.*;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * Bean handler implementation
@@ -300,8 +300,8 @@
      */
 
     private void removeBeanReferences(ManagedBean bean) {
-        if (getLog().isInfoEnabled()) {
-            getLog().info("[EXT-SCRIPTING] JavaScriptingWeaver.removeBeanReferences(" + bean.getManagedBeanName() + ")");
+        if (getLog().isLoggable(Level.INFO)) {
+            getLog().log(Level.INFO,"[EXT-SCRIPTING] JavaScriptingWeaver.removeBeanReferences({0})", bean.getManagedBeanName());
         }
 
         String scope = bean.getManagedBeanScope();
@@ -319,8 +319,8 @@
     /**
      * @return the log for this class
      */
-    protected Log getLog() {
-        return LogFactory.getLog(this.getClass());
+    protected Logger getLog() {
+        return Logger.getLogger(this.getClass().getName());
     }
 
     /**

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/components/CompilerComponentRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/components/CompilerComponentRenderer.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/components/CompilerComponentRenderer.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/components/CompilerComponentRenderer.java Sat Feb 20 21:50:59 2010
@@ -19,17 +19,16 @@
 package org.apache.myfaces.scripting.components;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.scripting.sandbox.compiler.CompilationResult;
 import org.apache.myfaces.scripting.api.ScriptingConst;
 import org.apache.myfaces.scripting.core.util.WeavingContext;
+import org.apache.myfaces.scripting.sandbox.compiler.CompilationResult;
 import org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.context.ResponseWriter;
 import java.io.IOException;
+import java.util.logging.Logger;
 
 /**
  * Renderer for the compiler component
@@ -68,8 +67,8 @@
 
                 break;
             case ScriptingConst.ENGINE_TYPE_NO_ENGINE:
-                Log log = LogFactory.getLog(this.getClass());
-                log.warn("Warning engine not found");
+                Logger log = Logger.getLogger(this.getClass().getName());
+                log.warning("Warning engine not found");
                 break;
 
         }

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/dependencyScan/DefaultDependencyScanner.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/dependencyScan/DefaultDependencyScanner.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/dependencyScan/DefaultDependencyScanner.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/dependencyScan/DefaultDependencyScanner.java Sat Feb 20 21:50:59 2010
@@ -18,13 +18,13 @@
  */
 package org.apache.myfaces.scripting.core.dependencyScan;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.objectweb.asm.ClassReader;
 
 import java.io.IOException;
 import java.util.HashSet;
 import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * @author Werner Punz (latest modification by $Author$)
@@ -39,7 +39,7 @@
 public class DefaultDependencyScanner implements DependencyScanner {
 
     final ClassScanVisitor cp = new ClassScanVisitor();
-    Log log = LogFactory.getLog(this.getClass().getName());
+    Logger log = Logger.getLogger(this.getClass().getName());
 
     public DefaultDependencyScanner() {
     }
@@ -82,7 +82,7 @@
             //our asm code normally covers this but since the scanner has to work outside of asm we do it twice, the same goes for the hierarchy
             scanInterfaces(loader, retVal, whiteList, toCheck);
         } catch (ClassNotFoundException e) {
-            log.error("DefaultDependencyScanner.investigateInheritanceHierarchy()" + e);
+            log.log(Level.SEVERE, "DefaultDependencyScanner.investigateInheritanceHierarchy() {0}", e.getMessage());
         }
     }
 
@@ -149,7 +149,7 @@
             cr = new ExtendedClassReader(loader, currentClassName);
             cr.accept(cp, 0);
         } catch (IOException e) {
-            log.error(e);
+            log.log(Level.SEVERE, "scanCurrentClass () {0}", e.getMessage());
         }
     }
 

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/reloading/SimpleReloadingStrategy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/reloading/SimpleReloadingStrategy.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/reloading/SimpleReloadingStrategy.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/reloading/SimpleReloadingStrategy.java Sat Feb 20 21:50:59 2010
@@ -19,12 +19,12 @@
 package org.apache.myfaces.scripting.core.reloading;
 
 import org.apache.commons.beanutils.BeanUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.scripting.api.ReloadingStrategy;
 import org.apache.myfaces.scripting.api.ScriptingWeaver;
 
 import java.lang.reflect.InvocationTargetException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * @author Werner Punz (latest modification by $Author$)
@@ -82,7 +82,7 @@
 
             return newObject;
         } catch (Exception e) {
-            getLog().error(e);
+            getLog().log(Level.SEVERE, "reload {0}", e.getMessage());
         }
         return null;
 
@@ -103,16 +103,16 @@
         try {
             BeanUtils.copyProperties(target, src);
         } catch (IllegalAccessException e) {
-            getLog().debug(e);
+            getLog().log(Level.FINEST,e.toString());
             //this is wanted
         } catch (InvocationTargetException e) {
-            getLog().debug(e);
+            getLog().log(Level.FINEST,e.toString());
             //this is wanted
         }
     }
 
-    protected Log getLog() {
-        return LogFactory.getLog(this.getClass());
+    protected Logger getLog() {
+        return Logger.getLogger(this.getClass().getName());
     }
 
     public ScriptingWeaver getWeaver() {

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/util/ReflectUtil.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/util/ReflectUtil.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/util/ReflectUtil.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/util/ReflectUtil.java Sat Feb 20 21:50:59 2010
@@ -18,15 +18,13 @@
  */
 package org.apache.myfaces.scripting.core.util;
 
-import org.apache.commons.logging.LogFactory;
-import org.apache.commons.logging.Log;
-
 import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
-import java.lang.reflect.InvocationHandler;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.logging.Logger;
 
 /**
  * @author Werner Punz (latest modification by $Author$)
@@ -35,7 +33,7 @@
 
 public class ReflectUtil {
 
-    static Log log = LogFactory.getLog(ReflectUtil.class);
+    static Logger log = Logger.getLogger(ReflectUtil.class.getName());
 
     public static Object instantiate(String clazz, Object... varargs) {
         return instantiate(ClassUtils.forName(clazz), varargs);

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/util/WeavingContext.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/util/WeavingContext.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/util/WeavingContext.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/util/WeavingContext.java Sat Feb 20 21:50:59 2010
@@ -18,9 +18,6 @@
  */
 package org.apache.myfaces.scripting.core.util;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.scripting.sandbox.compiler.CompilationResult;
 import org.apache.myfaces.scripting.api.Configuration;
 import org.apache.myfaces.scripting.api.Decorated;
 import org.apache.myfaces.scripting.api.ScriptingConst;
@@ -29,12 +26,14 @@
 import org.apache.myfaces.scripting.core.MethodLevelReloadingHandler;
 import org.apache.myfaces.scripting.refresh.FileChangedDaemon;
 import org.apache.myfaces.scripting.refresh.RefreshContext;
+import org.apache.myfaces.scripting.sandbox.compiler.CompilationResult;
 
 import javax.servlet.ServletContext;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Proxy;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.logging.Logger;
 
 /**
  * A set of weaving context class called
@@ -171,8 +170,8 @@
     public static ScriptingWeaver getWeaver() {
         ScriptingWeaver weaver = (ScriptingWeaver) _weaverHolder.get();
         if (weaver == null) {
-            Log log = LogFactory.getLog(WeavingContext.class);
-            log.warn(WARN_WEAVER_NOT_SET);
+            Logger log = Logger.getLogger(WeavingContext.class.getName());
+            log.warning(WARN_WEAVER_NOT_SET);
             _weaverHolder.set(new DummyWeaver());
         }
         return (ScriptingWeaver) _weaverHolder.get();

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/jsf/StartupServletContextPlugin.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/jsf/StartupServletContextPlugin.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/jsf/StartupServletContextPlugin.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/jsf/StartupServletContextPlugin.java Sat Feb 20 21:50:59 2010
@@ -18,12 +18,10 @@
  */
 package org.apache.myfaces.scripting.jsf;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import javax.servlet.ServletContextListener;
-import javax.servlet.ServletContextEvent;
 import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import java.util.logging.Logger;
 
 /**
  * Servlet context plugin which provides a cleaner initialisation
@@ -33,7 +31,7 @@
  */
 public class StartupServletContextPlugin implements ServletContextListener {
     public void contextInitialized(ServletContextEvent servletContextEvent) {
-        Log log = LogFactory.getLog(this.getClass());
+        Logger log = Logger.getLogger(this.getClass().getName());
 
         log.info("[EXT-SCRIPTING] Instantiating StartupServletContextPluginChainLoader");
 

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/GroovyScriptingWeaver.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/GroovyScriptingWeaver.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/GroovyScriptingWeaver.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/GroovyScriptingWeaver.java Sat Feb 20 21:50:59 2010
@@ -1,13 +1,10 @@
 package org.apache.myfaces.scripting.loaders.groovy;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.groovyloader.core.StandardGroovyReloadingStrategy;
 import org.apache.myfaces.scripting.api.*;
 import org.apache.myfaces.scripting.core.util.Cast;
 import org.apache.myfaces.scripting.core.util.ClassUtils;
 import org.apache.myfaces.scripting.core.util.ReflectUtil;
-import org.apache.myfaces.scripting.core.util.WeavingContext;
 import org.apache.myfaces.extensions.scripting.loaders.groovy.compiler.GroovyCompilerFacade;
 
 import javax.faces.context.FacesContext;

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/ScanningGroovyClassloader.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/ScanningGroovyClassloader.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/ScanningGroovyClassloader.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/ScanningGroovyClassloader.java Sat Feb 20 21:50:59 2010
@@ -19,20 +19,14 @@
 package org.apache.myfaces.scripting.loaders.groovy;
 
 import groovy.lang.GroovyClassLoader;
-import groovyjarjarasm.asm.ClassVisitor;
 import groovyjarjarasm.asm.ClassWriter;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.codehaus.groovy.ast.ClassNode;
-import org.codehaus.groovy.ast.ModuleNode;
 import org.codehaus.groovy.control.CompilationUnit;
 import org.codehaus.groovy.control.CompilerConfiguration;
 import org.codehaus.groovy.control.SourceUnit;
 
 import java.security.AccessController;
 import java.security.PrivilegedAction;
-import java.util.ArrayList;
-import java.util.Collection;
 
 /**
  * Scanning Groovy class loader

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/compiler/GroovyCompiler.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/compiler/GroovyCompiler.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/compiler/GroovyCompiler.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/compiler/GroovyCompiler.java Sat Feb 20 21:50:59 2010
@@ -18,14 +18,12 @@
  */
 package org.apache.myfaces.scripting.loaders.groovy.compiler;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.scripting.api.CompilationException;
-import org.apache.myfaces.scripting.sandbox.compiler.CompilationResult;
-import org.apache.myfaces.scripting.sandbox.loader.ClassLoaderUtils;
-import org.apache.myfaces.scripting.api.*;
+import org.apache.myfaces.scripting.api.ScriptingConst;
 import org.apache.myfaces.scripting.core.util.FileUtils;
 import org.apache.myfaces.scripting.core.util.WeavingContext;
+import org.apache.myfaces.scripting.sandbox.compiler.CompilationResult;
+import org.apache.myfaces.scripting.sandbox.loader.ClassLoaderUtils;
 import org.codehaus.groovy.control.CompilationFailedException;
 import org.codehaus.groovy.control.CompilationUnit;
 import org.codehaus.groovy.control.CompilerConfiguration;
@@ -37,8 +35,9 @@
 import java.io.File;
 import java.io.PrintWriter;
 import java.io.StringWriter;
-import java.lang.*;
 import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * <p>A compiler implementation that can be used to compile Groovy source files.</p>
@@ -48,7 +47,7 @@
     /**
      * The logger instance for this class.
      */
-    private static final Log logger = LogFactory.getLog(GroovyCompiler.class);
+    private static final Logger logger = Logger.getLogger(GroovyCompiler.class.getName());
 
     // ------------------------------------------ Compiler methods
 
@@ -170,9 +169,9 @@
             return new CompilationResult.CompilationMessage(
                     syntaxErrorMessage.getCause().getLine(), syntaxErrorMessage.getCause().getMessage());
         } else {
-            if (logger.isDebugEnabled()) {
-                logger.debug(
-                        "This compiler came across an unknown message kind ['" + message + "']. It will be ignored.");
+            if (logger.isLoggable(Level.FINE)) {
+                logger.log(Level.FINE,
+                        "This compiler came across an unknown message kind ['{0}']. It will be ignored.", message);
             }
 
             return null;

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/compiler/GroovyCompilerFacade.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/compiler/GroovyCompilerFacade.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/compiler/GroovyCompilerFacade.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/compiler/GroovyCompilerFacade.java Sat Feb 20 21:50:59 2010
@@ -18,18 +18,18 @@
  */
 package org.apache.myfaces.extensions.scripting.loaders.groovy.compiler;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.scripting.sandbox.compiler.CompilationResult;
-import org.apache.myfaces.scripting.sandbox.compiler.GroovyCompiler;
 import org.apache.myfaces.scripting.api.DynamicCompiler;
 import org.apache.myfaces.scripting.api.ScriptingConst;
 import org.apache.myfaces.scripting.core.util.ClassUtils;
 import org.apache.myfaces.scripting.core.util.FileUtils;
 import org.apache.myfaces.scripting.core.util.WeavingContext;
 import org.apache.myfaces.scripting.loaders.groovy.GroovyRecompiledClassloader;
+import org.apache.myfaces.scripting.sandbox.compiler.CompilationResult;
+import org.apache.myfaces.scripting.sandbox.compiler.GroovyCompiler;
 
 import java.io.File;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * @author Werner Punz (latest modification by $Author$)
@@ -43,7 +43,7 @@
 
     //ContainerFileManager fileManager = null;
 
-    Log log = LogFactory.getLog(this.getClass());
+    Logger log = Logger.getLogger(this.getClass().getName());
     GroovyCompiler compiler;
 
     public GroovyCompilerFacade() {
@@ -118,10 +118,10 @@
 
     private void displayMessages(CompilationResult result) {
         for (CompilationResult.CompilationMessage error : result.getErrors()) {
-            log.error("[EXT-SCRIPTING] Groovy compiler error:" + error.getLineNumber() + "-" + error.getMessage());
+            log.log(Level.WARNING, "[EXT-SCRIPTING] Groovy compiler error: {0} - {1}", new String[]{Long.toString(error.getLineNumber()), error.getMessage()});
         }
         for (CompilationResult.CompilationMessage error : result.getWarnings()) {
-            log.error("[EXT-SCRIPTING] Groovy compiler warning:" + error.getMessage());
+            log.log(Level.WARNING, "[EXT-SCRIPTING] Groovy compiler warning: {0}", error.getMessage());
         }
         WeavingContext.setCompilationResult(ScriptingConst.ENGINE_TYPE_GROOVY, result);
     }

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaDependencyScanner.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaDependencyScanner.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaDependencyScanner.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaDependencyScanner.java Sat Feb 20 21:50:59 2010
@@ -18,8 +18,6 @@
  */
 package org.apache.myfaces.scripting.loaders.java;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.scripting.api.ClassScanListener;
 import org.apache.myfaces.scripting.api.ClassScanner;
 import org.apache.myfaces.scripting.api.ScriptingConst;
@@ -30,6 +28,8 @@
 import org.apache.myfaces.scripting.refresh.ReloadingMetadata;
 
 import java.util.*;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * @author Werner Punz (latest modification by $Author$)
@@ -45,7 +45,7 @@
     DependencyScanner _dependecyScanner = new DefaultDependencyScanner();
 
     ScriptingWeaver _weaver;
-    Log log = LogFactory.getLog(JavaDependencyScanner.class.getName());
+    Logger log = Logger.getLogger(JavaDependencyScanner.class.getName());
 
     public JavaDependencyScanner(ScriptingWeaver weaver) {
         this._weaver = weaver;
@@ -60,7 +60,7 @@
             WeavingContext.getRefreshContext().setDependencyScanned(getEngineType(), true);
         }
 
-        if (log.isInfoEnabled()) {
+        if (log.isLoggable(Level.INFO)) {
             log.info("[EXT-SCRITPING] starting class dependency scan");
         }
         long start = System.currentTimeMillis();
@@ -72,8 +72,8 @@
         }
 
         long end = System.currentTimeMillis();
-        if (log.isInfoEnabled()) {
-            log.info("[EXT-SCRITPING] class dependency scan finished, duration: " + (end - start) + " ms");
+        if (log.isLoggable(Level.FINE)) {
+            log.log(Level.FINE, "[EXT-SCRITPING] class dependency scan finished, duration: {0} ms", Long.toString(end - start));
         }
 
     }

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaDependencyScannerMT.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaDependencyScannerMT.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaDependencyScannerMT.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaDependencyScannerMT.java Sat Feb 20 21:50:59 2010
@@ -18,8 +18,6 @@
  */
 package org.apache.myfaces.scripting.loaders.java;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.scripting.api.ClassScanListener;
 import org.apache.myfaces.scripting.api.ClassScanner;
 import org.apache.myfaces.scripting.api.ScriptingConst;
@@ -32,6 +30,8 @@
 
 import java.util.*;
 import java.util.concurrent.Semaphore;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * @author Werner Punz (latest modification by $Author$)
@@ -52,7 +52,7 @@
     final Stack<DependencyScanner> dependencyScanner = new Stack<DependencyScanner>();
 
     ScriptingWeaver _weaver;
-    Log log = LogFactory.getLog(JavaDependencyScannerMT.class.getName());
+    Logger log = Logger.getLogger(JavaDependencyScannerMT.class.getName());
 
     public JavaDependencyScannerMT(ScriptingWeaver weaver) {
         this._weaver = weaver;
@@ -63,7 +63,7 @@
 
     public synchronized void scanPaths() {
 
-        if (log.isInfoEnabled()) {
+        if (log.isLoggable(Level.INFO)) {
             log.info("[EXT-SCRITPING] starting class dependency scan");
         }
         long start = System.currentTimeMillis();
@@ -105,8 +105,8 @@
                 }
             }
             long end = System.currentTimeMillis();
-            if (log.isInfoEnabled()) {
-                log.info("[EXT-SCRITPING] class dependency scan finished, duration: " + (end - start) + " ms");
+            if (log.isLoggable(Level.FINE)) {
+                log.log(Level.FINE,"[EXT-SCRITPING] class dependency scan finished, duration: {0} ms",Long.toString(end - start));
             }
         } finally {
             WeavingContext.cleanThreadingData();

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/ScannerClassloader.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/ScannerClassloader.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/ScannerClassloader.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/ScannerClassloader.java Sat Feb 20 21:50:59 2010
@@ -1,9 +1,6 @@
 package org.apache.myfaces.scripting.loaders.java;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.scripting.core.util.ClassUtils;
-import org.apache.myfaces.scripting.core.util.FileUtils;
 import org.apache.myfaces.scripting.core.util.WeavingContext;
 import org.apache.myfaces.scripting.refresh.RefreshContext;
 import org.apache.myfaces.scripting.refresh.ReloadingMetadata;
@@ -12,7 +9,6 @@
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.InputStream;
-import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
 

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/ThrowawayClassloader.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/ThrowawayClassloader.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/ThrowawayClassloader.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/ThrowawayClassloader.java Sat Feb 20 21:50:59 2010
@@ -1,7 +1,5 @@
 package org.apache.myfaces.scripting.loaders.java;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.scripting.core.util.ClassUtils;
 import org.apache.myfaces.scripting.core.util.FileUtils;
 import org.apache.myfaces.scripting.core.util.WeavingContext;
@@ -13,10 +11,11 @@
 import java.io.FileNotFoundException;
 import java.io.InputStream;
 import java.util.Collection;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * we move the throw away mechanism into our classloader for cleaner code coverage
- * 
  */
 @JavaThrowAwayClassloader
 public class ThrowawayClassloader extends ClassLoader {
@@ -111,10 +110,10 @@
                     //storeReloadableDefinitions(className, target, fileLength, fileContent)
                     //try {
 
-                        retVal = super.defineClass(className, fileContent, 0, fileLength);
+                    retVal = super.defineClass(className, fileContent, 0, fileLength);
 
                     //} catch (java.lang.LinkageError e) {
-                        //something has interfered in a dirty manner (direct classforname instead) we generate a quick throw away classloader to fix this
+                    //something has interfered in a dirty manner (direct classforname instead) we generate a quick throw away classloader to fix this
                     //    ClassLoader loader = new RecompiledClassLoader(this.getParent(), _scriptingEngine, _engineExtension);
                     //    retVal = loader.loadClass(className);
                     //}
@@ -141,7 +140,6 @@
         return super.loadClass(className);
     }
 
-
     private Class<?> storeReloadableDefinitions(String className, File target, int fileLength, byte[] fileContent) {
         Class retVal;
         retVal = super.defineClass(className, fileContent, 0, fileLength);
@@ -164,8 +162,8 @@
         }
 
         if (rootDir == null) {
-            Log log = LogFactory.getLog(this.getClass().getName());
-            log.warn("Warning source for class:" + className + " could not be found");
+            Logger log = Logger.getLogger(this.getClass().getName());
+            log.log(Level.WARNING, "Warning source for class: {0} could not be found", className);
             return retVal;
         }
 

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/compiler/CompilerFacade.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/compiler/CompilerFacade.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/compiler/CompilerFacade.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/compiler/CompilerFacade.java Sat Feb 20 21:50:59 2010
@@ -18,8 +18,6 @@
  */
 package org.apache.myfaces.scripting.loaders.java.compiler;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.scripting.api.CompilationException;
 import org.apache.myfaces.scripting.api.DynamicCompiler;
 import org.apache.myfaces.scripting.api.ScriptingConst;
@@ -30,6 +28,8 @@
 import org.apache.myfaces.scripting.sandbox.compiler.CompilationResult;
 
 import java.io.File;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * @author Werner Punz (latest modification by $Author$)
@@ -42,7 +42,7 @@
 public class CompilerFacade implements DynamicCompiler {
     protected org.apache.myfaces.scripting.api.Compiler compiler = null;
 
-    Log log = LogFactory.getLog(this.getClass());
+    Logger log = Logger.getLogger(this.getClass().getName());
 
     public CompilerFacade() {
         super();
@@ -73,11 +73,11 @@
             CompilationResult result = compiler.compile(new File(sourceRoot), WeavingContext.getConfiguration().getCompileTarget(), classLoader);
             displayMessages(result);
             if (result.hasErrors()) {
-                log.error("Compiler output:" + result.getCompilerOutput());
+                log.log(Level.WARNING, "Compiler output:{0}", result.getCompilerOutput());
             }
 
         } catch (org.apache.myfaces.scripting.api.CompilationException e) {
-            log.error(e);
+            log.log(Level.SEVERE, "CompilationException : {0} {1}", new String[]{e.getMessage(), e.toString()});
         }
     }
 
@@ -118,18 +118,18 @@
             displayMessages(result);
             return WeavingContext.getConfiguration().getCompileTarget();
         } catch (CompilationException e) {
-            log.error(e);
+            log.log(Level.SEVERE, "CompilationException : {0} {1}", new String[]{e.getMessage(), e.toString()});
         }
         return null;
     }
 
     private void displayMessages(CompilationResult result) {
         for (CompilationResult.CompilationMessage error : result.getErrors()) {
-            log.error(error.getLineNumber() + "-" + error.getMessage());
+            log.log(Level.WARNING, "[EXT-SCRIPTING] Compile Error: {0} - {1}", new String[]{Long.toString(error.getLineNumber()), error.getMessage()});
 
         }
         for (CompilationResult.CompilationMessage error : result.getWarnings()) {
-            log.error(error.getMessage());
+            log.warning(error.getMessage());
         }
     }
 

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/compiler/JavacCompiler.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/compiler/JavacCompiler.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/compiler/JavacCompiler.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/compiler/JavacCompiler.java Sat Feb 20 21:50:59 2010
@@ -18,25 +18,27 @@
  */
 package org.apache.myfaces.scripting.loaders.java.compiler;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.scripting.sandbox.compiler.CompilationResult;
-import org.apache.myfaces.scripting.sandbox.loader.ClassLoaderUtils;
-import org.apache.myfaces.scripting.api.*;
+import org.apache.myfaces.scripting.api.CompilationException;
+import org.apache.myfaces.scripting.api.CompilerConst;
+import org.apache.myfaces.scripting.api.ScriptingConst;
 import org.apache.myfaces.scripting.core.util.ClassUtils;
 import org.apache.myfaces.scripting.core.util.FileUtils;
 import org.apache.myfaces.scripting.core.util.WeavingContext;
+import org.apache.myfaces.scripting.sandbox.compiler.CompilationResult;
+import org.apache.myfaces.scripting.sandbox.loader.ClassLoaderUtils;
 
 import java.io.File;
 import java.io.PrintWriter;
 import java.io.StringWriter;
-import java.net.URL;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
 import java.net.MalformedURLException;
+import java.net.URL;
 import java.net.URLClassLoader;
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
-import java.util.List;
 import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * <p>A compiler implementation that utilizes some internal classes that enable you to
@@ -54,7 +56,7 @@
     /**
      * The logger instance for this class.
      */
-    private static final Log logger = LogFactory.getLog(JavacCompiler.class);
+    private static final Logger logger = Logger.getLogger(JavacCompiler.class.getName());
 
     /**
      * The class name of the javac compiler. Note that this class
@@ -171,7 +173,7 @@
                     compilerArguments);
 
             CompilationResult result = new CompilationResult(compilerOutput.toString());
-            if (returnCode == null || returnCode.intValue() != 0) {
+            if (returnCode == null || returnCode != 0) {
                 result.registerError(new CompilationResult.CompilationMessage(-1,
                         "Executing the javac compiler failed. The return code is '" + returnCode + "'." + compilerOutput.toString()));
             }
@@ -190,16 +192,16 @@
     }
 
     private void logCommandLine(Object[] compilerArguments) {
-        if (logger.isDebugEnabled()) {
+        if (logger.isLoggable(Level.FINE)) {
             StringBuilder commandLine = new StringBuilder();
             commandLine.append("javac ");
             for (String compilerArgument : (String[]) compilerArguments[0]) {
                 commandLine.append(compilerArgument);
                 commandLine.append(" ");
             }
-            logger.debug(commandLine.toString());
+            logger.log(Level.FINE,commandLine.toString());
         }
-        if (logger.isInfoEnabled()) {
+        if (logger.isLoggable(Level.INFO)) {
             logger.info("[EXT-SCRIPTING] compiling java");
         }
 
@@ -319,8 +321,8 @@
         // If the user has already included the tools.jar in the classpath we don't have
         // to create a custom class loader as the class is already available.
         if (ClassUtils.isPresent(JAVAC_MAIN)) {
-            if (logger.isDebugEnabled()) {
-                logger.debug("Seemingly the required JAR file '$JAVA_HOME$/lib/tools.jar' has already been "
+            if (logger.isLoggable(Level.FINE)) {
+                logger.log(Level.FINE, "Seemingly the required JAR file '$JAVA_HOME$/lib/tools.jar' has already been "
                         + "put on the classpath as the class '" + JAVAC_MAIN + "' is present. So there's no "
                         + "need to create a custom classloader for the Javac compiler.");
             }
@@ -340,8 +342,8 @@
                 // If the user hasn't specified the URL to the tools.jar file, we'll try to find it on our own.
                 File toolsJarFile = new File(javaHome, "lib" + File.separatorChar + "tools.jar");
                 if (toolsJarFile.exists()) {
-                    if (logger.isDebugEnabled()) {
-                        logger.debug(
+                    if (logger.isLoggable(Level.FINE)) {
+                        logger.log(Level.FINE,
                                 "The required JAR file '$JAVA_HOME$/lib/tools.jar' has been found ['" + toolsJarFile.getAbsolutePath()
                                         + "']. A custom URL classloader will be created for the Javac compiler.");
                     }
@@ -354,8 +356,8 @@
                             "[$JAVA_HOME$: '" + System.getProperty("java.home") + "']");
                 }
             } else {
-                if (logger.isDebugEnabled()) {
-                    logger.debug("The user has specified the required JAR file '$JAVA_HOME$/lib/tools.jar' ['"
+                if (logger.isLoggable(Level.FINE)) {
+                    logger.log(Level.FINE, "The user has specified the required JAR file '$JAVA_HOME$/lib/tools.jar' ['"
                             + toolsJar.toExternalForm() + "']. A custom URL classloader will be created for the Javac compiler.");
                 }
 

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/refresh/FileChangedDaemon.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/refresh/FileChangedDaemon.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/refresh/FileChangedDaemon.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/refresh/FileChangedDaemon.java Sat Feb 20 21:50:59 2010
@@ -18,8 +18,6 @@
  */
 package org.apache.myfaces.scripting.refresh;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.scripting.api.ScriptingConst;
 import org.apache.myfaces.scripting.api.ScriptingWeaver;
 import org.apache.myfaces.scripting.core.dependencyScan.ClassDependencies;
@@ -28,8 +26,11 @@
 import javax.servlet.ServletContext;
 import java.io.File;
 import java.lang.ref.WeakReference;
-import java.util.*;
+import java.util.Map;
+import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * @author werpu
@@ -62,7 +63,7 @@
 
     boolean running = false;
     boolean contextInitialized = false;
-    Log log = LogFactory.getLog(FileChangedDaemon.class);
+    Logger log = Logger.getLogger(FileChangedDaemon.class.getName());
     ScriptingWeaver _weavers = null;
     WeakReference externalContext;
 
@@ -99,13 +100,14 @@
 
                 if (classMap == null || classMap.size() == 0)
                     continue;
-                 if(contextInitialized)
+                if (contextInitialized)
                     checkForChanges();
             } catch (Throwable e) {
-                log.error(e.getMessage());
+                log.log(Level.SEVERE, "[EXT-SCRIPTING]  {0} {1}", new String[]{e.getMessage(), e.toString()});
+
             }
         }
-        if (log.isInfoEnabled()) {
+        if (log.isLoggable(Level.INFO)) {
             log.info("[EXT-SCRIPTING] Dynamic reloading watch daemon is shutting down");
         }
     }
@@ -169,15 +171,15 @@
     }
 
     private void printInfo(ReloadingMetadata it) {
-        if (log.isInfoEnabled()) {
-            log.info("[EXT-SCRIPTING] Tainting Dependency:" + it.getFileName());
+        if (log.isLoggable(Level.INFO)) {
+            log.log(Level.INFO, "[EXT-SCRIPTING] Tainting Dependency: {0}", it.getFileName());
         }
     }
 
     private void printInfo(Map.Entry<String, ReloadingMetadata> it, File proxyFile) {
-        if (log.isInfoEnabled()) {
-            log.info("[EXT-SCRIPTING] comparing" + it.getKey() + "Dates:" + proxyFile.lastModified() + "-" + it.getValue().getTimestamp());
-            log.info("[EXT-SCRIPTING] Tainting:" + it.getValue().getFileName());
+        if (log.isLoggable(Level.INFO)) {
+            log.log(Level.INFO, "[EXT-SCRIPTING] comparing {0} Dates: {1} {2} ", new String[]{it.getKey(), Long.toString(proxyFile.lastModified()), Long.toString(it.getValue().getTimestamp())});
+            log.log(Level.INFO, "[EXT-SCRIPTING] Tainting: {0}", it.getValue().getFileName());
         }
     }
 

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/compiler/CompilerFactory.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/compiler/CompilerFactory.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/compiler/CompilerFactory.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/compiler/CompilerFactory.java Sat Feb 20 21:50:59 2010
@@ -1,7 +1,7 @@
 package org.apache.myfaces.scripting.sandbox.compiler;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * <p>This factory chooses and creates an instance of the according compiler
@@ -14,7 +14,7 @@
     /**
      * The logger instance for this class.
      */
-    private static final Log logger = LogFactory.getLog(CompilerFactory.class);
+    private static final Logger logger = Logger.getLogger(CompilerFactory.class.getName());
 
     // ------------------------------------------ Public methods
 
@@ -28,16 +28,9 @@
      * @return a new Java compiler depending on the Java runtime
      */
     public static Compiler createCompiler() {
-        boolean isJava15 = System.getProperty("java.version").indexOf("1.5.") != -1;
-        /*  if (!isJava15) {
-          // If the Java version is not 1.5, it's safe to assume that
-          // it's at least 1.6 as otherwise you wouldn't even be able
-          // to load the module (the target VM is set to 1.5 after all).
-         return Jsr199CompilerLoader.createJsr199Compiler();
-      } else {*/
-        if (logger.isWarnEnabled() &&
+        if (logger.isLoggable(Level.WARNING) &&
                 !System.getProperty("java.vendor").contains("Sun Microsystems")) {
-            logger.warn("This application is running on a Java runtime that neither supports the JSR-199 API " +
+            logger.warning("This application is running on a Java runtime that neither supports the JSR-199 API " +
                     "nor is it distributed by Sun Microsystems. However, the compiler implementation that will " +
                     "be used depends on internal classes in the package 'com.sun.tools.javac' so compilation " +
                     "is likely to fail! Be sure that the Java runtime that you're using provides these internal " +
@@ -45,26 +38,5 @@
         }
 
         return new JavacCompiler();
-        //}
     }
-
-    /**
-     * <p>Utility class that loads the JSR-199 compiler implementation. The sole purpose
-     * of this class is to ensure that the current class loader doesn't try to load the
-     * class 'Jsr199Compiler' until it's sure that we're running on a JVM 6 platform.</p>
-     */
-    //   private static class Jsr199CompilerLoader {
-
-    /**
-     * <p>Utility method that creates a new compiler implementation that uses the
-     * JSR-199 Compiler API.</p>
-     *
-     * @return a new compiler implementation that uses the JSR-199 Compiler API
-     */
-    //   public static Compiler createJsr199Compiler() {
-    //       return new JSF199Compiler();
-    //   }
-
-    //  }
-
 }
\ No newline at end of file

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/compiler/GroovyCompiler.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/compiler/GroovyCompiler.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/compiler/GroovyCompiler.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/compiler/GroovyCompiler.java Sat Feb 20 21:50:59 2010
@@ -18,13 +18,11 @@
  */
 package org.apache.myfaces.scripting.sandbox.compiler;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.scripting.sandbox.loader.ClassLoaderUtils;
 import org.apache.myfaces.scripting.api.CompilationException;
 import org.apache.myfaces.scripting.api.ScriptingConst;
 import org.apache.myfaces.scripting.core.util.FileUtils;
 import org.apache.myfaces.scripting.core.util.WeavingContext;
+import org.apache.myfaces.scripting.sandbox.loader.ClassLoaderUtils;
 import org.codehaus.groovy.control.CompilationFailedException;
 import org.codehaus.groovy.control.CompilationUnit;
 import org.codehaus.groovy.control.CompilerConfiguration;
@@ -37,6 +35,8 @@
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * <p>A compiler implementation that can be used to compile Groovy source files.</p>
@@ -46,7 +46,7 @@
     /**
      * The logger instance for this class.
      */
-    private static final Log logger = LogFactory.getLog(GroovyCompiler.class);
+    private static final Logger logger = Logger.getLogger(GroovyCompiler.class.getName());
 
     // ------------------------------------------ Compiler methods
 
@@ -166,8 +166,8 @@
             return new CompilationResult.CompilationMessage(
                     syntaxErrorMessage.getCause().getLine(), syntaxErrorMessage.getCause().getMessage());
         } else {
-            if (logger.isDebugEnabled()) {
-                logger.debug(
+            if (logger.isLoggable(Level.FINE)) {
+                logger.log(Level.FINE,
                         "This compiler came across an unknown message kind ['" + message + "']. It will be ignored.");
             }
 

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/compiler/JavacCompiler.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/compiler/JavacCompiler.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/compiler/JavacCompiler.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/compiler/JavacCompiler.java Sat Feb 20 21:50:59 2010
@@ -18,10 +18,8 @@
  */
 package org.apache.myfaces.scripting.sandbox.compiler;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.scripting.sandbox.loader.ClassLoaderUtils;
 import org.apache.myfaces.scripting.api.CompilationException;
+import org.apache.myfaces.scripting.sandbox.loader.ClassLoaderUtils;
 
 import java.io.File;
 import java.io.PrintWriter;
@@ -33,6 +31,8 @@
 import java.net.URLClassLoader;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * <p>A compiler implementation that utilizes some internal classes that enable you to
@@ -50,7 +50,7 @@
     /**
      * The logger instance for this class.
      */
-    private static final Log logger = LogFactory.getLog(JavacCompiler.class);
+    private static final Logger logger = Logger.getLogger(JavacCompiler.class.getName());
 
     /**
      * The class name of the javac compiler. Note that this class
@@ -228,8 +228,8 @@
         // If the user has already included the tools.jar in the classpath we don't have
         // to create a custom class loader as the class is already available.
         if (ClassLoaderUtils.isClassAvailable(JAVAC_MAIN, ClassLoaderUtils.getDefaultClassLoader())) {
-            if (logger.isDebugEnabled()) {
-                logger.debug("Seemingly the required JAR file '$JAVA_HOME$/lib/tools.jar' has already been "
+            if (logger.isLoggable(Level.FINE)) {
+                logger.log(Level.FINE, "Seemingly the required JAR file '$JAVA_HOME$/lib/tools.jar' has already been "
                         + "put on the classpath as the class '" + JAVAC_MAIN + "' is present. So there's no "
                         + "need to create a custom class loader for the Javac compiler.");
             }
@@ -249,8 +249,8 @@
                 // If the user hasn't specified the URL to the tools.jar file, we'll try to find it on our own.
                 File toolsJarFile = new File(javaHome, "lib" + File.separatorChar + "tools.jar");
                 if (toolsJarFile.exists()) {
-                    if (logger.isDebugEnabled()) {
-                        logger.debug(
+                    if (logger.isLoggable(Level.FINE)) {
+                        logger.log(Level.FINE,
                                 "The required JAR file '$JAVA_HOME$/lib/tools.jar' has been found ['" + toolsJarFile.getAbsolutePath()
                                         + "']. A custom URL class loader will be created for the Javac compiler.");
                     }
@@ -263,8 +263,8 @@
                             "[$JAVA_HOME$: '" + System.getProperty("java.home") + "']");
                 }
             } else {
-                if (logger.isDebugEnabled()) {
-                    logger.debug("The user has specified the required JAR file '$JAVA_HOME$/lib/tools.jar' ['"
+                if (logger.isLoggable(Level.FINE)) {
+                    logger.log(Level.FINE, "The user has specified the required JAR file '$JAVA_HOME$/lib/tools.jar' ['"
                             + toolsJar.toExternalForm() + "']. A custom URL class loader will be created for the Javac compiler.");
                 }
 

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/loader/ClassLoaderUtils.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/loader/ClassLoaderUtils.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/loader/ClassLoaderUtils.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/loader/ClassLoaderUtils.java Sat Feb 20 21:50:59 2010
@@ -18,15 +18,13 @@
  */
 package org.apache.myfaces.scripting.sandbox.loader;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import java.io.File;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import java.util.logging.Logger;
 
 /**
  * <p>Utility class for class loading purposes, e.g. to determine the classpath of a
@@ -37,7 +35,7 @@
     /**
      * The logger instance for this class.
      */
-    private static final Log logger = LogFactory.getLog(ClassLoaderUtils.class);
+    private static final Logger logger = Logger.getLogger(ClassLoaderUtils.class.getName());
 
     // ------------------------------------------ Public methods
 

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/loader/ReloadingClassLoader.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/loader/ReloadingClassLoader.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/loader/ReloadingClassLoader.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/loader/ReloadingClassLoader.java Sat Feb 20 21:50:59 2010
@@ -18,11 +18,9 @@
  */
 package org.apache.myfaces.scripting.sandbox.loader;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.scripting.sandbox.loader.support.ThrowAwayClassLoader;
 import org.apache.myfaces.scripting.sandbox.loader.support.ClassFileLoader;
 import org.apache.myfaces.scripting.sandbox.loader.support.OverridingClassLoader;
+import org.apache.myfaces.scripting.sandbox.loader.support.ThrowAwayClassLoader;
 
 import java.io.File;
 import java.io.IOException;
@@ -30,6 +28,8 @@
 import java.net.URLClassLoader;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * <p>A class loader implementation that enables you to reload certain classes. It automatically
@@ -63,7 +63,7 @@
     /**
      * The logger instance for this class.
      */
-    private static final Log logger = LogFactory.getLog(ReloadingClassLoader.class);
+    private static final Logger logger = Logger.getLogger(ReloadingClassLoader.class.getName());
 
     /**
      * A table of class names and the according class loaders. It's basically like
@@ -145,8 +145,8 @@
                     reloadClass(className);
                 }
             } else {
-                if (logger.isTraceEnabled()) {
-                    logger.trace("A new dynamic class '"
+                if (logger.isLoggable(Level.FINEST)) {
+                    logger.log(Level.FINEST, "A new dynamic class '"
                             + className + "' has been found by this class loader '" + this + "'.");
                 }
 
@@ -182,7 +182,7 @@
         try {
             return new URL[]{compilationDirectory.toURI().toURL()};
         } catch (IOException ex) {
-            logger.error("Couldn't resolve the URL to the compilation directory '" + compilationDirectory + "'.", ex);
+            logger.log(Level.SEVERE, "Couldn't resolve the URL to the compilation directory {0} {1} {2} ", new String[]{compilationDirectory.getAbsolutePath(), ex.getMessage(), ex.toString()});
             return new URL[0];
         }
     }
@@ -238,7 +238,7 @@
         }
 
         ThrowAwayClassLoader oldClassLoader = classLoaders.put(className, classLoader);
-        if (logger.isInfoEnabled()) {
+        if (logger.isLoggable(Level.INFO)) {
             if (oldClassLoader != null) {
                 logger.info("Replaced the class loader '" + oldClassLoader + "' with the class loader '"
                         + classLoader + "' as this class loader is supposed to reload the class '" + className + "'.");

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/loader/support/ClassFileLoader.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/loader/support/ClassFileLoader.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/loader/support/ClassFileLoader.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/sandbox/loader/support/ClassFileLoader.java Sat Feb 20 21:50:59 2010
@@ -18,14 +18,13 @@
  */
 package org.apache.myfaces.scripting.sandbox.loader.support;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * <p>This class loader actually loads the newly compiled classes. Each newly compiled class
@@ -39,7 +38,7 @@
     /**
      * The logger instance for this class.
      */
-    private static final Log logger = LogFactory.getLog(ClassFileLoader.class);
+    private static final Logger logger = Logger.getLogger(ClassFileLoader.class.getName());
 
     /**
      * The .class file that contains the byte code for the class that this class loader is going to load.
@@ -81,8 +80,8 @@
             return new URL[]{classFile.toURI().toURL()};
         }
         catch (IOException ex) {
-            logger.error("Couldn't resolve the URL to the class file '"
-                    + classFile + "' that this class loader '" + this + "' should load.", ex);
+            logger.log(Level.SEVERE, "Couldn't resolve the URL to the class file {0}  that this class loader {1} should load,  {2} {3}", new String [] {classFile.getAbsolutePath() ,  this.getClassName(), ex.getMessage(), ex.toString()});
+
             return new URL[0];
         }
     }

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/servlet/CustomChainLoader.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/servlet/CustomChainLoader.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/servlet/CustomChainLoader.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/servlet/CustomChainLoader.java Sat Feb 20 21:50:59 2010
@@ -19,8 +19,6 @@
 package org.apache.myfaces.scripting.servlet;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.scripting.api.ScriptingWeaver;
 import org.apache.myfaces.scripting.core.CoreWeaver;
 import org.apache.myfaces.scripting.core.util.WeavingContext;
@@ -29,6 +27,8 @@
 import org.apache.myfaces.shared_impl.util.ClassLoaderExtension;
 
 import javax.servlet.ServletContext;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * a custom chainloader which adds a groovy loading
@@ -51,7 +51,7 @@
     private static final String GROOVY_SOURCE_ROOT = "/WEB-INF/groovy/";
     private static final String JAVA_SOURCE_ROOT = "/WEB-INF/java/";
 
-    Log log = LogFactory.getLog(CustomChainLoader.class);
+    Logger log = Logger.getLogger(CustomChainLoader.class.getName());
 
     //TODO move the entire init code into the weavers
     //every weaver should know itself how to initialize itself
@@ -112,7 +112,7 @@
             return null;
         }
         if (name.contains(".Blog")) {
-            log.debug("Debugpoint found for Blog");
+            log.log(Level.FINE, "Debugpoint found for Blog");
         }
 
         return scriptingWeaver.loadScriptingClassFromName(name);

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/servlet/ScriptingServletFilter.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/servlet/ScriptingServletFilter.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/servlet/ScriptingServletFilter.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/servlet/ScriptingServletFilter.java Sat Feb 20 21:50:59 2010
@@ -18,17 +18,14 @@
  */
 package org.apache.myfaces.scripting.servlet;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.scripting.api.Configuration;
 import org.apache.myfaces.scripting.api.ScriptingConst;
 import org.apache.myfaces.scripting.core.util.WeavingContext;
-import org.apache.myfaces.scripting.refresh.RefreshContext;
 
 import javax.servlet.*;
 import java.io.IOException;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.logging.Logger;
 
 /**
  * Scripting servlet filter
@@ -76,8 +73,8 @@
         AtomicBoolean startup = (AtomicBoolean) context.getAttribute(ScriptingConst.CTX_STARTUP);
         if (startup == null) {
             if(!warned) {
-                Log log = LogFactory.getLog(ScriptingServletFilter.class);
-                log.error("[EXT-SCRIPTING] the Startup plugin chainloader has not been set, ext scripting is not working" +
+                Logger log = Logger.getLogger(ScriptingServletFilter.class.getName());
+                log.warning("[EXT-SCRIPTING] the Startup plugin chainloader has not been set, ext scripting is not working" +
                         "please refer to the documentation for the org.apache.myfaces.FACES_INIT_PLUGINS parameter, deactivating servlet filter");
                 active = false;
             }

Modified: myfaces/extensions/scripting/trunk/core/core/src/test/java/org/apache/myfaces/extensions/scripting/dependencyScan/DependencyScannerTest.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/test/java/org/apache/myfaces/extensions/scripting/dependencyScan/DependencyScannerTest.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/test/java/org/apache/myfaces/extensions/scripting/dependencyScan/DependencyScannerTest.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/test/java/org/apache/myfaces/extensions/scripting/dependencyScan/DependencyScannerTest.java Sat Feb 20 21:50:59 2010
@@ -18,14 +18,13 @@
  */
 package org.apache.myfaces.extensions.scripting.dependencyScan;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.scripting.core.dependencyScan.ClassDependencies;
 import org.apache.myfaces.scripting.core.dependencyScan.DefaultDependencyScanner;
 import org.junit.Test;
 
 import java.util.HashSet;
 import java.util.Set;
+import java.util.logging.Logger;
 
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -36,7 +35,8 @@
  */
 public class DependencyScannerTest {
 
-    Log log = LogFactory.getLog(DependencyScannerTest.class.getName());
+    Logger log = Logger.getLogger(DependencyScannerTest.class.getName());
+
     private static final String PROBE1 = "org.apache.myfaces.extensions.scripting.dependencyScan.probes.Probe";
     private static final String PROBE2 = "org.apache.myfaces.extensions.scripting.dependencyScan.probes.Probe2";
     private static final String PROBE3 = "org.apache.myfaces.extensions.scripting.dependencyScan.probes.Probe3";

Modified: myfaces/extensions/scripting/trunk/core/core/src/test/java/org/apache/myfaces/scripting/core/compilerTest/TestCompilerAPI.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/test/java/org/apache/myfaces/scripting/core/compilerTest/TestCompilerAPI.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/test/java/org/apache/myfaces/scripting/core/compilerTest/TestCompilerAPI.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/test/java/org/apache/myfaces/scripting/core/compilerTest/TestCompilerAPI.java Sat Feb 20 21:50:59 2010
@@ -20,16 +20,9 @@
 
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.FilenameUtils;
-import org.apache.commons.logging.LogFactory;
-import org.apache.commons.logging.Log;
 import org.apache.myfaces.scripting.api.Configuration;
 import org.apache.myfaces.scripting.api.DynamicCompiler;
 import org.apache.myfaces.scripting.api.ScriptingConst;
-import org.apache.myfaces.scripting.core.util.ReflectUtil;
-
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
 import org.apache.myfaces.scripting.core.util.WeavingContext;
 import org.apache.myfaces.scripting.loaders.java.compiler.CompilerFacade;
 import org.junit.Test;
@@ -37,6 +30,9 @@
 import java.io.File;
 import java.io.IOException;
 
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 /**
  * @author Werner Punz (latest modification by $Author$)
  * @version $Revision$ $Date$

Modified: myfaces/extensions/scripting/trunk/core/myfaces12-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ReroutingResourceResolver.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces12-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ReroutingResourceResolver.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces12-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ReroutingResourceResolver.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces12-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ReroutingResourceResolver.java Sat Feb 20 21:50:59 2010
@@ -19,14 +19,13 @@
 package org.apache.myfaces.scripting.facelet;
 
 import com.sun.facelets.impl.DefaultResourceResolver;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.scripting.core.util.WeavingContext;
 
 import java.io.File;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.List;
+import java.util.logging.Logger;
 
 /**
  * decorated Facelet resource resolver to reroute
@@ -38,7 +37,7 @@
     volatile boolean _initiated = false;
     List<String> _resourceDirs = null;
 
-    Log log = LogFactory.getLog(this.getClass());
+    Logger log = Logger.getLogger(this.getClass().getName());
 
     @Override
     public URL resolveUrl(String path) {
@@ -54,7 +53,7 @@
                 if (resource.exists()) try {
                     return resource.toURI().toURL();
                 } catch (MalformedURLException e) {
-                    log.error(e);
+                    log.severe(e.getMessage());
                 }
             }
         }

Modified: myfaces/extensions/scripting/trunk/core/myfaces12-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ELResolverProxy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces12-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ELResolverProxy.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces12-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ELResolverProxy.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces12-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ELResolverProxy.java Sat Feb 20 21:50:59 2010
@@ -18,8 +18,6 @@
  */
 package org.apache.myfaces.scripting.jsf.dynamicdecorators.implemetations;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.scripting.api.Decorated;
 import org.apache.myfaces.scripting.api.ScriptingConst;
 import org.apache.myfaces.scripting.core.util.WeavingContext;
@@ -29,6 +27,9 @@
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
+import java.util.logging.Logger;
+
+
 
 /**
  * EL Resolver which is scripting enabled
@@ -36,7 +37,7 @@
  * @author Werner Punz
  */
 public class ELResolverProxy extends ELResolver implements Decorated {
-    Log log = LogFactory.getLog(ELResolverProxy.class);
+    Logger log = Logger.getLogger(ELResolverProxy.class.getName());
 
     public Object getValue(ELContext elContext, final Object base, final Object property) throws NullPointerException, PropertyNotFoundException, ELException {
         //request, class is loaded anew hence we already have picked up the new code

Modified: myfaces/extensions/scripting/trunk/core/myfaces12-extensions/src/main/java/org/apache/myfaces/scripting/servlet/StartupServletContextPluginChainLoader.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces12-extensions/src/main/java/org/apache/myfaces/scripting/servlet/StartupServletContextPluginChainLoader.java?rev=912236&r1=912235&r2=912236&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces12-extensions/src/main/java/org/apache/myfaces/scripting/servlet/StartupServletContextPluginChainLoader.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces12-extensions/src/main/java/org/apache/myfaces/scripting/servlet/StartupServletContextPluginChainLoader.java Sat Feb 20 21:50:59 2010
@@ -19,22 +19,21 @@
 package org.apache.myfaces.scripting.servlet;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import org.apache.myfaces.scripting.api.Configuration;
-import org.apache.myfaces.scripting.core.util.Strategy;
-import org.apache.myfaces.webapp.StartupListener;
+import org.apache.myfaces.scripting.api.ScriptingConst;
+import org.apache.myfaces.scripting.api.ScriptingWeaver;
 import org.apache.myfaces.scripting.core.util.ClassUtils;
+import org.apache.myfaces.scripting.core.util.Strategy;
 import org.apache.myfaces.scripting.core.util.WeavingContext;
-import org.apache.myfaces.scripting.api.ScriptingWeaver;
-import org.apache.myfaces.scripting.api.ScriptingConst;
 import org.apache.myfaces.scripting.refresh.RefreshContext;
+import org.apache.myfaces.webapp.StartupListener;
 
-import javax.servlet.ServletContextEvent;
 import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.logging.Logger;
+
 
 /**
  * @author werpu
@@ -47,7 +46,7 @@
  *         configuration before the MyFaces init itself starts!
  */
 public class StartupServletContextPluginChainLoader implements StartupListener {
-    final Log log = LogFactory.getLog(this.getClass());
+    final Logger log = Logger.getLogger(this.getClass().getName());
 
     public void preInit(ServletContextEvent servletContextEvent) {
 



Mime
View raw message