Save This Page
Home » tapestry-src-5.0.19 » org.apache.tapestry5 » [javadoc | source]
    1   //  Copyright 2008 The Apache Software Foundation
    2   //
    3   // Licensed under the Apache License, Version 2.0 (the "License");
    4   // you may not use this file except in compliance with the License.
    5   // You may obtain a copy of the License at
    6   //
    7   //     http://www.apache.org/licenses/LICENSE-2.0
    8   //
    9   // Unless required by applicable law or agreed to in writing, software
   10   // distributed under the License is distributed on an "AS IS" BASIS,
   11   // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   12   // See the License for the specific language governing permissions and
   13   // limitations under the License.
   14   
   15   package org.apache.tapestry5;
   16   
   17   import org.slf4j.Marker;
   18   import org.slf4j.MarkerFactory;
   19   
   20   import java.util.Arrays;
   21   
   22   /**
   23    * A set of markers used internally by Tapestry when logging in code related to paqes and components. Most logging
   24    * toolkits, including Log4J, do not incorporate markers, but  <a href="http://logback.qos.ch/">LOGBack</a> does.
   25    */
   26   public class TapestryMarkers
   27   {
   28       /**
   29        * A root marker for all things Tapestry related. The remaining markers are children of the TAPESTRY marker.
   30        */
   31       public static final Marker TAPESTRY = MarkerFactory.getMarker("TAPESTRY");
   32   
   33       /**
   34        * Logs the final version of the class transformation. This is useful when debugging {@link
   35        * org.apache.tapestry5.services.ComponentClassTransformWorker}s, as it shows exactly what transformation operations
   36        * occured, at the Java code level.
   37        */
   38       public static final Marker CLASS_TRANSFORMATION = MarkerFactory.getMarker("CLASS_TRANSFORMATION");
   39   
   40       /**
   41        * Marker for a debug log that occurs just before invocation of a event handler method.
   42        */
   43       public static final Marker EVENT_HANDLER_METHOD = MarkerFactory.getMarker("EVENT_HANDLER_METHOD");
   44   
   45       /**
   46        * Marker for logging related to component event dispatch.
   47        */
   48       public static final Marker EVENT_DISPATCH = MarkerFactory.getMarker("EVENT_DISPATCH");
   49   
   50       /**
   51        * Marker for logging, at trace level verbose details about each individual {@link
   52        * org.apache.tapestry5.runtime.RenderCommand} involved in rendering the page, as well as a final (debug level)
   53        * summary of command count and elapsed time.
   54        */
   55   
   56       public static final Marker RENDER_COMMANDS = MarkerFactory.getMarker("RENDER_COMMANDS");
   57   
   58       static
   59       {
   60           for (Marker child : Arrays.asList(CLASS_TRANSFORMATION, EVENT_HANDLER_METHOD, EVENT_DISPATCH, RENDER_COMMANDS))
   61           {
   62               TAPESTRY.add(child);
   63           }
   64       }
   65   }

Save This Page
Home » tapestry-src-5.0.19 » org.apache.tapestry5 » [javadoc | source]