]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Create a class-specific logger for each LayoutManager which uses a logger.
authorSimon Pepping <spepping@apache.org>
Thu, 5 Oct 2006 18:44:15 +0000 (18:44 +0000)
committerSimon Pepping <spepping@apache.org>
Thu, 5 Oct 2006 18:44:15 +0000 (18:44 +0000)
This includes the patch of bug 40667.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@453310 13f79535-47bb-0310-9956-ffa450edef68

19 files changed:
src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java
src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java
src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java
src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java
src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java
src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java
src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java
src/java/org/apache/fop/layoutmgr/inline/FootnoteLayoutManager.java
src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java
src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java
src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java
src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java

index 58e301c3f4f31407a987229667cb62544965ce8a..da566ed9148095093a9fdbd6d5d52bd63df8a206 100644 (file)
@@ -44,7 +44,7 @@ public abstract class AbstractBaseLayoutManager
     /**
      * logging instance
      */
-    protected static Log log = LogFactory.getLog(LayoutManager.class);
+    private static Log log = LogFactory.getLog(AbstractBaseLayoutManager.class);
 
     /**
      * Abstract base layout manager.
index fbacba12d56c8798f020f45523a33318fe3c2d78..8c7ac1cad70dc858b4b64c089bb0011d20fad2e4 100644 (file)
@@ -19,6 +19,8 @@
 
 package org.apache.fop.layoutmgr;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.fop.fo.FObj;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.area.Area;
@@ -38,6 +40,11 @@ import java.util.Map;
 public abstract class AbstractLayoutManager extends AbstractBaseLayoutManager 
     implements Constants {
 
+    /**
+     * logging instance
+     */
+    private static Log log = LogFactory.getLog(AbstractLayoutManager.class);
+
     /** Parent LayoutManager for this LayoutManager */
     protected LayoutManager parentLM = null;
     /** List of child LayoutManagers */
index 127db160b026f917058fd6ccf56abc4ca9440ebe..e99b966ef13b488590a3cd465b1054e0382b5800 100644 (file)
@@ -25,6 +25,8 @@ import java.util.ListIterator;
 import java.awt.Point;
 import java.awt.geom.Rectangle2D;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.fop.area.Area;
 import org.apache.fop.area.BlockViewport;
 import org.apache.fop.area.Block;
@@ -43,6 +45,11 @@ import org.apache.fop.traits.SpaceVal;
  */
 public class BlockContainerLayoutManager extends BlockStackingLayoutManager 
                 implements ConditionalElementListener {
+
+    /**
+     * logging instance
+     */
+    private static Log log = LogFactory.getLog(BlockContainerLayoutManager.class);
     
     private BlockViewport viewportBlockArea;
     private Block referenceArea;
index 623c94c04c9fdfc4908a240acd98f0da889795f4..cf1cd4e4d81a76185527277894e3e68455fd0b0a 100644 (file)
@@ -23,6 +23,8 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.ListIterator;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.fop.area.Area;
 import org.apache.fop.area.Block;
 import org.apache.fop.area.LineArea;
@@ -39,6 +41,11 @@ import org.apache.fop.traits.SpaceVal;
  */
 public class BlockLayoutManager extends BlockStackingLayoutManager 
             implements ConditionalElementListener {
+
+    /**
+     * logging instance
+     */
+    private static Log log = LogFactory.getLog(BlockLayoutManager.class);
     
     private Block curBlockArea;
 
index ea8f808ac4c7c1ebda36e45c3a9612e09431f157..7b81ad47846bc15dabf3027abfcf6d925a845cb2 100644 (file)
@@ -24,6 +24,8 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.ListIterator;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.fop.area.Area;
 import org.apache.fop.area.BlockParent;
 import org.apache.fop.area.Block;
@@ -40,6 +42,12 @@ import org.apache.fop.traits.MinOptMax;
  */
 public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
                                                  implements BlockLevelLayoutManager {
+
+    /**
+     * logging instance
+     */
+    private static Log log = LogFactory.getLog(BlockStackingLayoutManager.class);
+
     /**
      * Reference to FO whose areas it's managing or to the traits
      * of the FO.
index 5720e3095dff33573caa17112d5b2737e0a53acd..baa0013c324b3617f1a685a6cc38d3abab9d21e5 100644 (file)
@@ -42,10 +42,7 @@ import org.apache.fop.fo.FONode;
 public abstract class BreakingAlgorithm {
 
     /** the logger for the class */
-    protected static Log classLog = LogFactory.getLog(BreakingAlgorithm.class);
-    
-    /** the logger for the instance */
-    protected Log log = classLog;
+    protected static Log log = LogFactory.getLog(BreakingAlgorithm.class);
     
     /** Maximum adjustment ration */
     protected static final int INFINITE_RATIO = 1000;
index 96d564b7d5e6b4b1175f8b0f94c97873c3724925..8314238380681872a197db03a63431818a633b6d 100644 (file)
@@ -19,6 +19,8 @@
 
 package org.apache.fop.layoutmgr;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.fop.fo.pagination.Flow;
 import org.apache.fop.layoutmgr.inline.InlineLevelLayoutManager;
 import org.apache.fop.area.Area;
@@ -37,6 +39,11 @@ import java.util.ListIterator;
  */
 public class FlowLayoutManager extends BlockStackingLayoutManager
                                implements BlockLevelLayoutManager {
+
+    /**
+     * logging instance
+     */
+    private static Log log = LogFactory.getLog(FlowLayoutManager.class);
     
     /** Array of areas currently being filled stored by area class */
     private BlockParent[] currentAreas = new BlockParent[Area.CLASS_MAX];
index cb28223d04b5e7caf29fbddca9779e0b9bad3a83..cf12dffb99aa5159ed13da3d2df297f936407096 100644 (file)
@@ -35,7 +35,7 @@ import org.apache.fop.traits.MinOptMax;
 class PageBreakingAlgorithm extends BreakingAlgorithm {
 
     /** the logger for the class */
-    protected static Log classLog = LogFactory.getLog(PageBreakingAlgorithm.class);
+    private static Log log = LogFactory.getLog(PageBreakingAlgorithm.class);
 
     private LayoutManager topLevelLM;
     private PageSequenceLayoutManager.PageProvider pageProvider;
@@ -101,7 +101,6 @@ class PageBreakingAlgorithm extends BreakingAlgorithm {
                                  boolean partOverflowRecovery, boolean autoHeight,
                                  boolean favorSinglePart) {
         super(alignment, alignmentLast, true, partOverflowRecovery, 0);
-        this.log = classLog;
         this.topLevelLM = topLevelLM;
         this.pageProvider = pageProvider;
         this.layoutListener = layoutListener;
index e7ccc2b712bd12e4f6545c3642fb2729f88efca3..00bba8ae2e93405f8e092f64ad5a34c8446d33b6 100644 (file)
@@ -23,6 +23,8 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.ListIterator;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.fop.area.RegionReference;
 import org.apache.fop.area.Area;
 import org.apache.fop.area.Block;
@@ -42,6 +44,11 @@ import org.apache.fop.traits.MinOptMax;
  */
 public class StaticContentLayoutManager extends BlockStackingLayoutManager {
 
+    /**
+     * logging instance
+     */
+    private static Log log = LogFactory.getLog(StaticContentLayoutManager.class);
+
     private RegionReference targetRegion;
     private Block targetBlock;
     private SideRegion regionFO;
index 277e919e2df61548f4ea9bdbb8c80d6a93c98c26..22796c8bc40cef96e38b02479514eb4f308cb0a5 100644 (file)
@@ -19,6 +19,8 @@
 
 package org.apache.fop.layoutmgr.inline;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.fo.Constants;
 import org.apache.fop.fo.pagination.Title;
@@ -52,6 +54,12 @@ import org.apache.fop.area.Block;
  */
 public class ContentLayoutManager extends AbstractBaseLayoutManager
         implements InlineLevelLayoutManager {
+
+    /**
+     * logging instance
+     */
+    private static Log log = LogFactory.getLog(ContentLayoutManager.class);
+
     private FOUserAgent userAgent;
     private Area holder;
     private int stackSize;
index c936a3729117f6abc2cb75ca396a028753c9293c..91b7270ebe7ad4d39723bfe7558403d6ef8eeb90 100644 (file)
@@ -23,6 +23,8 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.ListIterator;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.fop.fo.flow.Footnote;
 import org.apache.fop.layoutmgr.AbstractLayoutManager;
 import org.apache.fop.layoutmgr.FootnoteBodyLayoutManager;
@@ -38,6 +40,11 @@ import org.apache.fop.layoutmgr.Position;
 public class FootnoteLayoutManager extends AbstractLayoutManager 
                                    implements InlineLevelLayoutManager {
 
+    /**
+     * logging instance
+     */
+    private static Log log = LogFactory.getLog(FootnoteLayoutManager.class);
+
     private Footnote footnote;
     private InlineStackingLayoutManager citationLM;
     private FootnoteBodyLayoutManager bodyLM;
index d3d5868f248728999f6f01e67eaf9c99d43ca962..ea6d1ceffeeec3c5d027abdf74c9b9c96d326eb7 100755 (executable)
@@ -23,6 +23,8 @@ import java.util.ListIterator;
 import java.util.LinkedList;
 import java.util.List;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.fop.area.Area;
 import org.apache.fop.area.inline.InlineArea;
 import org.apache.fop.area.inline.InlineBlockParent;
@@ -56,6 +58,12 @@ import org.apache.fop.traits.SpaceVal;
  * such as Inline or Line
  */
 public class InlineLayoutManager extends InlineStackingLayoutManager {
+
+    /**
+     * logging instance
+     */
+    private static Log log = LogFactory.getLog(InlineLayoutManager.class);
+
     private InlineLevel fobj;
 
     private CommonMarginInline inlineProps = null;
index 74eeef2e5ce408b73a818310611c007748941f37..20f8a05710c3511eda403919864a76b3d21de76a 100644 (file)
@@ -22,6 +22,8 @@ package org.apache.fop.layoutmgr.inline;
 import java.util.LinkedList;
 import java.util.List;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.fop.area.Area;
 import org.apache.fop.area.inline.InlineArea;
 import org.apache.fop.fo.FObj;
@@ -48,6 +50,12 @@ import org.apache.fop.traits.MinOptMax;
  */
 public abstract class LeafNodeLayoutManager extends AbstractLayoutManager 
                                    implements InlineLevelLayoutManager {
+
+    /**
+     * logging instance
+     */
+    private static Log log = LogFactory.getLog(LeafNodeLayoutManager.class);
+
     /**
      * The inline area that this leafnode will add.
      */
index e7571fda0cfc55ae2cc5f92c442d271a5ac3978d..f1dba6d938adbb0b329012696a895636aa9516e1 100644 (file)
@@ -19,6 +19,8 @@
 
 package org.apache.fop.layoutmgr.inline;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.fop.datatypes.Length;
 import org.apache.fop.datatypes.Numeric;
 import org.apache.fop.fo.Constants;
@@ -74,6 +76,11 @@ import org.apache.fop.traits.MinOptMax;
 public class LineLayoutManager extends InlineStackingLayoutManager 
                                implements BlockLevelLayoutManager {
 
+    /**
+     * logging instance
+     */
+    private static Log log = LogFactory.getLog(LineLayoutManager.class);
+
     private Block fobj;
     private boolean isFirstInBlock;
     
index 35a298db3755c8d7d797076e3d90595f4394caa4..bfacc777bcce1ff5c3d6a502e635df52a19467d1 100644 (file)
@@ -24,6 +24,8 @@ import java.util.List;
 import java.util.LinkedList;
 import java.util.ListIterator;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.fop.area.Trait;
 import org.apache.fop.area.inline.TextArea;
 import org.apache.fop.fo.Constants;
@@ -101,6 +103,11 @@ public class TextLayoutManager extends LeafNodeLayoutManager {
         }
     }
 
+    /**
+     * logging instance
+     */
+    private static Log log = LogFactory.getLog(TextLayoutManager.class);
+
     // Hold all possible breaks for the text in this LM's FO.
     private ArrayList vecAreaInfo;
 
index 67e6096622f98558435e442791fcd8e0899ff251..b830f84dee9465ca149c534969b4042e70df8534 100644 (file)
@@ -19,6 +19,8 @@
  
 package org.apache.fop.layoutmgr.list;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.fop.fo.flow.ListBlock;
 import org.apache.fop.layoutmgr.BlockLevelLayoutManager;
 import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
@@ -48,6 +50,11 @@ import java.util.List;
 public class ListBlockLayoutManager extends BlockStackingLayoutManager 
                 implements ConditionalElementListener {
 
+    /**
+     * logging instance
+     */
+    private static Log log = LogFactory.getLog(ListBlockLayoutManager.class);
+
     private Block curBlockArea;
 
     private boolean discardBorderBefore;
index 336d34f30b04ec553293679f9c992b3ff6f2d43b..ffe356fe96758330488ce393bd78695a6092def5 100644 (file)
@@ -19,6 +19,8 @@
 
 package org.apache.fop.layoutmgr.list;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.fop.fo.flow.ListItem;
 import org.apache.fop.fo.flow.ListItemBody;
 import org.apache.fop.fo.flow.ListItemLabel;
@@ -56,6 +58,12 @@ import java.util.ListIterator;
  */
 public class ListItemLayoutManager extends BlockStackingLayoutManager 
                     implements ConditionalElementListener {
+
+    /**
+     * logging instance
+     */
+    private static Log log = LogFactory.getLog(ListItemLayoutManager.class);
+
     private ListItemContentLayoutManager label;
     private ListItemContentLayoutManager body;
 
index 440a2a75eb38e73b3a54c49c6fefe753684deeed..8172edb50fac584f8a79ede00c4417fbad7d3a94 100644 (file)
@@ -21,6 +21,8 @@ package org.apache.fop.layoutmgr.table;
 
 import java.util.LinkedList;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.flow.Table;
 import org.apache.fop.fo.flow.TableCell;
@@ -48,6 +50,11 @@ import org.apache.fop.traits.MinOptMax;
  */
 public class TableCellLayoutManager extends BlockStackingLayoutManager 
             implements BlockLevelLayoutManager {
+
+    /**
+     * logging instance
+     */
+    private static Log log = LogFactory.getLog(TableCellLayoutManager.class);
     
     private PrimaryGridUnit gridUnit;
     
index 1df3f5b73e50a68578a46cfdb599d8f723970690..886af6a2c27cdb1f67ee4141a17b88cfd34d71d9 100644 (file)
@@ -19,6 +19,8 @@
 
 package org.apache.fop.layoutmgr.table;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.fop.datatypes.Length;
 import org.apache.fop.fo.flow.Table;
 import org.apache.fop.fo.flow.TableFObj;
@@ -56,6 +58,11 @@ import org.apache.fop.fo.FObj;
  */
 public class TableLayoutManager extends BlockStackingLayoutManager 
                 implements ConditionalElementListener {
+
+    /**
+     * logging instance
+     */
+    private static Log log = LogFactory.getLog(TableLayoutManager.class);
     
     private TableContentLayoutManager contentLM; 
     private ColumnSetup columns = null;