tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r569893 [5/6] - in /tapestry/tapestry5/trunk: ./ .settings/ quickstart/src/main/resources/archetype-resources/src/main/java/services/ src/site/ src/site/resources/ src/site/xdoc/ support/ tapestry-core/ tapestry-core/src/main/java/org/apach...
Date Sun, 26 Aug 2007 22:24:07 GMT
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry/ioc/test/IOCTestCase.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry/ioc/test/IOCTestCase.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry/ioc/test/IOCTestCase.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry/ioc/test/IOCTestCase.java Sun Aug 26 15:23:55 2007
@@ -21,7 +21,6 @@
 import java.net.URL;
 import java.util.Locale;
 
-import org.apache.commons.logging.Log;
 import org.apache.tapestry.ioc.AnnotationProvider;
 import org.apache.tapestry.ioc.Configuration;
 import org.apache.tapestry.ioc.Location;
@@ -46,6 +45,7 @@
 import org.apache.tapestry.ioc.services.SymbolSource;
 import org.apache.tapestry.ioc.services.ThreadLocale;
 import org.apache.tapestry.ioc.services.TypeCoercer;
+import org.slf4j.Logger;
 
 /** Add factory and trainer methods for the public interfaces of Tapestry IOC. */
 public class IOCTestCase extends TestBase
@@ -122,9 +122,9 @@
         return newMock(Location.class);
     }
 
-    protected final Log mockLog()
+    protected final Logger mockLogger()
     {
-        return newMock(Log.class);
+        return newMock(Logger.class);
     }
 
     @SuppressWarnings("unchecked")
@@ -279,9 +279,9 @@
         expect(threadLocale.getLocale()).andReturn(locale);
     }
 
-    protected final void train_getLog(LogSource source, String serviceId, Log log)
+    protected final void train_getLogger(LogSource source, String serviceId, Logger logger)
     {
-        expect(source.getLog(serviceId)).andReturn(log).atLeastOnce();
+        expect(source.getLogger(serviceId)).andReturn(logger).atLeastOnce();
     }
 
     protected final void train_getMessageFormatter(Messages messages, String key,
@@ -329,13 +329,13 @@
         expect(resources.getServiceInterface()).andReturn(serviceInterface).atLeastOnce();
     }
 
-    protected final void train_getServiceLog(ServiceResources resources, Log log)
+    protected final void train_getLogger(ServiceResources resources, Logger log)
     {
-        expect(resources.getServiceLog()).andReturn(log).atLeastOnce();
+        expect(resources.getLogger()).andReturn(log).atLeastOnce();
 
     }
 
-    protected final void train_isDebugEnabled(Log log, boolean debugEnabled)
+    protected final void train_isDebugEnabled(Logger log, boolean debugEnabled)
     {
         expect(log.isDebugEnabled()).andReturn(debugEnabled);
     }

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/site/apt/decorator.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/site/apt/decorator.apt?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/site/apt/decorator.apt (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/site/apt/decorator.apt Sun Aug 26 15:23:55 2007
@@ -58,6 +58,7 @@
 package org.example.myapp.services;
 
 import org.apache.tapestry.ioc.services.LoggingDecorator;
+import org.slf4j.Logger;
 
 public class MyAppModule
 {
@@ -67,12 +68,11 @@
   }
   
   public static <T> T decorateIndexer(Class<T> serviceInterface, T delegate, 
-    String serviceId, Log serviceLog,
+    String serviceId, Logger logger,
     
-    @InjectService("LoggingDecorator")
     LoggingDecorator decorator)
   {
-    return decorator.build(serviceInterface, delegate, serviceId, serviceLog);
+    return decorator.build(serviceInterface, delegate, serviceId, logger);
   } 
 }
 +---------------------+
@@ -112,14 +112,14 @@
 package org.example.myapp.services;
 
 import org.apache.tapestry.ioc.services.LoggingDecorator;
+import org.slf4j.Logger;
 
 public class MyAppModule
 {
-  public static Indexer build(Class serviceInterface, Log serviceLog,
-    @InjectService("LoggingDecorator")
+  public static Indexer build(Class serviceInterface, Logger logger,
     LoggingInterceptorFactory decorator)
   {
-    return decorator.build(serviceInterface, serviceLog,  new IndexerImpl());
+    return decorator.build(serviceInterface, logger,  new IndexerImpl());
   } 
 }
 +---------------------+   
@@ -142,11 +142,10 @@
 +---------------------+    
   @Match("*")
   public static <T> T decorateLogging(Class<T> serviceInterface, T delegate, 
-    String serviceId, Log serviceLog,
-    @InjectService("LoggingDecorator")
+    String serviceId, Logger logger,
     LoggingDecorator decorator)
   {
-    return decorator.build(serviceInterface, delegate, serviceId, serviceLog);
+    return decorator.build(serviceInterface, delegate, serviceId, logger);
   }   
 +---------------------+  
 
@@ -188,11 +187,10 @@
   @Match("*")
   @Order("before:*")
   public static <T> T decorateLogging(Class<T> serviceInterface, T delegate, 
-    String serviceId, Log serviceLog,
-    @InjectService("LoggingDecorator")
+    String serviceId, Logger logger,
     LoggingDecorator decorator)
   {
-    return decorator.build(serviceInterface, delegate, serviceId, serviceLog);
+    return decorator.build(serviceInterface, delegate, serviceId, logger);
   }   
 +---------------------+     
    

Added: tapestry/tapestry5/trunk/tapestry-ioc/src/site/apt/logging.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/site/apt/logging.apt?rev=569893&view=auto
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/site/apt/logging.apt (added)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/site/apt/logging.apt Sun Aug 26 15:23:55 2007
@@ -0,0 +1,79 @@
+ ----
+ Logging
+ ----
+ 
+Logging in Tapestry
+
+	Logging in Tapestry is based on the
+	{{{http://www.slf4j.org/}Simple Logging Facade for Java (SLF4J)}}.  You can think of SLF4J as a leaner, meaner replacement
+	for {{{http://commons.apache.org/logging/}commons-logging}}.
+	
+	In theory, SLF4J is a wrapper around any of a number of logging systems, including 
+	{{{http://logging.apache.org/log4j/docs/}Log4J}}
+	or the built-in JDK logging.  In practice, it is almost always used with Log4J and no additional build configuration is needed. 
+	
+	Your application <will> need to provide a <<log4j.properties>> file (or its XML equivalent).  See 
+	{{{http://logging.apache.org/log4j/docs/manual.html}the Log4J manual}} for more information.
+
+Accessing Loggers
+
+  Loggers are a special kind of resource that is injected into a service.  In Tapestry IoC, Loggers an be injected into
+  service constructors, or into service builder methods.
+  
+  In Tapestry Core (the web framework), Loggers for components can be injected into component fields.
+  
+  This often confuses people, because the standard idiom is to create a Logger based on the class name and inject it into a static field.  In Tapestry, the Logger
+  is created on your code's behalf and provided to you, and stored into a final private field. 
+  
+  In terms of seperation of concerns, Tapestry's approach is superior ... the concern of creating loggers is offloaded
+  into the framework, and you code retains the concern of actually logging useful information.  However this is largely theoretical.
+  
+  For a pragamatic standpoint, injecting Loggers makes it easier to test <logging> code using the same techniques used to test other code: via the injection
+  of Mock Object implementations of the Logger interface.  This is something to consider when writing your own services, components and test.
+  
+Configuring Tapestry for other Logging Toolkits
+
+  The default configuration uses Log4J.
+  
+  If you need to use another logging system, that can be accomplished using Maven dependency control.
+  
+  You can exclude some of the dependencies that Tapestry introduces, and replace them with your own.  For example, to switch over to JDK logging, update your pom as follows:
+  
+----
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.tapestry</groupId>
+      <artifactId>tapestry-ioc</artifactId>
+      <version>5.0.x</version>
+      <exclusions>
+      
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-log4j12</artifactId>
+        </exclusion>
+      
+        <exclusion>
+          <groupId>log4j</groupId>
+          <artifactId>log4j</groupId>
+        </exclusion>
+
+      </exclusions>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+	  <artifactId>slf4j-jdk14</artifactId>
+	  <version>1.4.3</version>
+    </dependency>
+  </dependencies>
+----
+
+  This pulls out the log4j support normally included with Tapestry, and replaces it with the SLF4J library that wraps around JDK 1.4 logging.  
+
+  In all likelyhood, you'll replace <em>tapestry-ioc</em> with <em>tapestry-core</em> (assuming you are building a web application using Tapestry, rather than using Tapestry IoC as part of some other
+  application).  And, of course, version numbers change all the time!
+      
+  
+  
+	
+	
\ No newline at end of file

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/site/apt/module.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/site/apt/module.apt?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/site/apt/module.apt (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/site/apt/module.apt Sun Aug 26 15:23:55 2007
@@ -132,7 +132,7 @@
   For modules, there are two additional parameter types that are used to refer to <resources> that
   can be provided to the module instance (rather than <services> which may be injected).    
       
-  * org.apache.commons.logging.Log: log for the module (derived from the module's class name)
+  * {{{http://www.slf4j.org/api/org/slf4j/Logger.html}org.slf5j.Logger}}: logger for the module (derived from the module's class name)
    
   * {{{apidocs/org/apache/tapestry/ioc/ObjectLocator.html}ObjectLocator}}:  access to other services
   

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/site/apt/run.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/site/apt/run.apt?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/site/apt/run.apt (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/site/apt/run.apt Sun Aug 26 15:23:55 2007
@@ -44,7 +44,7 @@
 Building the Default Registry
 
   The default registry is available by invoking the static method
-  {{{apidocs/org/apache/tapestry/ioc/IoCUtilities.html#buildDefaultRegistry()}IoCUtilities.buildDefaultRegistry()}}.
+  {{{apidocs/org/apache/tapestry/ioc/IOCUtilities.html#buildDefaultRegistry()}ICCUtilities.buildDefaultRegistry()}}.
   This method builds a Registry using
   {{{module.html#Autoloading modules}autoloading logic}}, where modules to load
   are identified via a JAR Manifest entry.

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/site/apt/service.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/site/apt/service.apt?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/site/apt/service.apt (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/site/apt/service.apt Sun Aug 26 15:23:55 2007
@@ -346,7 +346,7 @@
   
   * java.lang.String: unique id for the service
     
-  * org.apache.commons.logging.Log: to which service logging can occur
+  * {{{http://www.slf4j.org/api/org/slf4j/Logger.html}org.slf5j.Logger}}: logger for the service
   
   * java.lang.Class: service interface implemented by the service to be constructed
   

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/site/site.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/site/site.xml?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/site/site.xml (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/site/site.xml Sun Aug 26 15:23:55 2007
@@ -60,6 +60,7 @@
             <item name="Starting the Registry" href="run.html"/>
             <item name="Object Providers" href="provider.html"/>
             <item name="Ordering" href="order.html"/>
+            <item name="Logging" href="logging.html"/>
         </menu>
         
         <menu name="Service Builders">

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/DefaultModuleDefImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/DefaultModuleDefImplTest.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/DefaultModuleDefImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/DefaultModuleDefImplTest.java Sun Aug 26 15:23:55 2007
@@ -21,7 +21,6 @@
 import java.lang.reflect.Method;
 import java.util.Set;
 
-import org.apache.commons.logging.Log;
 import org.apache.tapestry.ioc.AutobuildModule;
 import org.apache.tapestry.ioc.IOCConstants;
 import org.apache.tapestry.ioc.ObjectCreator;
@@ -35,6 +34,7 @@
 import org.apache.tapestry.ioc.internal.util.InternalUtils;
 import org.apache.tapestry.ioc.services.ClassFactory;
 import org.apache.tapestry.ioc.test.IOCTestCase;
+import org.slf4j.Logger;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
@@ -60,13 +60,13 @@
     {
         String className = SimpleModule.class.getName();
 
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
         // BigDecimal is arbitrary, any class would do.
 
-        ModuleDef md = new DefaultModuleDefImpl(SimpleModule.class, log, _classFactory);
+        ModuleDef md = new DefaultModuleDefImpl(SimpleModule.class, logger, _classFactory);
 
         assertEquals(md.toString(), "ModuleDef[" + className + " Barney, Fred, Wilma]");
 
@@ -107,11 +107,11 @@
     @Test
     public void default_service_id_from_return_type()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
-        ModuleDef def = new DefaultModuleDefImpl(DefaultServiceIdModule.class, log, null);
+        ModuleDef def = new DefaultModuleDefImpl(DefaultServiceIdModule.class, logger, null);
 
         assertEquals(def.getServiceIds().size(), 1);
 
@@ -132,15 +132,15 @@
         String expectedMethod = InternalUtils.asString(ServiceIdConflictMethodModule.class
                 .getMethod("buildFred", Object.class), _classFactory);
 
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
-        log.warn(buildMethodConflict(conflictMethodString, expectedMethod), null);
+        logger.warn(buildMethodConflict(conflictMethodString, expectedMethod));
 
         replay();
 
         // BigDecimal is arbitrary, any class would do.
 
-        ModuleDef md = new DefaultModuleDefImpl(ServiceIdConflictMethodModule.class, log,
+        ModuleDef md = new DefaultModuleDefImpl(ServiceIdConflictMethodModule.class, logger,
                 _classFactory);
 
         Set<String> ids = md.getServiceIds();
@@ -168,13 +168,13 @@
     {
         Method m = VoidBuilderMethodModule.class.getMethod("buildNull");
 
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
-        log.warn(IOCMessages.buildMethodWrongReturnType(m), null);
+        logger.warn(IOCMessages.buildMethodWrongReturnType(m));
 
         replay();
 
-        ModuleDef md = new DefaultModuleDefImpl(VoidBuilderMethodModule.class, log, null);
+        ModuleDef md = new DefaultModuleDefImpl(VoidBuilderMethodModule.class, logger, null);
 
         assertTrue(md.getServiceIds().isEmpty());
 
@@ -186,13 +186,13 @@
     {
         Method m = BuilderMethodModule.class.getMethod("buildStringArray");
 
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
-        log.warn(IOCMessages.buildMethodWrongReturnType(m), null);
+        logger.warn(IOCMessages.buildMethodWrongReturnType(m));
 
         replay();
 
-        ModuleDef md = new DefaultModuleDefImpl(BuilderMethodModule.class, log, null);
+        ModuleDef md = new DefaultModuleDefImpl(BuilderMethodModule.class, logger, null);
 
         assertTrue(md.getServiceIds().isEmpty());
 
@@ -210,13 +210,13 @@
     {
         Method m = moduleClass.getMethod(methodName, Object.class);
 
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
-        log.warn(IOCMessages.decoratorMethodWrongReturnType(m), null);
+        logger.warn(IOCMessages.decoratorMethodWrongReturnType(m));
 
         replay();
 
-        ModuleDef md = new DefaultModuleDefImpl(moduleClass, log, null);
+        ModuleDef md = new DefaultModuleDefImpl(moduleClass, logger, null);
 
         assertTrue(md.getDecoratorDefs().isEmpty());
 
@@ -241,13 +241,13 @@
         Class moduleClass = NoDelegateDecoratorMethodModule.class;
         Method m = moduleClass.getMethod("decorateNoDelegate");
 
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
-        log.warn(IOCMessages.decoratorMethodNeedsDelegateParameter(m), null);
+        logger.warn(IOCMessages.decoratorMethodNeedsDelegateParameter(m));
 
         replay();
 
-        ModuleDef md = new DefaultModuleDefImpl(moduleClass, log, null);
+        ModuleDef md = new DefaultModuleDefImpl(moduleClass, logger, null);
 
         assertTrue(md.getDecoratorDefs().isEmpty());
 
@@ -281,11 +281,11 @@
     private void attemptConfigurationMethod(Class moduleClass, String expectedServiceId,
             String expectedMethodSignature)
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
-        ModuleDef md = new DefaultModuleDefImpl(moduleClass, log, _classFactory);
+        ModuleDef md = new DefaultModuleDefImpl(moduleClass, logger, _classFactory);
 
         Set<ContributionDef> defs = md.getContributionDefs();
 
@@ -311,12 +311,12 @@
         Class moduleClass = TooManyContributionParametersModule.class;
         Method m = findMethod(moduleClass, "contributeTooMany");
 
-        Log log = mockLog();
-        log.warn(IOCMessages.tooManyContributionParameters(m));
+        Logger logger = mockLogger();
+        logger.warn(IOCMessages.tooManyContributionParameters(m));
 
         replay();
 
-        ModuleDef md = new DefaultModuleDefImpl(moduleClass, log, null);
+        ModuleDef md = new DefaultModuleDefImpl(moduleClass, logger, null);
 
         assertTrue(md.getContributionDefs().isEmpty());
 
@@ -329,12 +329,12 @@
         Class moduleClass = NoUsableContributionParameterModule.class;
         Method m = findMethod(moduleClass, "contributeNoParameter");
 
-        Log log = mockLog();
-        log.warn(IOCMessages.noContributionParameter(m));
+        Logger logger = mockLogger();
+        logger.warn(IOCMessages.noContributionParameter(m));
 
         replay();
 
-        ModuleDef md = new DefaultModuleDefImpl(moduleClass, log, null);
+        ModuleDef md = new DefaultModuleDefImpl(moduleClass, logger, null);
 
         assertTrue(md.getContributionDefs().isEmpty());
 
@@ -344,11 +344,11 @@
     @Test
     public void simple_binder_method()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
-        ModuleDef md = new DefaultModuleDefImpl(AutobuildModule.class, log, _classFactory);
+        ModuleDef md = new DefaultModuleDefImpl(AutobuildModule.class, logger, _classFactory);
 
         ServiceDef sd = md.getServiceDef("StringHolder");
 
@@ -363,11 +363,11 @@
     @Test
     public void bind_service_with_all_options()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
-        ModuleDef md = new DefaultModuleDefImpl(ComplexAutobuildModule.class, log, _classFactory);
+        ModuleDef md = new DefaultModuleDefImpl(ComplexAutobuildModule.class, logger, _classFactory);
 
         ServiceDef sd = md.getServiceDef("SH");
 
@@ -382,13 +382,14 @@
     @Test
     public void attempt_to_bind_a_service_with_no_public_constructor()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
         try
         {
-            new DefaultModuleDefImpl(UninstantiableAutobuildServiceModule.class, log, _classFactory);
+            new DefaultModuleDefImpl(UninstantiableAutobuildServiceModule.class, logger,
+                    _classFactory);
             unreachable();
         }
         catch (RuntimeException ex)
@@ -404,15 +405,16 @@
     @Test
     public void instance_method_bind_is_ignored()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
-        log.error(and(
+        logger.error(and(
                 contains(NonStaticBindMethodModule.class.getName()),
                 contains("but is an instance method")));
 
         replay();
 
-        ModuleDef md = new DefaultModuleDefImpl(NonStaticBindMethodModule.class, log, _classFactory);
+        ModuleDef md = new DefaultModuleDefImpl(NonStaticBindMethodModule.class, logger,
+                _classFactory);
 
         // Prove that the bind method was not invoke
 
@@ -424,18 +426,18 @@
     @Test
     public void multiple_constructors_on_autobuild_service_implementation()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
         ServiceBuilderResources resources = mockServiceBuilderResources();
 
-        train_isDebugEnabled(log, true);
+        train_isDebugEnabled(logger, true);
 
         // The point is, we're choosing the constructor with the largest number of parameters.
 
-        log
+        logger
                 .debug(contains("Invoking constructor org.apache.tapestry.ioc.internal.MultipleConstructorsAutobuildService(StringHolder)"));
 
         train_getServiceId(resources, "StringHolder");
-        train_getServiceLog(resources, log);
+        train_getLogger(resources, logger);
         train_getServiceInterface(resources, StringHolder.class);
         train_getService(
                 resources,
@@ -446,7 +448,7 @@
         replay();
 
         ModuleDef def = new DefaultModuleDefImpl(MutlipleAutobuildServiceConstructorsModule.class,
-                log, _classFactory);
+                logger, _classFactory);
 
         ServiceDef sd = def.getServiceDef("StringHolder");
 
@@ -465,13 +467,13 @@
     @Test
     public void exception_from_inside_bind_method()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
         try
         {
-            new DefaultModuleDefImpl(ExceptionInBindMethod.class, log, _classFactory);
+            new DefaultModuleDefImpl(ExceptionInBindMethod.class, logger, _classFactory);
             unreachable();
         }
         catch (RuntimeException ex)
@@ -489,11 +491,11 @@
     @Test
     public void autoload_service_is_eager_load_via_annotation()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
-        ModuleDef md = new DefaultModuleDefImpl(EagerLoadViaAnnotationModule.class, log,
+        ModuleDef md = new DefaultModuleDefImpl(EagerLoadViaAnnotationModule.class, logger,
                 _classFactory);
 
         ServiceDef sd = md.getServiceDef("Runnable");

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/LogSourceImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/LogSourceImplTest.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/LogSourceImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/LogSourceImplTest.java Sun Aug 26 15:23:55 2007
@@ -1,4 +1,4 @@
-// Copyright 2006 The Apache Software Foundation
+// Copyright 2006, 2007 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -14,9 +14,9 @@
 
 package org.apache.tapestry.ioc.internal;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.tapestry.ioc.LogSource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.testng.annotations.Test;
 
 public class LogSourceImplTest extends IOCInternalTestCase
@@ -26,9 +26,9 @@
     {
         Class clazz = getClass();
 
-        Log expected = LogFactory.getLog(clazz);
+        Logger expected = LoggerFactory.getLogger(clazz);
         LogSource logSource = new LogSourceImpl();
-        Log actual = logSource.getLog(clazz);
+        Logger actual = logSource.getLogger(clazz);
 
         assertSame(actual, expected);
     }
@@ -38,9 +38,9 @@
     {
         String name = "foo.Bar";
 
-        Log expected = LogFactory.getLog(name);
+        Logger expected = LoggerFactory.getLogger(name);
         LogSource logSource = new LogSourceImpl();
-        Log actual = logSource.getLog(name);
+        Logger actual = logSource.getLogger(name);
 
         assertSame(actual, expected);
 

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ModuleImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ModuleImplTest.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ModuleImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ModuleImplTest.java Sun Aug 26 15:23:55 2007
@@ -21,7 +21,6 @@
 import java.util.Collection;
 import java.util.Set;
 
-import org.apache.commons.logging.Log;
 import org.apache.tapestry.ioc.Registry;
 import org.apache.tapestry.ioc.RegistryBuilder;
 import org.apache.tapestry.ioc.def.DecoratorDef;
@@ -30,6 +29,7 @@
 import org.apache.tapestry.ioc.internal.services.ClassFactoryImpl;
 import org.apache.tapestry.ioc.services.ClassFactory;
 import org.apache.tapestry.ioc.services.RegistryShutdownListener;
+import org.slf4j.Logger;
 import org.testng.annotations.Test;
 
 public class ModuleImplTest extends IOCInternalTestCase
@@ -38,18 +38,18 @@
     public void get_service_by_id_exists()
     {
         InternalRegistry registry = mockInternalRegistry();
-        Log log = mockLog();
+        Logger logger = mockLogger();
         ClassFactory factory = new ClassFactoryImpl();
 
-        ModuleDef moduleDef = new DefaultModuleDefImpl(ModuleImplTestModule.class, log,
+        ModuleDef moduleDef = new DefaultModuleDefImpl(ModuleImplTestModule.class, logger,
                 getClassFactory());
 
-        Module module = new ModuleImpl(registry, moduleDef, null, log);
+        Module module = new ModuleImpl(registry, moduleDef, null, logger);
 
-        expect(registry.logForService("Upcase")).andReturn(log);
+        expect(registry.getServiceLogger("Upcase")).andReturn(logger);
 
-        train_isDebugEnabled(log, true);
-        log.debug("Creating service 'Upcase'.");
+        train_isDebugEnabled(logger, true);
+        logger.debug("Creating service 'Upcase'.");
 
         train_getLifecycle(registry, "singleton", new SingletonServiceLifecycle());
 
@@ -57,7 +57,7 @@
 
         registry.addRegistryShutdownListener(isA(RegistryShutdownListener.class));
 
-        train_isDebugEnabled(log, false);
+        train_isDebugEnabled(logger, false);
 
         train_findDecoratorsForService(registry);
 
@@ -80,11 +80,11 @@
     public void find_service_ids_for_interface()
     {
         InternalRegistry registry = mockInternalRegistry();
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
-        ModuleDef moduleDef = new DefaultModuleDefImpl(ModuleImplTestModule.class, log, null);
+        ModuleDef moduleDef = new DefaultModuleDefImpl(ModuleImplTestModule.class, logger, null);
 
-        Module module = new ModuleImpl(registry, moduleDef, null, log);
+        Module module = new ModuleImpl(registry, moduleDef, null, logger);
 
         replay();
 
@@ -106,7 +106,7 @@
         DecoratorDef def1 = mockDecoratorDef();
         DecoratorDef def2 = mockDecoratorDef();
         Set<DecoratorDef> rawDefs = newMock(Set.class);
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         ModuleDef moduleDef = mockModuleDef();
 
@@ -119,7 +119,7 @@
 
         replay();
 
-        Module module = new ModuleImpl(registry, moduleDef, null, log);
+        Module module = new ModuleImpl(registry, moduleDef, null, logger);
 
         Set<DecoratorDef> defs = module.findMatchingDecoratorDefs(serviceDef);
 
@@ -133,12 +133,12 @@
     public void no_public_constructor_on_module_builder_class()
     {
         InternalRegistry registry = mockInternalRegistry();
-        Log log = mockLog();
-        ModuleDef def = new DefaultModuleDefImpl(PrivateConstructorModule.class, log, null);
+        Logger logger = mockLogger();
+        ModuleDef def = new DefaultModuleDefImpl(PrivateConstructorModule.class, logger, null);
 
         replay();
 
-        Module module = new ModuleImpl(registry, def, null, log);
+        Module module = new ModuleImpl(registry, def, null, logger);
 
         try
         {
@@ -161,12 +161,12 @@
     public void too_many_public_constructors_on_module_builder_class()
     {
         InternalRegistry registry = mockInternalRegistry();
-        Log log = mockLog();
-        ModuleDef def = new DefaultModuleDefImpl(ExtraPublicConstructorsModule.class, log, null);
+        Logger logger = mockLogger();
+        ModuleDef def = new DefaultModuleDefImpl(ExtraPublicConstructorsModule.class, logger, null);
         ClassFactory factory = newMock(ClassFactory.class);
-        Module module = new ModuleImpl(registry, def, null, log);
+        Module module = new ModuleImpl(registry, def, null, logger);
 
-        log.warn(contains("contains more than one public constructor"));
+        logger.warn(contains("contains more than one public constructor"));
 
         train_expandSymbols(registry, "ClassFactory", "ClassFactory");
 

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/RecursiveServiceCreationCheckWrapperTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/RecursiveServiceCreationCheckWrapperTest.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/RecursiveServiceCreationCheckWrapperTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/RecursiveServiceCreationCheckWrapperTest.java Sun Aug 26 15:23:55 2007
@@ -14,9 +14,9 @@
 
 package org.apache.tapestry.ioc.internal;
 
-import org.apache.commons.logging.Log;
 import org.apache.tapestry.ioc.ObjectCreator;
 import org.apache.tapestry.ioc.def.ServiceDef;
+import org.slf4j.Logger;
 import org.testng.annotations.Test;
 
 public class RecursiveServiceCreationCheckWrapperTest extends IOCInternalTestCase
@@ -27,7 +27,7 @@
     @Test
     public void ensure_only_called_once() throws Exception
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
         ObjectCreatorSource source = mockObjectCreatorSource();
         ObjectCreator delegate = mockObjectCreator();
         Object service = new Object();
@@ -40,7 +40,7 @@
 
         replay();
 
-        ObjectCreator wrapper = new RecursiveServiceCreationCheckWrapper(def, delegate, log);
+        ObjectCreator wrapper = new RecursiveServiceCreationCheckWrapper(def, delegate, logger);
 
         assertSame(wrapper.createObject(), service);
 
@@ -65,7 +65,7 @@
     public void reporting_of_construction_failure() throws Exception
     {
         RuntimeException failure = new RuntimeException("Just cranky.");
-        Log log = mockLog();
+        Logger logger = mockLogger();
         ObjectCreatorSource source = mockObjectCreatorSource();
         ObjectCreator delegate = mockObjectCreator();
         Object service = new Object();
@@ -74,11 +74,11 @@
 
         expect(delegate.createObject()).andThrow(failure);
 
-        log.error("Construction of service Bar failed: Just cranky.", failure);
+        logger.error("Construction of service Bar failed: Just cranky.", failure);
 
         replay();
 
-        ObjectCreator wrapper = new RecursiveServiceCreationCheckWrapper(def, delegate, log);
+        ObjectCreator wrapper = new RecursiveServiceCreationCheckWrapper(def, delegate, logger);
 
         try
         {

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceBuilderMethodFixture.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceBuilderMethodFixture.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceBuilderMethodFixture.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceBuilderMethodFixture.java Sun Aug 26 15:23:55 2007
@@ -18,11 +18,11 @@
 import java.util.Collection;
 import java.util.List;
 
-import org.apache.commons.logging.Log;
 import org.apache.tapestry.ioc.ServiceResources;
 import org.apache.tapestry.ioc.annotations.Inject;
 import org.apache.tapestry.ioc.annotations.InjectService;
 import org.apache.tapestry.ioc.annotations.Value;
+import org.slf4j.Logger;
 import org.testng.Assert;
 
 /**
@@ -38,7 +38,7 @@
 
     Class _expectedServiceInterface;
 
-    Log _expectedLog;
+    Logger _expectedLogger;
 
     FoeService _expectedFoe;
 
@@ -99,12 +99,12 @@
     }
 
     public FieService build_args(String serviceId, ServiceResources resources,
-            Class serviceInterface, Log log)
+            Class serviceInterface, Logger log)
     {
         assertEquals(serviceId, _expectedServiceId);
         assertSame(resources, _expectedServiceResources);
         assertSame(serviceInterface, _expectedServiceInterface);
-        assertSame(log, _expectedLog);
+        assertSame(log, _expectedLogger);
 
         return _fie;
     }

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceBuilderMethodInvokerTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceBuilderMethodInvokerTest.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceBuilderMethodInvokerTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceBuilderMethodInvokerTest.java Sun Aug 26 15:23:55 2007
@@ -23,10 +23,10 @@
 import java.util.Collection;
 import java.util.List;
 
-import org.apache.commons.logging.Log;
 import org.apache.tapestry.ioc.AnnotationProvider;
 import org.apache.tapestry.ioc.ObjectCreator;
 import org.apache.tapestry.ioc.ServiceBuilderResources;
+import org.slf4j.Logger;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
@@ -41,15 +41,15 @@
     {
         ServiceBuilderMethodFixture fixture = new ServiceBuilderMethodFixture();
         ServiceBuilderResources resources = mockServiceBuilderResources();
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         fixture._fie = mockFieService();
 
-        trainForConstructor(resources, log);
+        trainForConstructor(resources, logger);
 
         train_getModuleBuilder(resources, fixture);
 
-        train_isDebugEnabled(log, false);
+        train_isDebugEnabled(logger, false);
 
         replay();
 
@@ -63,11 +63,11 @@
         verify();
     }
 
-    private void trainForConstructor(ServiceBuilderResources resources, Log log)
+    private void trainForConstructor(ServiceBuilderResources resources, Logger logger)
     {
         train_getServiceId(resources, SERVICE_ID);
 
-        train_getServiceLog(resources, log);
+        train_getLogger(resources, logger);
 
         train_getServiceInterface(resources, FieService.class);
     }
@@ -79,22 +79,22 @@
         Method method = findMethod(fixture, "build_args");
         ServiceBuilderResources resources = mockServiceBuilderResources();
 
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         fixture._expectedServiceId = SERVICE_ID;
         fixture._expectedServiceInterface = FieService.class;
         fixture._expectedServiceResources = resources;
-        fixture._expectedLog = log;
+        fixture._expectedLogger = logger;
 
         fixture._fie = mockFieService();
 
-        trainForConstructor(resources, log);
+        trainForConstructor(resources, logger);
 
         train_getModuleBuilder(resources, fixture);
 
-        train_isDebugEnabled(log, true);
+        train_isDebugEnabled(logger, true);
 
-        log.debug(IOCMessages.invokingMethod(CREATOR_DESCRIPTION));
+        logger.debug(IOCMessages.invokingMethod(CREATOR_DESCRIPTION));
 
         replay();
 
@@ -114,19 +114,19 @@
         Method method = findMethod(fixture, "build_with_forced_injection");
         ServiceBuilderResources resources = mockServiceBuilderResources();
 
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         fixture._expectedString = "Injected";
 
         fixture._fie = mockFieService();
 
-        trainForConstructor(resources, log);
+        trainForConstructor(resources, logger);
 
         train_getModuleBuilder(resources, fixture);
 
-        train_isDebugEnabled(log, true);
+        train_isDebugEnabled(logger, true);
 
-        log.debug(IOCMessages.invokingMethod(CREATOR_DESCRIPTION));
+        logger.debug(IOCMessages.invokingMethod(CREATOR_DESCRIPTION));
 
         // This simulates what the real stack does when it sees @Value("Injected")
 
@@ -149,18 +149,18 @@
     {
         ServiceBuilderMethodFixture fixture = new ServiceBuilderMethodFixture();
         ServiceBuilderResources resources = mockServiceBuilderResources();
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         fixture._fie = mockFieService();
         fixture._expectedFoe = newFoe();
 
-        trainForConstructor(resources, log);
+        trainForConstructor(resources, logger);
 
         train_getModuleBuilder(resources, fixture);
 
         train_getService(resources, "Foe", FoeService.class, fixture._expectedFoe);
 
-        train_isDebugEnabled(log, false);
+        train_isDebugEnabled(logger, false);
 
         replay();
 
@@ -180,19 +180,19 @@
     {
         ServiceBuilderMethodFixture fixture = new ServiceBuilderMethodFixture();
         ServiceBuilderResources resources = mockServiceBuilderResources();
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         fixture._fie = mockFieService();
         List<Runnable> result = newMock(List.class);
         fixture._expectedConfiguration = result;
 
-        trainForConstructor(resources, log);
+        trainForConstructor(resources, logger);
 
         train_getModuleBuilder(resources, fixture);
 
         expect(resources.getOrderedConfiguration(Runnable.class)).andReturn(result);
 
-        train_isDebugEnabled(log, false);
+        train_isDebugEnabled(logger, false);
 
         replay();
 
@@ -213,19 +213,19 @@
     {
         ServiceBuilderMethodFixture fixture = new ServiceBuilderMethodFixture();
         ServiceBuilderResources resources = mockServiceBuilderResources();
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         fixture._fie = mockFieService();
         Collection<Runnable> result = newMock(Collection.class);
         fixture._expectedConfiguration = result;
 
-        trainForConstructor(resources, log);
+        trainForConstructor(resources, logger);
 
         train_getModuleBuilder(resources, fixture);
 
         expect(resources.getUnorderedConfiguration(Runnable.class)).andReturn(result);
 
-        train_isDebugEnabled(log, false);
+        train_isDebugEnabled(logger, false);
 
         replay();
 
@@ -249,15 +249,15 @@
     {
         ServiceBuilderMethodFixture fixture = new ServiceBuilderMethodFixture();
         ServiceBuilderResources resources = mockServiceBuilderResources();
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         Method method = findMethod(fixture, "build_noargs");
 
-        trainForConstructor(resources, log);
+        trainForConstructor(resources, logger);
 
         train_getModuleBuilder(resources, fixture);
 
-        train_isDebugEnabled(log, false);
+        train_isDebugEnabled(logger, false);
 
         replay();
 
@@ -282,15 +282,15 @@
     {
         ServiceBuilderMethodFixture fixture = new ServiceBuilderMethodFixture();
         ServiceBuilderResources resources = mockServiceBuilderResources();
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         Method method = findMethod(fixture, "build_fail");
 
-        trainForConstructor(resources, log);
+        trainForConstructor(resources, logger);
 
         train_getModuleBuilder(resources, fixture);
 
-        train_isDebugEnabled(log, false);
+        train_isDebugEnabled(logger, false);
 
         replay();
 
@@ -321,19 +321,19 @@
         Method method = findMethod(fixture, "build_auto");
 
         ServiceBuilderResources resources = mockServiceBuilderResources();
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         fixture._fie = mockFieService();
         fixture._expectedFoe = mockFoeService();
 
-        trainForConstructor(resources, log);
+        trainForConstructor(resources, logger);
 
         train_getModuleBuilder(resources, fixture);
 
         expect(resources.getObject(eq(FoeService.class), isA(AnnotationProvider.class))).andReturn(
                 fixture._expectedFoe);
 
-        train_isDebugEnabled(log, false);
+        train_isDebugEnabled(logger, false);
 
         replay();
 

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceDecoratorImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceDecoratorImplTest.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceDecoratorImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceDecoratorImplTest.java Sun Aug 26 15:23:55 2007
@@ -16,10 +16,10 @@
 
 import java.lang.reflect.Method;
 
-import org.apache.commons.logging.Log;
 import org.apache.tapestry.ioc.ModuleBuilderSource;
 import org.apache.tapestry.ioc.ServiceResources;
 import org.apache.tapestry.ioc.internal.util.InternalUtils;
+import org.slf4j.Logger;
 import org.testng.annotations.Test;
 
 public class ServiceDecoratorImplTest extends IOCInternalTestCase
@@ -49,16 +49,16 @@
         Method m = findMethod(fixture, "decoratorReturnsInterceptor");
 
         ServiceResources resources = mockServiceResources();
-        Log log = mockLog();
+        Logger logger = mockLogger();
         fixture._expectedDelegate = mockFieService();
         fixture._interceptorToReturn = mockFieService();
         ModuleBuilderSource source = newSource(fixture);
 
-        trainForConstructor(resources, log);
+        trainForConstructor(resources, logger);
 
-        train_isDebugEnabled(log, true);
+        train_isDebugEnabled(logger, true);
 
-        log.debug(IOCMessages.invokingMethod(InternalUtils.asString(m, getClassFactory())));
+        logger.debug(IOCMessages.invokingMethod(InternalUtils.asString(m, getClassFactory())));
 
         replay();
 
@@ -81,12 +81,12 @@
         ServiceDecoratorFixture fixture = new ServiceDecoratorFixture();
         ModuleBuilderSource source = newSource(fixture);
         ServiceResources resources = mockServiceResources();
-        Log log = mockLog();
+        Logger logger = mockLogger();
         Object delegate = mockFieService();
 
-        trainForConstructor(resources, log);
+        trainForConstructor(resources, logger);
 
-        train_isDebugEnabled(log, false);
+        train_isDebugEnabled(logger, false);
 
         replay();
 
@@ -108,21 +108,21 @@
         ServiceDecoratorFixture fixture = new ServiceDecoratorFixture();
         ModuleBuilderSource source = newSource(fixture);
         ServiceResources resources = mockServiceResources();
-        Log log = mockLog();
+        Logger logger = mockLogger();
         fixture._expectedDelegate = mockFieService();
         fixture._interceptorToReturn = newMock(FoeService.class);
 
         Method m = findMethod(fixture, "decoratorUntyped");
 
-        trainForConstructor(resources, log);
+        trainForConstructor(resources, logger);
 
-        train_isDebugEnabled(log, false);
+        train_isDebugEnabled(logger, false);
 
-        log.warn(IOCMessages.decoratorReturnedWrongType(
+        logger.warn(IOCMessages.decoratorReturnedWrongType(
                 m,
                 SERVICE_ID,
                 fixture._interceptorToReturn,
-                FieService.class), null);
+                FieService.class));
 
         replay();
 
@@ -142,13 +142,13 @@
         ServiceDecoratorFixture fixture = new ServiceDecoratorFixture();
         ModuleBuilderSource source = newSource(fixture);
         ServiceResources resources = mockServiceResources();
-        Log log = mockLog();
+        Logger logger = mockLogger();
         Object delegate = mockFieService();
         fixture._exception = new RuntimeException("Ouch!");
 
-        trainForConstructor(resources, log);
+        trainForConstructor(resources, logger);
 
-        train_isDebugEnabled(log, false);
+        train_isDebugEnabled(logger, false);
 
         replay();
 
@@ -180,13 +180,13 @@
         return newMock(FieService.class);
     }
 
-    private void trainForConstructor(ServiceResources resources, Log log)
+    private void trainForConstructor(ServiceResources resources, Logger logger)
     {
         train_getServiceId(resources, SERVICE_ID);
 
         train_getServiceInterface(resources, FieService.class);
 
-        train_getServiceLog(resources, log);
+        train_getLogger(resources, logger);
     }
 
 }

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ValidatingConfigurationWrapperTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ValidatingConfigurationWrapperTest.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ValidatingConfigurationWrapperTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ValidatingConfigurationWrapperTest.java Sun Aug 26 15:23:55 2007
@@ -14,9 +14,9 @@
 
 package org.apache.tapestry.ioc.internal;
 
-import org.apache.commons.logging.Log;
 import org.apache.tapestry.ioc.Configuration;
 import org.apache.tapestry.ioc.def.ContributionDef;
+import org.slf4j.Logger;
 import org.testng.annotations.Test;
 
 public class ValidatingConfigurationWrapperTest extends IOCInternalTestCase
@@ -26,7 +26,7 @@
     public void valid_contribution()
     {
         ContributionDef def = mockContributionDef();
-        Log log = mockLog();
+        Logger logger = mockLogger();
         Configuration configuration = mockConfiguration();
         Runnable value = mockRunnable();
 
@@ -34,8 +34,8 @@
 
         replay();
 
-        Configuration wrapper = new ValidatingConfigurationWrapper("foo.Bar", log, Runnable.class,
-                def, configuration);
+        Configuration wrapper = new ValidatingConfigurationWrapper("foo.Bar", logger,
+                Runnable.class, def, configuration);
 
         wrapper.add(value);
 
@@ -46,17 +46,17 @@
     @Test
     public void null_contribution()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
         Configuration configuration = mockConfiguration();
         ContributionDef def = new ContributionDefImpl("Bar", findMethod("contributeUnorderedNull"),
                 getClassFactory());
 
-        log.warn(IOCMessages.contributionWasNull("Bar", def));
+        logger.warn(IOCMessages.contributionWasNull("Bar", def));
 
         replay();
 
-        Configuration wrapper = new ValidatingConfigurationWrapper("Bar", log, Runnable.class, def,
-                configuration);
+        Configuration wrapper = new ValidatingConfigurationWrapper("Bar", logger, Runnable.class,
+                def, configuration);
 
         wrapper.add(null);
 
@@ -67,17 +67,18 @@
     @Test
     public void wrong_type_of_contribution()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
         Configuration configuration = mockConfiguration();
         ContributionDef def = new ContributionDefImpl("Bar", findMethod("contributeUnorderedNull"),
                 getClassFactory());
 
-        log.warn(IOCMessages.contributionWrongValueType("Bar", def, String.class, Runnable.class));
+        logger.warn(IOCMessages
+                .contributionWrongValueType("Bar", def, String.class, Runnable.class));
 
         replay();
 
-        Configuration wrapper = new ValidatingConfigurationWrapper("Bar", log, Runnable.class, def,
-                configuration);
+        Configuration wrapper = new ValidatingConfigurationWrapper("Bar", logger, Runnable.class,
+                def, configuration);
 
         wrapper.add("runnable");
 

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ValidatingMappedConfigurationWrapperTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ValidatingMappedConfigurationWrapperTest.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ValidatingMappedConfigurationWrapperTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ValidatingMappedConfigurationWrapperTest.java Sun Aug 26 15:23:55 2007
@@ -19,9 +19,9 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.commons.logging.Log;
 import org.apache.tapestry.ioc.MappedConfiguration;
 import org.apache.tapestry.ioc.def.ContributionDef;
+import org.slf4j.Logger;
 import org.testng.annotations.Test;
 
 public class ValidatingMappedConfigurationWrapperTest extends IOCInternalTestCase
@@ -32,7 +32,7 @@
     public void proper_key_and_value()
     {
         ContributionDef def = mockContributionDef();
-        Log log = mockLog();
+        Logger logger = mockLogger();
         Map<Class, ContributionDef> keyToContribution = newMap();
         MappedConfiguration<Class, Runnable> delegate = mockMappedConfiguration();
 
@@ -44,7 +44,7 @@
         replay();
 
         MappedConfiguration<Class, Runnable> wrapper = new ValidatingMappedConfigurationWrapper<Class, Runnable>(
-                SERVICE_ID, def, log, Class.class, Runnable.class, keyToContribution, delegate);
+                SERVICE_ID, def, logger, Class.class, Runnable.class, keyToContribution, delegate);
 
         wrapper.add(key, value);
 
@@ -58,7 +58,7 @@
     {
         ContributionDef def1 = newContributionDef("contributionPlaceholder1");
         ContributionDef def2 = newContributionDef("contributionPlaceholder2");
-        Log log = mockLog();
+        Logger logger = mockLogger();
         Map<Class, ContributionDef> keyToContribution = newMap();
 
         keyToContribution.put(Integer.class, def1);
@@ -68,12 +68,12 @@
         Class key = Integer.class;
         Runnable value = mockRunnable();
 
-        log.warn(IOCMessages.contributionDuplicateKey(SERVICE_ID, def2, def1));
+        logger.warn(IOCMessages.contributionDuplicateKey(SERVICE_ID, def2, def1));
 
         replay();
 
         MappedConfiguration<Class, Runnable> wrapper = new ValidatingMappedConfigurationWrapper<Class, Runnable>(
-                SERVICE_ID, def2, log, Class.class, Runnable.class, keyToContribution, delegate);
+                SERVICE_ID, def2, logger, Class.class, Runnable.class, keyToContribution, delegate);
 
         wrapper.add(key, value);
 
@@ -86,17 +86,17 @@
     public void null_key()
     {
         ContributionDef def = newContributionDef("contributionPlaceholder1");
-        Log log = mockLog();
+        Logger logger = mockLogger();
         Map<Class, ContributionDef> keyToContribution = newMap();
         MappedConfiguration<Class, Runnable> delegate = mockMappedConfiguration();
         Runnable value = mockRunnable();
 
-        log.warn(IOCMessages.contributionKeyWasNull(SERVICE_ID, def));
+        logger.warn(IOCMessages.contributionKeyWasNull(SERVICE_ID, def));
 
         replay();
 
         MappedConfiguration<Class, Runnable> wrapper = new ValidatingMappedConfigurationWrapper<Class, Runnable>(
-                SERVICE_ID, def, log, Class.class, Runnable.class, keyToContribution, delegate);
+                SERVICE_ID, def, logger, Class.class, Runnable.class, keyToContribution, delegate);
 
         wrapper.add(null, value);
 
@@ -108,17 +108,18 @@
     public void wrong_key_type()
     {
         ContributionDef def = newContributionDef("contributionPlaceholder1");
-        Log log = mockLog();
+        Logger logger = mockLogger();
         Map<?, ContributionDef> keyToContribution = newMap();
         MappedConfiguration delegate = mockMappedConfiguration();
         Runnable value = mockRunnable();
 
-        log.warn(IOCMessages.contributionWrongKeyType(SERVICE_ID, def, String.class, Class.class));
+        logger.warn(IOCMessages
+                .contributionWrongKeyType(SERVICE_ID, def, String.class, Class.class));
 
         replay();
 
         MappedConfiguration wrapper = new ValidatingMappedConfigurationWrapper(SERVICE_ID, def,
-                log, Class.class, Runnable.class, keyToContribution, delegate);
+                logger, Class.class, Runnable.class, keyToContribution, delegate);
 
         wrapper.add("java.util.List", value);
 
@@ -130,11 +131,11 @@
     public void wrong_value_type()
     {
         ContributionDef def = newContributionDef("contributionPlaceholder1");
-        Log log = mockLog();
+        Logger logger = mockLogger();
         Map<?, ContributionDef> keyToContribution = newMap();
         MappedConfiguration delegate = mockMappedConfiguration();
 
-        log.warn(IOCMessages.contributionWrongValueType(
+        logger.warn(IOCMessages.contributionWrongValueType(
                 SERVICE_ID,
                 def,
                 String.class,
@@ -143,7 +144,7 @@
         replay();
 
         MappedConfiguration wrapper = new ValidatingMappedConfigurationWrapper(SERVICE_ID, def,
-                log, Class.class, Runnable.class, keyToContribution, delegate);
+                logger, Class.class, Runnable.class, keyToContribution, delegate);
 
         wrapper.add(List.class, "do something");
 
@@ -154,16 +155,16 @@
     public void null_value()
     {
         ContributionDef def = newContributionDef("contributionPlaceholder1");
-        Log log = mockLog();
+        Logger logger = mockLogger();
         Map<Class, ContributionDef> keyToContribution = newMap();
         MappedConfiguration<Class, Runnable> delegate = mockMappedConfiguration();
 
-        log.warn(IOCMessages.contributionWasNull(SERVICE_ID, def));
+        logger.warn(IOCMessages.contributionWasNull(SERVICE_ID, def));
 
         replay();
 
         MappedConfiguration<Class, Runnable> wrapper = new ValidatingMappedConfigurationWrapper<Class, Runnable>(
-                SERVICE_ID, def, log, Class.class, Runnable.class, keyToContribution, delegate);
+                SERVICE_ID, def, logger, Class.class, Runnable.class, keyToContribution, delegate);
 
         wrapper.add(Integer.class, null);
 

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ValidatingOrderedConfigurationWrapperTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ValidatingOrderedConfigurationWrapperTest.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ValidatingOrderedConfigurationWrapperTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ValidatingOrderedConfigurationWrapperTest.java Sun Aug 26 15:23:55 2007
@@ -16,9 +16,9 @@
 
 import java.lang.reflect.Method;
 
-import org.apache.commons.logging.Log;
 import org.apache.tapestry.ioc.OrderedConfiguration;
 import org.apache.tapestry.ioc.def.ContributionDef;
+import org.slf4j.Logger;
 import org.testng.annotations.Test;
 
 public class ValidatingOrderedConfigurationWrapperTest extends IOCInternalTestCase
@@ -27,7 +27,7 @@
     public void valid_type_long_form()
     {
         ContributionDef def = mockContributionDef();
-        Log log = mockLog();
+        Logger logger = mockLogger();
         OrderedConfiguration<Runnable> configuration = mockOrderedConfiguration();
         Runnable contribution = mockRunnable();
 
@@ -36,7 +36,7 @@
         replay();
 
         OrderedConfiguration<Runnable> wrapper = new ValidatingOrderedConfigurationWrapper<Runnable>(
-                "Service", def, log, Runnable.class, configuration);
+                "Service", def, logger, Runnable.class, configuration);
 
         wrapper.add("id", contribution, "after:pre", "before:post");
 
@@ -47,7 +47,7 @@
     public void valid_type_short_form()
     {
         ContributionDef def = mockContributionDef();
-        Log log = mockLog();
+        Logger logger = mockLogger();
         OrderedConfiguration<Runnable> configuration = mockOrderedConfiguration();
         Runnable contribution = mockRunnable();
 
@@ -56,7 +56,7 @@
         replay();
 
         OrderedConfiguration<Runnable> wrapper = new ValidatingOrderedConfigurationWrapper<Runnable>(
-                "Service", def, log, Runnable.class, configuration);
+                "Service", def, logger, Runnable.class, configuration);
 
         wrapper.add("id", contribution);
 
@@ -67,7 +67,7 @@
     public void null_object_passed_through()
     {
         ContributionDef def = mockContributionDef();
-        Log log = mockLog();
+        Logger logger = mockLogger();
         OrderedConfiguration<Runnable> configuration = mockOrderedConfiguration();
 
         configuration.add("id", null);
@@ -75,7 +75,7 @@
         replay();
 
         OrderedConfiguration<Runnable> wrapper = new ValidatingOrderedConfigurationWrapper<Runnable>(
-                "Service", def, log, Runnable.class, configuration);
+                "Service", def, logger, Runnable.class, configuration);
 
         wrapper.add("id", null);
 
@@ -89,7 +89,7 @@
         Method method = findMethod("contributeBarneyService");
 
         ContributionDef def = new ContributionDefImpl("Service", method, getClassFactory());
-        Log log = mockLog();
+        Logger log = mockLogger();
         OrderedConfiguration<Runnable> configuration = mockOrderedConfiguration();
 
         log.warn(IOCMessages.contributionWrongValueType(

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/BridgeBuilderTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/BridgeBuilderTest.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/BridgeBuilderTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/BridgeBuilderTest.java Sun Aug 26 15:23:55 2007
@@ -16,9 +16,9 @@
 
 import java.io.Serializable;
 
-import org.apache.commons.logging.Log;
 import org.apache.tapestry.ioc.internal.IOCInternalTestCase;
 import org.apache.tapestry.ioc.services.ClassFactory;
+import org.slf4j.Logger;
 import org.testng.annotations.Test;
 
 public class BridgeBuilderTest extends IOCInternalTestCase
@@ -28,12 +28,12 @@
     @Test
     public void standard_interface_and_filter()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
         BridgeBuilder<StandardService, StandardFilter> bb = new BridgeBuilder<StandardService, StandardFilter>(
-                log, StandardService.class, StandardFilter.class, _classFactory);
+                logger, StandardService.class, StandardFilter.class, _classFactory);
 
         StandardFilter sf = new StandardFilter()
         {
@@ -71,12 +71,12 @@
     @Test
     public void toString_part_of_service_interface()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
         BridgeBuilder<ToStringService, ToStringFilter> bb = new BridgeBuilder<ToStringService, ToStringFilter>(
-                log, ToStringService.class, ToStringFilter.class, _classFactory);
+                logger, ToStringService.class, ToStringFilter.class, _classFactory);
 
         ToStringFilter f = new ToStringFilter()
         {
@@ -105,19 +105,17 @@
     @Test
     public void service_interface_method_not_matched_in_filter_interface()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
         ExtraServiceMethod next = newMock(ExtraServiceMethod.class);
         Serializable filter = newMock(Serializable.class);
 
-        log
-                .error(
-                        "Method void extraServiceMethod() has no match in filter interface java.io.Serializable.",
-                        null);
+        logger
+                .error("Method void extraServiceMethod() has no match in filter interface java.io.Serializable.");
 
         replay();
 
         BridgeBuilder<ExtraServiceMethod, Serializable> bb = new BridgeBuilder<ExtraServiceMethod, Serializable>(
-                log, ExtraServiceMethod.class, Serializable.class, _classFactory);
+                logger, ExtraServiceMethod.class, Serializable.class, _classFactory);
 
         ExtraServiceMethod esm = bb.instantiateBridge(next, filter);
 
@@ -139,21 +137,19 @@
     @Test
     public void filter_interface_contains_extra_methods()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
         Serializable next = newMock(Serializable.class);
         ExtraFilterMethod filter = newMock(ExtraFilterMethod.class);
 
-        log
-                .error(
-                        "Method void extraFilterMethod() of filter interface "
-                                + "org.apache.tapestry.ioc.internal.services.ExtraFilterMethod does not have a matching method "
-                                + "in java.io.Serializable.",
-                        null);
+        logger
+                .error("Method void extraFilterMethod() of filter interface "
+                        + "org.apache.tapestry.ioc.internal.services.ExtraFilterMethod does not have a matching method "
+                        + "in java.io.Serializable.");
 
         replay();
 
         BridgeBuilder<Serializable, ExtraFilterMethod> bb = new BridgeBuilder<Serializable, ExtraFilterMethod>(
-                log, Serializable.class, ExtraFilterMethod.class, _classFactory);
+                logger, Serializable.class, ExtraFilterMethod.class, _classFactory);
 
         assertNotNull(bb.instantiateBridge(next, filter));
 
@@ -163,12 +159,12 @@
     @Test
     public void service_parameter_in_middle_of_filter_method()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
         BridgeBuilder<MiddleService, MiddleFilter> bb = new BridgeBuilder<MiddleService, MiddleFilter>(
-                log, MiddleService.class, MiddleFilter.class, _classFactory);
+                logger, MiddleService.class, MiddleFilter.class, _classFactory);
 
         MiddleFilter mf = new MiddleFilter()
         {

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ClassFabImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ClassFabImplTest.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ClassFabImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ClassFabImplTest.java Sun Aug 26 15:23:55 2007
@@ -1,4 +1,4 @@
-// Copyright 2006 The Apache Software Foundation
+// Copyright 2006, 2007 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -23,13 +23,13 @@
 
 import javassist.CtClass;
 
-import org.apache.commons.logging.LogFactory;
 import org.apache.tapestry.ioc.BaseLocatable;
 import org.apache.tapestry.ioc.internal.services.LoggingDecoratorImplTest.ToStringService;
 import org.apache.tapestry.ioc.services.ClassFab;
 import org.apache.tapestry.ioc.services.MethodSignature;
 import org.apache.tapestry.ioc.services.PropertyAccess;
 import org.apache.tapestry.ioc.test.IOCTestCase;
+import org.slf4j.LoggerFactory;
 import org.testng.annotations.Test;
 
 public class ClassFabImplTest extends IOCTestCase
@@ -67,7 +67,7 @@
     {
         CtClass ctClass = _source.newClass(className, superClass);
 
-        return new ClassFabImpl(_source, ctClass, LogFactory.getLog("ClassFab"));
+        return new ClassFabImpl(_source, ctClass, LoggerFactory.getLogger("ClassFab"));
     }
 
     @Test

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/LoggingDecoratorImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/LoggingDecoratorImplTest.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/LoggingDecoratorImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/LoggingDecoratorImplTest.java Sun Aug 26 15:23:55 2007
@@ -14,9 +14,9 @@
 
 package org.apache.tapestry.ioc.internal.services;
 
-import org.apache.commons.logging.Log;
 import org.apache.tapestry.ioc.services.LoggingDecorator;
 import org.apache.tapestry.ioc.test.IOCTestCase;
+import org.slf4j.Logger;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 import org.xml.sax.SAXParseException;
@@ -51,20 +51,20 @@
     @Test
     public void void_method()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
         Runnable delegate = mockRunnable();
 
-        train_isDebugEnabled(log, true);
-        log.debug("[ENTER] run()");
+        train_isDebugEnabled(logger, true);
+        logger.debug("[ENTER] run()");
 
         delegate.run();
 
-        log.debug("[ EXIT] run");
+        logger.debug("[ EXIT] run");
 
         replay();
 
         LoggingDecorator ld = newLoggingDecorator();
-        Runnable interceptor = ld.build(Runnable.class, delegate, "foo.Bar", log);
+        Runnable interceptor = ld.build(Runnable.class, delegate, "foo.Bar", logger);
 
         interceptor.run();
 
@@ -84,23 +84,23 @@
     public void method_throws_runtime_exception()
     {
         Throwable t = new RuntimeException("From delegate.");
-        Log log = mockLog();
+        Logger logger = mockLogger();
         Runnable delegate = mockRunnable();
 
-        train_isDebugEnabled(log, true);
-        log.debug("[ENTER] run()");
+        train_isDebugEnabled(logger, true);
+        logger.debug("[ENTER] run()");
 
         delegate.run();
         setThrowable(t);
 
-        train_isDebugEnabled(log, true);
+        train_isDebugEnabled(logger, true);
 
-        log.debug("[ FAIL] run -- " + t.getClass().getName(), t);
+        logger.debug("[ FAIL] run -- " + t.getClass().getName(), t);
 
         replay();
 
         LoggingDecorator ld = newLoggingDecorator();
-        Runnable interceptor = ld.build(Runnable.class, delegate, "foo.Bar", log);
+        Runnable interceptor = ld.build(Runnable.class, delegate, "foo.Bar", logger);
 
         try
         {
@@ -119,23 +119,24 @@
     public void method_throws_checked_exception() throws Exception
     {
         Throwable t = new SAXParseException("From delegate.", null);
-        Log log = mockLog();
+        Logger logger = mockLogger();
         ExceptionService delegate = newMock(ExceptionService.class);
 
-        train_isDebugEnabled(log, true);
-        log.debug("[ENTER] parse()");
+        train_isDebugEnabled(logger, true);
+        logger.debug("[ENTER] parse()");
 
         delegate.parse();
         setThrowable(t);
 
-        train_isDebugEnabled(log, true);
+        train_isDebugEnabled(logger, true);
 
-        log.debug("[ FAIL] parse -- " + t.getClass().getName(), t);
+        logger.debug("[ FAIL] parse -- " + t.getClass().getName(), t);
 
         replay();
 
         LoggingDecorator ld = newLoggingDecorator();
-        ExceptionService interceptor = ld.build(ExceptionService.class, delegate, "foo.Bar", log);
+        ExceptionService interceptor = ld
+                .build(ExceptionService.class, delegate, "foo.Bar", logger);
 
         try
         {
@@ -153,7 +154,7 @@
     @Test
     public void object_parameter_and_return_type()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
         UpcaseService delegate = new UpcaseService()
         {
             public String upcase(String input)
@@ -162,15 +163,15 @@
             }
         };
 
-        train_isDebugEnabled(log, true);
-        log.debug("[ENTER] upcase(\"barney\")");
+        train_isDebugEnabled(logger, true);
+        logger.debug("[ENTER] upcase(\"barney\")");
 
-        log.debug("[ EXIT] upcase [\"BARNEY\"]");
+        logger.debug("[ EXIT] upcase [\"BARNEY\"]");
 
         replay();
 
         LoggingDecorator ld = newLoggingDecorator();
-        UpcaseService interceptor = ld.build(UpcaseService.class, delegate, "foo.Bar", log);
+        UpcaseService interceptor = ld.build(UpcaseService.class, delegate, "foo.Bar", logger);
 
         assertEquals(interceptor.upcase("barney"), "BARNEY");
 
@@ -180,7 +181,7 @@
     @Test
     public void primitive_parameter_and_return_type()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
         AdderService delegate = new AdderService()
         {
             public long add(long operand1, long operand2)
@@ -189,15 +190,15 @@
             }
         };
 
-        train_isDebugEnabled(log, true);
-        log.debug("[ENTER] add(6, 13)");
+        train_isDebugEnabled(logger, true);
+        logger.debug("[ENTER] add(6, 13)");
 
-        log.debug("[ EXIT] add [19]");
+        logger.debug("[ EXIT] add [19]");
 
         replay();
 
         LoggingDecorator ld = newLoggingDecorator();
-        AdderService interceptor = ld.build(AdderService.class, delegate, "foo.Bar", log);
+        AdderService interceptor = ld.build(AdderService.class, delegate, "foo.Bar", logger);
 
         assertEquals(interceptor.add(6, 13), 19);
 
@@ -207,7 +208,7 @@
     @Test
     public void to_string_method_in_service_interface_is_delegated()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
         ToStringService delegate = new ToStringService()
         {
             @Override
@@ -217,15 +218,15 @@
             }
         };
 
-        train_isDebugEnabled(log, true);
-        log.debug("[ENTER] toString()");
+        train_isDebugEnabled(logger, true);
+        logger.debug("[ENTER] toString()");
 
-        log.debug("[ EXIT] toString [\"FROM DELEGATE\"]");
+        logger.debug("[ EXIT] toString [\"FROM DELEGATE\"]");
 
         replay();
 
         LoggingDecorator ld = newLoggingDecorator();
-        ToStringService interceptor = ld.build(ToStringService.class, delegate, "foo.Bar", log);
+        ToStringService interceptor = ld.build(ToStringService.class, delegate, "foo.Bar", logger);
 
         assertEquals(interceptor.toString(), "FROM DELEGATE");
 

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/PipelineBuilderImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/PipelineBuilderImplTest.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/PipelineBuilderImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/PipelineBuilderImplTest.java Sun Aug 26 15:23:55 2007
@@ -19,10 +19,10 @@
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.commons.logging.Log;
 import org.apache.tapestry.ioc.Registry;
 import org.apache.tapestry.ioc.internal.IOCInternalTestCase;
 import org.apache.tapestry.ioc.services.PipelineBuilder;
+import org.slf4j.Logger;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
@@ -56,7 +56,7 @@
     @Test
     public void pipeline_with_filters()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
@@ -93,7 +93,7 @@
         };
 
         StandardService pipeline = _builder.build(
-                log,
+                logger,
                 StandardService.class,
                 StandardFilter.class,
                 Arrays.asList(subtracter, multiplier, adder),
@@ -109,7 +109,7 @@
     @Test
     public void pipeline_without_filters_is_terminator()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
         StandardService terminator = newMock(StandardService.class);
 
         replay();
@@ -117,7 +117,7 @@
         List<StandardFilter> filters = newList();
 
         StandardService pipeline = _builder.build(
-                log,
+                logger,
                 StandardService.class,
                 StandardFilter.class,
                 filters,
@@ -131,14 +131,14 @@
     @Test
     public void pipeline_with_default_terminator()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
         List<StandardFilter> filters = newList();
 
         StandardService pipeline = _builder.build(
-                log,
+                logger,
                 StandardService.class,
                 StandardFilter.class,
                 filters);

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/RegistryShutdownHubImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/RegistryShutdownHubImplTest.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/RegistryShutdownHubImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/RegistryShutdownHubImplTest.java Sun Aug 26 15:23:55 2007
@@ -12,79 +12,79 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package org.apache.tapestry.ioc.internal.services;
-
+package org.apache.tapestry.ioc.internal.services;
+
 import static org.easymock.EasyMock.contains;
 import static org.easymock.EasyMock.same;
 
-import org.apache.commons.logging.Log;
 import org.apache.tapestry.ioc.internal.IOCInternalTestCase;
 import org.apache.tapestry.ioc.services.RegistryShutdownListener;
+import org.slf4j.Logger;
 import org.testng.annotations.Test;
-
-public class RegistryShutdownHubImplTest extends IOCInternalTestCase
-{
-
-    @Test
-    public void add_and_notify()
-    {
-        RegistryShutdownListener l1 = mockListener();
-        RegistryShutdownListener l2 = mockListener();
-        Log log = mockLog();
-
-        l1.registryDidShutdown();
-        l2.registryDidShutdown();
-
-        replay();
-
-        RegistryShutdownHubImpl hub = new RegistryShutdownHubImpl(log);
-
-        hub.addRegistryShutdownListener(l1);
-        hub.addRegistryShutdownListener(l2);
-
-        hub.fireRegistryDidShutdown();
-
-        verify();
-    }
-
-    /**
-     * Shows that multiple listener will be notified, and that an error in one doesn't prevent
-     * others from being notified.
-     */
-    @Test
-    public void notification_error()
-    {
-        RegistryShutdownListener l1 = mockListener();
-        RegistryShutdownListener l2 = mockListener();
-        RegistryShutdownListener l3 = mockListener();
-
-        Log log = mockLog();
-
-        Throwable t = new RuntimeException("Shutdown failure.");
-
-        l1.registryDidShutdown();
-        l2.registryDidShutdown();
-        setThrowable(t);
-
-        log.error(contains("Shutdown failure."), same(t));
-
-        l3.registryDidShutdown();
-
-        replay();
-
-        RegistryShutdownHubImpl hub = new RegistryShutdownHubImpl(log);
-
-        hub.addRegistryShutdownListener(l1);
-        hub.addRegistryShutdownListener(l2);
-        hub.addRegistryShutdownListener(l3);
-
-        hub.fireRegistryDidShutdown();
-
-        verify();
-    }
-
-    private RegistryShutdownListener mockListener()
-    {
-        return newMock(RegistryShutdownListener.class);
-    }
-}
+
+public class RegistryShutdownHubImplTest extends IOCInternalTestCase
+{
+
+    @Test
+    public void add_and_notify()
+    {
+        RegistryShutdownListener l1 = mockListener();
+        RegistryShutdownListener l2 = mockListener();
+        Logger logger = mockLogger();
+
+        l1.registryDidShutdown();
+        l2.registryDidShutdown();
+
+        replay();
+
+        RegistryShutdownHubImpl hub = new RegistryShutdownHubImpl(logger);
+
+        hub.addRegistryShutdownListener(l1);
+        hub.addRegistryShutdownListener(l2);
+
+        hub.fireRegistryDidShutdown();
+
+        verify();
+    }
+
+    /**
+     * Shows that multiple listener will be notified, and that an error in one doesn't prevent
+     * others from being notified.
+     */
+    @Test
+    public void notification_error()
+    {
+        RegistryShutdownListener l1 = mockListener();
+        RegistryShutdownListener l2 = mockListener();
+        RegistryShutdownListener l3 = mockListener();
+
+        Logger logger = mockLogger();
+
+        Throwable t = new RuntimeException("Shutdown failure.");
+
+        l1.registryDidShutdown();
+        l2.registryDidShutdown();
+        setThrowable(t);
+
+        logger.error(contains("Shutdown failure."), same(t));
+
+        l3.registryDidShutdown();
+
+        replay();
+
+        RegistryShutdownHubImpl hub = new RegistryShutdownHubImpl(logger);
+
+        hub.addRegistryShutdownListener(l1);
+        hub.addRegistryShutdownListener(l2);
+        hub.addRegistryShutdownListener(l3);
+
+        hub.fireRegistryDidShutdown();
+
+        verify();
+    }
+
+    private RegistryShutdownListener mockListener()
+    {
+        return newMock(RegistryShutdownListener.class);
+    }
+}

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ServiceLoggerTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ServiceLoggerTest.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ServiceLoggerTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ServiceLoggerTest.java Sun Aug 26 15:23:55 2007
@@ -16,23 +16,23 @@
 
 import java.util.Arrays;
 
-import org.apache.commons.logging.Log;
 import org.apache.tapestry.ioc.services.ExceptionTracker;
 import org.apache.tapestry.ioc.test.IOCTestCase;
+import org.slf4j.Logger;
 import org.testng.annotations.Test;
 
 public class ServiceLoggerTest extends IOCTestCase
 {
     private void try_entry(String methodName, String expected, Object... arguments)
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
         ExceptionTracker tracker = mockExceptionTracker();
 
-        log.debug("[ENTER] " + expected);
+        logger.debug("[ENTER] " + expected);
 
         replay();
 
-        new ServiceLogger(log, tracker).entry(methodName, arguments);
+        new ServiceLogger(logger, tracker).entry(methodName, arguments);
 
         verify();
 
@@ -45,14 +45,14 @@
 
     private void try_exit(String methodName, String expected, Object result)
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
         ExceptionTracker tracker = mockExceptionTracker();
 
-        log.debug("[ EXIT] " + expected);
+        logger.debug("[ EXIT] " + expected);
 
         replay();
 
-        new ServiceLogger(log, tracker).exit(methodName, result);
+        new ServiceLogger(logger, tracker).exit(methodName, result);
 
         verify();
     }
@@ -80,14 +80,14 @@
     @Test
     public void void_exit_test()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
         ExceptionTracker tracker = mockExceptionTracker();
 
-        log.debug("[ EXIT] wilma");
+        logger.debug("[ EXIT] wilma");
 
         replay();
 
-        new ServiceLogger(log, tracker).voidExit("wilma");
+        new ServiceLogger(logger, tracker).voidExit("wilma");
 
         verify();
     }
@@ -95,20 +95,20 @@
     @Test
     public void fail_test_exception_not_already_logged()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
         ExceptionTracker tracker = mockExceptionTracker();
 
         RuntimeException t = new RuntimeException("Ouch!");
 
-        train_isDebugEnabled(log, true);
+        train_isDebugEnabled(logger, true);
 
         train_exceptionLogged(tracker, t, false);
 
-        log.debug("[ FAIL] wilma -- " + t.getClass().getName(), t);
+        logger.debug("[ FAIL] wilma -- " + t.getClass().getName(), t);
 
         replay();
 
-        new ServiceLogger(log, tracker).fail("wilma", t);
+        new ServiceLogger(logger, tracker).fail("wilma", t);
 
         verify();
     }
@@ -116,20 +116,20 @@
     @Test
     public void fail_test_exception_previously_logged()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
         ExceptionTracker tracker = mockExceptionTracker();
 
         RuntimeException t = new RuntimeException("Ouch!");
 
-        train_isDebugEnabled(log, true);
+        train_isDebugEnabled(logger, true);
 
         train_exceptionLogged(tracker, t, true);
 
-        log.debug("[ FAIL] wilma -- " + t.getClass().getName(), null);
+        logger.debug("[ FAIL] wilma -- " + t.getClass().getName(), (Throwable) null);
 
         replay();
 
-        new ServiceLogger(log, tracker).fail("wilma", t);
+        new ServiceLogger(logger, tracker).fail("wilma", t);
 
         verify();
     }
@@ -137,16 +137,16 @@
     @Test
     public void fail_debug_not_enabled()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
         ExceptionTracker tracker = mockExceptionTracker();
 
         RuntimeException t = new RuntimeException("Ouch!");
 
-        train_isDebugEnabled(log, false);
+        train_isDebugEnabled(logger, false);
 
         replay();
 
-        new ServiceLogger(log, tracker).fail("wilma", t);
+        new ServiceLogger(logger, tracker).fail("wilma", t);
 
         verify();
     }
@@ -159,18 +159,18 @@
     @Test
     public void debug_enabled()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
         ExceptionTracker tracker = mockExceptionTracker();
 
-        train_isDebugEnabled(log, true);
-        train_isDebugEnabled(log, false);
+        train_isDebugEnabled(logger, true);
+        train_isDebugEnabled(logger, false);
 
         replay();
 
-        ServiceLogger logger = new ServiceLogger(log, tracker);
+        ServiceLogger serviceLogger = new ServiceLogger(logger, tracker);
 
-        assertTrue(logger.isDebugEnabled());
-        assertFalse(logger.isDebugEnabled());
+        assertTrue(serviceLogger.isDebugEnabled());
+        assertFalse(serviceLogger.isDebugEnabled());
 
         verify();
     }

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ThreadCleanupHubImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ThreadCleanupHubImplTest.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ThreadCleanupHubImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ThreadCleanupHubImplTest.java Sun Aug 26 15:23:55 2007
@@ -14,9 +14,9 @@
 
 package org.apache.tapestry.ioc.internal.services;
 
-import org.apache.commons.logging.Log;
 import org.apache.tapestry.ioc.services.ThreadCleanupListener;
 import org.apache.tapestry.ioc.test.IOCTestCase;
+import org.slf4j.Logger;
 import org.testng.annotations.Test;
 
 public class ThreadCleanupHubImplTest extends IOCTestCase
@@ -24,11 +24,11 @@
     @Test
     public void no_listeners()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
-        new ThreadCleanupHubImpl(log).cleanup();
+        new ThreadCleanupHubImpl(logger).cleanup();
 
         verify();
     }
@@ -36,14 +36,14 @@
     @Test
     public void listeners_are_one_shot()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
         ThreadCleanupListener listener = mockThreadCleanupListener();
 
         listener.threadDidCleanup();
 
         replay();
 
-        ThreadCleanupHubImpl hub = new ThreadCleanupHubImpl(log);
+        ThreadCleanupHubImpl hub = new ThreadCleanupHubImpl(logger);
 
         hub.addThreadCleanupListener(listener);
 
@@ -72,7 +72,7 @@
     {
         final RuntimeException t = new RuntimeException("Boom!");
 
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         ThreadCleanupListener listener = new ThreadCleanupListener()
         {
@@ -84,11 +84,11 @@
 
         };
 
-        log.warn(ServiceMessages.threadCleanupError(listener, t), t);
+        logger.warn(ServiceMessages.threadCleanupError(listener, t), t);
 
         replay();
 
-        ThreadCleanupHubImpl hub = new ThreadCleanupHubImpl(log);
+        ThreadCleanupHubImpl hub = new ThreadCleanupHubImpl(logger);
 
         hub.addThreadCleanupListener(listener);
 



Mime
View raw message