Author: hlship
Date: Tue Oct 28 11:43:23 2008
New Revision: 708630

URL: http://svn.apache.org/viewvc?rev=708630&view=rev
Log:
TAP5-119: Tapestry should not use the page/component Logger for internal 
logging of class transformation and event dispatch logic

Modified:
    
tapestry/tapestry5/trunk/quickstart/src/main/resources/archetype-resources/src/main/resources/log4j.properties
    tapestry/tapestry5/trunk/quickstart/src/site/apt/index.apt
    tapestry/tapestry5/trunk/src/site/apt/guide/logging.apt
    
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentClassTransformerImpl.java
    
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderQueueImpl.java
    
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElement.java
    
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java
    
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/PageResources.java
    
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/PageResourcesImpl.java
    
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/PageResourcesSourceImpl.java

Modified: 
tapestry/tapestry5/trunk/quickstart/src/main/resources/archetype-resources/src/main/resources/log4j.properties
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/quickstart/src/main/resources/archetype-resources/src/main/resources/log4j.properties?rev=708630&r1=708629&r2=708630&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/quickstart/src/main/resources/archetype-resources/src/main/resources/log4j.properties
 (original)
+++ 
tapestry/tapestry5/trunk/quickstart/src/main/resources/archetype-resources/src/main/resources/log4j.properties
 Tue Oct 28 11:43:23 2008
@@ -15,17 +15,27 @@
 # Outputs a list of pages, components and mixins at startup.
 
log4j.category.org.apache.tapestry5.services.TapestryModule.ComponentClassResolver=info
 
-# Outputs startup statistics; time to setup and initialize the registry, and a 
list of
+# Outputs startup statistics; elapsed time to setup and initialize the 
registry, and a list of
 # available services.
 log4j.category.org.apache.tapestry5.TapestryFilter=info
 
 
-# Turning on debug mode for a page or component will show all of the code 
changes that occur when the
-# class is loaded.  Turning on debug mode for a page will enable detailed 
output about
-# the contruction of the page, including the runtime code modifications that 
occur. Verbose
-# mode is rarely used, as it outputs voluminous details about the rendering of 
the page.
+# Turning on debug mode for a page's or component's transformer logger
+# will show all of the code changes that occur when the
+# class is loaded.
 
-# log4j.category.${packageName}.pages.Index=debug
+# log4j.category.tapestry.transformer.${packageName}.pages.Index=debug
+
+# Turning on debug mode for a component's events logger will show all the 
events triggered on the
+# component, and which component methods are invoked as a result.
+
+# log4j.category.tapestry.events.${packageName}.pages.Index=debug
+
+# Turning on trace mode for a page's render provides extended information 
about every step
+# in rendering (this is not generally helpful).  Turning on debug mode will 
add a one-line
+# summary that includes the elapsed render time.
+
+# log4j.category.tapestry.render.${packageName}.pages.Index=debug
 
 # Turn on some verbose debugging about everything in the application. This is 
nice initially,
 # while getting everything set up.  You'll probably want to remove this once 
you are 

Modified: tapestry/tapestry5/trunk/quickstart/src/site/apt/index.apt
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/quickstart/src/site/apt/index.apt?rev=708630&r1=708629&r2=708630&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/quickstart/src/site/apt/index.apt (original)
+++ tapestry/tapestry5/trunk/quickstart/src/site/apt/index.apt Tue Oct 28 
11:43:23 2008
@@ -84,10 +84,10 @@
 $
 +---+
 
-  <This first time you try this, you'll probably see a huge amount of messages 
about Maven downloading stuff, in addition to what's above.>
+  <This first time you try this, you'll probably see a huge amount of messages 
about Maven downloading all sorts of plugins and JARs, in addition to what's 
above.>
 
   Maven has combined your information to form a new directory containing your 
application.  It has created a Maven pom.xml, a web.xml, a log4j.properties 
file,
-  and a starting page (Start.html and Start.java) with each file in its 
correct location. It also creates a starter Tapestry IoC module for the 
application (AppModule.java).
+  and a starting page (Index.tml and Index.java) with each file in its correct 
location. It also creates a starter Tapestry IoC module for the application 
(AppModule.java).  
   
   You can run the application directly, using the Jetty servlet container:
   
@@ -132,9 +132,9 @@
   
 About Snapshots
 
-  Tapestry 5 is currently in a pre-release stage. The Tapestry libraries, 
including this archetype, are being distributed as snaphots and are rebuilt 
nightly. Being snapshots, these artifacts are not in the central Maven 
repository.
+  Tapestry 5 is currently in a pre-release stage. The Tapestry libraries, 
including this archetype, are being distributed as snapshots and are rebuilt 
nightly. Being snapshots, these artifacts are not in the central Maven 
repository.
   To make use of the Tapestry snapshots, append  
<<<-DremoteRepositories=http://tapestry.formos.com/maven-snapshot-repository/>>>
 and <<<-DarchetypeVersion=5.0.x-SNAPSHOT>>>  (you'll have to figure out what
-  the lastest snapshot version is) to the command line when invoking Maven. 
+  the latest snapshot version is) to the command line when invoking Maven. 
   
   The generated POM includes entries to automatically search the snapshot 
repository, so you won't need to use <<<-DremoteRepositories>>> after creating 
your initial project.
   

Modified: tapestry/tapestry5/trunk/src/site/apt/guide/logging.apt
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/apt/guide/logging.apt?rev=708630&r1=708629&r2=708630&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/src/site/apt/guide/logging.apt (original)
+++ tapestry/tapestry5/trunk/src/site/apt/guide/logging.apt Tue Oct 28 11:43:23 
2008
@@ -38,14 +38,16 @@
 @Log annotation
 
   You may mark any component method with the 
{{{../apidocs/org/apache/tapestry5/annotations/Log.html}Log}} annotation.
-  Method entry, exit (and any thrown exceptions) will be logged at DEBUG 
level. This is very convienient for
+  Method entry, exit (and any thrown exceptions) will be logged at DEBUG 
level, along with parameter values and the
+  method's return value. This is very convienient for
   debugging, especially when placed on event handler methods.
 
 
-DEBUG Level
+Component Transformation Debugging
 
-  When a component's logger is configured at the DEBUG level, you will also 
see added output when the class is first
-  accessed identifying how Tapestry is modifying the bytecode of the class.  
+  Tapestry performs a transformation on your classes as they are loaded, often 
you want to gain insight into
+  what it has done.  Tapestry uses a secondary logger, consisting of the class 
name with the prefix "tapestry.transformer.",
+  to log (at debug level) the results of transforming the class.
   
   Example:
   
@@ -121,34 +123,69 @@
 
   Is this helpful?  Probably only if you are developing your own code that 
integrates into the component class transformation chain; for example,
   to support your own field and method annotations.
-  
-TRACE Level
 
-  Enabling the TRACE level <for pages> results in extremely verbose logging of 
every activity that drives the rendering of output, such as each component
-  working its way through the {{{rendering.html}rendering stage machine}}.  
Example:
-  
+Component Event Debugging
+
+  Tapestry can also debug component event logic.  The component's logger, with 
a "tapestry.events." prefix, is used at debug level.
+  The debugging output identifies the event name and event source, and 
identifies any methods that are invoked.
+
+  Note that events that are not handled by a component will bubble up to the 
component's container; further logging for
+  the same event will occur using the logger associated with the container.  
The page containing the initial component
+  is the final step when logging.
+
+  Examples:
+
 ----
-[TRACE] MerryChristmas Executing: ComponentPageElement[MerryChristmas]
-[TRACE] MerryChristmas Executing: SetupRender[MerryChristmas]
-[TRACE] MerryChristmas Executing: BeginRender[MerryChristmas]
-[TRACE] MerryChristmas Executing: BeforeRenderTemplate[MerryChristmas]
-[TRACE] MerryChristmas Executing: ComponentPageElement[MerryChristmas:border]
-[TRACE] MerryChristmas Executing: SetupRender[MerryChristmas:border]
-[TRACE] MerryChristmas Executing: BeginRender[MerryChristmas:border]
-[TRACE] MerryChristmas Executing: BeforeRenderTemplate[MerryChristmas:border]
-[TRACE] MerryChristmas Executing: Start[html]
-[TRACE] MerryChristmas Executing: Text[
-    ]
-[TRACE] MerryChristmas Executing: Start[head]
-[TRACE] MerryChristmas Executing: Text[
-        ]
-[TRACE] MerryChristmas Executing: Start[title]
-[TRACE] MerryChristmas Executing: Text[Tapestry Integration Test Application 
#1]
+[DEBUG] ActionLink Dispatch event: ComponentEvent[action from (self)]
+[DEBUG] ActionDemo Dispatch event: ComponentEvent[action from actionlink]
+[DEBUG] ActionDemo Invoking: 
org.apache.tapestry5.integration.app1.pages.nested.ActionDemo.onAction(java.lang.Long)
 (at ActionDemo.java:28)
+[DEBUG] ActionDemo Dispatch event: ComponentEvent[passivate from (self)]
+[DEBUG] ActionDemo Invoking: 
org.apache.tapestry5.integration.app1.pages.nested.ActionDemo.onPassivate() (at 
ActionDemo.java:38)
+-----
+  
+Render State Debugging
+
+  Occasionally it is useful to get debugging output of all the steps involved 
in rendering a page.
+  In Tapestry, rendering involves a series of rendering commands passed 
through a rendering queue (most commands
+  will operate by queuing up additional commands).
+
+  The logger is the page's logger prefixed with "tapestry.render.".
+
+  This debugging is most useful when you get a rendering exception about 
unbalanced open and close tags.
+
+  Most logging is at the trace level, except for a debug-level entry at the 
end identifying the number of commands
+  and the elapsed time.
 
-  . . .
 ----
+  . . .
+  
+[TRACE] ActionDemo Executing: Text[Apache Software Foundation]
+[TRACE] ActionDemo Executing: End
+[TRACE] ActionDemo Executing: Text[
+            ]
+[TRACE] ActionDemo Executing: End
+[TRACE] ActionDemo Executing: Text[
+
+            ]
+[TRACE] ActionDemo Executing: Start[http://www.w3.org/1999/xhtml div]
+[TRACE] ActionDemo Executing: [EMAIL PROTECTED]
+[TRACE] ActionDemo Executing: End
+[TRACE] ActionDemo Executing: Text[
 
-  Is this helpful?  Only if you are writing your own components and get an 
exception about unbalanced elements. This output gives
-  you a detailed view into what has rendered and when, so you can track it 
down.
+        ]
+[TRACE] ActionDemo Executing: End
+[TRACE] ActionDemo Executing: End
+[TRACE] ActionDemo Executing: End
+[TRACE] ActionDemo Executing: AfterRenderTemplate[nested/ActionDemo:border]
+[TRACE] ActionDemo Executing: AfterRender[nested/ActionDemo:border]
+[TRACE] ActionDemo Executing: CleanupRender[nested/ActionDemo:border]
+[TRACE] ActionDemo Executing: [EMAIL PROTECTED]
+[TRACE] ActionDemo Executing: DTD[name=html; publicId=-//W3C//DTD XHTML 1.0 
Strict//EN; systemId=http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd]
+[TRACE] ActionDemo Executing: AfterRenderTemplate[nested/ActionDemo]
+[TRACE] ActionDemo Executing: AfterRender[nested/ActionDemo]
+[TRACE] ActionDemo Executing: CleanupRender[nested/ActionDemo]
+[TRACE] ActionDemo Executing: [EMAIL PROTECTED]
+[DEBUG] ActionDemo Executed 276 rendering commands (max queue depth: 141) in 
0.025 seconds
+----
     
   
\ No newline at end of file

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentClassTransformerImpl.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentClassTransformerImpl.java?rev=708630&r1=708629&r2=708630&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentClassTransformerImpl.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentClassTransformerImpl.java
 Tue Oct 28 11:43:23 2008
@@ -131,7 +131,7 @@
 
         String classname = ctClass.getName();
 
-        Logger logger = loggerSource.getLogger(classname);
+        Logger logger = loggerSource.getLogger("tapestry.transfomer." + 
classname);
 
         // If the parent class is in a controlled package, it will already 
have been loaded and
         // transformed (that is driven by the ComponentInstantiatorSource).

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderQueueImpl.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderQueueImpl.java?rev=708630&r1=708629&r2=708630&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderQueueImpl.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderQueueImpl.java
 Tue Oct 28 11:43:23 2008
@@ -18,6 +18,7 @@
 import org.apache.tapestry5.dom.Element;
 import org.apache.tapestry5.internal.structure.Page;
 import static org.apache.tapestry5.ioc.IOCConstants.PERTHREAD_SCOPE;
+import org.apache.tapestry5.ioc.LoggerSource;
 import org.apache.tapestry5.ioc.annotations.Scope;
 import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
 import org.apache.tapestry5.ioc.internal.util.Defense;
@@ -26,6 +27,7 @@
 import org.apache.tapestry5.runtime.RenderCommand;
 import org.apache.tapestry5.services.PartialMarkupRenderer;
 import org.apache.tapestry5.services.PartialMarkupRendererFilter;
+import org.slf4j.Logger;
 
 /**
  * This services keeps track of the page being rendered and the root command 
for the partial render, it is therefore
@@ -35,6 +37,8 @@
 @Scope(PERTHREAD_SCOPE)
 public class PageRenderQueueImpl implements PageRenderQueue
 {
+    private final LoggerSource loggerSource;
+
     private Page page;
 
     private RenderCommand rootCommand;
@@ -59,6 +63,11 @@
         }
     }
 
+    public PageRenderQueueImpl(LoggerSource loggerSource)
+    {
+        this.loggerSource = loggerSource;
+    }
+
     public void initializeForCompletePage(Page page)
     {
         this.page = page;
@@ -99,7 +108,11 @@
 
     public void render(MarkupWriter writer)
     {
-        RenderQueueImpl queue = new RenderQueueImpl(page.getLogger());
+        String name = "tapestry.render." + page.getLogger().getName();
+
+        Logger logger = loggerSource.getLogger(name);
+
+        RenderQueueImpl queue = new RenderQueueImpl(logger);
 
         queue.push(rootCommand);
 

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElement.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElement.java?rev=708630&r1=708629&r2=708630&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElement.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElement.java
 Tue Oct 28 11:43:23 2008
@@ -26,6 +26,7 @@
 import org.apache.tapestry5.runtime.ComponentEvent;
 import org.apache.tapestry5.runtime.PageLifecycleListener;
 import org.apache.tapestry5.runtime.RenderQueue;
+import org.slf4j.Logger;
 
 /**
  * Extended version of [EMAIL PROTECTED] 
org.apache.tapestry5.internal.structure.PageElement} for elements that are, in 
fact,
@@ -136,4 +137,9 @@
      * @return the new component
      */
     ComponentPageElement newChild(String id, String elementName, Instantiator 
instantiator, Location location);
+
+    /**
+     * Returns a logger used to for logging event dispatch and event method 
invocation.
+     */
+    Logger getEventLogger();
 }

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java?rev=708630&r1=708629&r2=708630&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java
 Tue Oct 28 11:43:23 2008
@@ -878,7 +878,8 @@
 
     public boolean dispatchEvent(ComponentEvent event)
     {
-        if (components == null) return 
coreComponent.dispatchComponentEvent(event);
+        if (components == null)
+            return coreComponent.dispatchComponentEvent(event);
 
         // Otherwise, iterate over mixins + core component
 
@@ -1039,7 +1040,7 @@
         {
             try
             {
-                Logger logger = component.getLogger();
+                Logger logger = component.getEventLogger();
 
                 ComponentEvent event = new 
ComponentEventImpl(currentEventType, componentId, currentContext, wrapped,
                                                               pageResources, 
logger);
@@ -1202,4 +1203,9 @@
     {
         return coreResources.getInformalParameterBindings();
     }
+
+    public Logger getEventLogger()
+    {
+        return pageResources.getEventLogger(logger);
+    }
 }

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/PageResources.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/PageResources.java?rev=708630&r1=708629&r2=708630&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/PageResources.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/PageResources.java
 Tue Oct 28 11:43:23 2008
@@ -17,6 +17,7 @@
 import org.apache.tapestry5.ioc.Messages;
 import org.apache.tapestry5.model.ComponentModel;
 import org.apache.tapestry5.services.ContextValueEncoder;
+import org.slf4j.Logger;
 
 /**
  * Provides access to common methods of various services, needed by 
implementations of [EMAIL PROTECTED] ComponentPageElement} and
@@ -58,4 +59,13 @@
      * @see org.apache.tapestry5.internal.services.ComponentClassCache
      */
     Class toClass(String className);
+
+    /**
+     * Returns the event logger for the provided component logger.  The event 
logger is based on the component logger's
+     * name (which matches the component class name) with a 
"tapestry..events." prefix.
+     *
+     * @param componentLogger provides base name for logger
+     * @return the logger
+     */
+    Logger getEventLogger(Logger componentLogger);
 }

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/PageResourcesImpl.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/PageResourcesImpl.java?rev=708630&r1=708629&r2=708630&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/PageResourcesImpl.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/PageResourcesImpl.java
 Tue Oct 28 11:43:23 2008
@@ -16,10 +16,12 @@
 
 import org.apache.tapestry5.internal.services.ComponentClassCache;
 import org.apache.tapestry5.internal.services.ComponentMessagesSource;
+import org.apache.tapestry5.ioc.LoggerSource;
 import org.apache.tapestry5.ioc.Messages;
 import org.apache.tapestry5.ioc.services.TypeCoercer;
 import org.apache.tapestry5.model.ComponentModel;
 import org.apache.tapestry5.services.ContextValueEncoder;
+import org.slf4j.Logger;
 
 import java.util.Locale;
 
@@ -35,14 +37,18 @@
 
     private final ContextValueEncoder contextValueEncoder;
 
+    private final LoggerSource loggerSource;
+
     public PageResourcesImpl(Locale locale, ComponentMessagesSource 
componentMessagesSource, TypeCoercer typeCoercer,
-                             ComponentClassCache componentClassCache, 
ContextValueEncoder contextValueEncoder)
+                             ComponentClassCache componentClassCache, 
ContextValueEncoder contextValueEncoder,
+                             LoggerSource loggerSource)
     {
         this.componentMessagesSource = componentMessagesSource;
         this.locale = locale;
         this.typeCoercer = typeCoercer;
         this.componentClassCache = componentClassCache;
         this.contextValueEncoder = contextValueEncoder;
+        this.loggerSource = loggerSource;
     }
 
     public Messages getMessages(ComponentModel componentModel)
@@ -60,6 +66,13 @@
         return componentClassCache.forName(className);
     }
 
+    public Logger getEventLogger(Logger componentLogger)
+    {
+        String name = "tapestry.events." + componentLogger.getName();
+
+        return loggerSource.getLogger(name);
+    }
+
     public String toClient(Object value)
     {
         return contextValueEncoder.toClient(value);

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/PageResourcesSourceImpl.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/PageResourcesSourceImpl.java?rev=708630&r1=708629&r2=708630&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/PageResourcesSourceImpl.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/PageResourcesSourceImpl.java
 Tue Oct 28 11:43:23 2008
@@ -16,6 +16,7 @@
 
 import org.apache.tapestry5.internal.services.ComponentClassCache;
 import org.apache.tapestry5.internal.services.ComponentMessagesSource;
+import org.apache.tapestry5.ioc.LoggerSource;
 import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
 import org.apache.tapestry5.ioc.internal.util.Defense;
 import org.apache.tapestry5.ioc.services.TypeCoercer;
@@ -36,13 +37,17 @@
 
     private final ContextValueEncoder contextValueEncoder;
 
+    private final LoggerSource loggerSource;
+
     public PageResourcesSourceImpl(ComponentMessagesSource 
componentMessagesSource, TypeCoercer typeCoercer,
-                                   ComponentClassCache componentClassCache, 
ContextValueEncoder contextValueEncoder)
+                                   ComponentClassCache componentClassCache, 
ContextValueEncoder contextValueEncoder,
+                                   LoggerSource loggerSource)
     {
         this.componentMessagesSource = componentMessagesSource;
         this.typeCoercer = typeCoercer;
         this.componentClassCache = componentClassCache;
         this.contextValueEncoder = contextValueEncoder;
+        this.loggerSource = loggerSource;
     }
 
     public PageResources get(Locale locale)
@@ -54,7 +59,7 @@
         if (result == null)
         {
             result = new PageResourcesImpl(locale, componentMessagesSource, 
typeCoercer, componentClassCache,
-                                           contextValueEncoder);
+                                           contextValueEncoder, loggerSource);
 
             // Small race condition here, where we may create two instances of 
PRI for the same locale,
             // but that's not worth worrying about.


Reply via email to