[jboss-cvs] jboss-seam/src/main/org/jboss/seam ...

Gavin King gavin.king at jboss.com
Wed Feb 7 17:23:43 EST 2007


  User: gavin   
  Date: 07/02/07 17:23:43

  Modified:    src/main/org/jboss/seam  Component.java
  Log:
  allow multiple logs
  
  Revision  Changes    Path
  1.231     +5 -5      jboss-seam/src/main/org/jboss/seam/Component.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Component.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/Component.java,v
  retrieving revision 1.230
  retrieving revision 1.231
  diff -u -b -r1.230 -r1.231
  --- Component.java	5 Feb 2007 05:05:26 -0000	1.230
  +++ Component.java	7 Feb 2007 22:23:43 -0000	1.231
  @@ -124,7 +124,7 @@
    *
    * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
    * @author Gavin King
  - * @version $Revision: 1.230 $
  + * @version $Revision: 1.231 $
    */
   @Scope(ScopeType.APPLICATION)
   @SuppressWarnings("deprecation")
  @@ -172,7 +172,7 @@
      private Map<String, Field> dataModelSelectionFields = new HashMap<String, Field>();
      private Map<Field, Annotation> dataModelSelectionFieldAnnotations = new HashMap<Field, Annotation>();
   
  -   private Field logField;
  +   private List<Field> logFields = new ArrayList<Field>();
      private org.jboss.seam.log.Log logInstance;
   
      private Hashtable<Locale, ClassValidator> validators = new Hashtable<Locale, ClassValidator>();
  @@ -578,7 +578,7 @@
               }
               if ( field.isAnnotationPresent(org.jboss.seam.annotations.Logger.class) )
               {
  -               logField=field;
  +               logFields.add(field);
                  String category = field.getAnnotation(org.jboss.seam.annotations.Logger.class).value();
                  if ( "".equals( category ) )
                  {
  @@ -591,7 +591,7 @@
                  if ( Modifier.isStatic( field.getModifiers() ) )
                  {
                     Reflections.setAndWrap(field, null, logInstance);
  -                  logField = null;
  +                  logFields = null;
                  }
               }
               for ( Annotation ann: field.getAnnotations() )
  @@ -1167,7 +1167,7 @@
   
      private void injectLog(Object bean)
      {
  -      if (logField!=null)
  +      for (Field logField: logFields)
         {
            setFieldValue(bean, logField, "log", logInstance);
         }
  
  
  



More information about the jboss-cvs-commits mailing list