avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: jakarta-avalon-logkit/src/java/org/apache/log Logger.java Hierarchy.java ContextMap.java
Date Wed, 05 Feb 2003 08:28:33 GMT
mcconnell    2003/02/05 00:28:33

  Modified:    src/java/org/apache/log Logger.java Hierarchy.java
                        ContextMap.java
  Log:
  Checkstyle corrections and javadoc additions.
  
  Revision  Changes    Path
  1.36      +10 -1     jakarta-avalon-logkit/src/java/org/apache/log/Logger.java
  
  Index: Logger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/Logger.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- Logger.java	5 Feb 2003 06:15:13 -0000	1.35
  +++ Logger.java	5 Feb 2003 08:28:32 -0000	1.36
  @@ -334,7 +334,7 @@
   
       /**
        * Determine if messages of priority  will be logged.
  -     *
  +     * @param priority the priority
        * @return true if messages will be logged
        */
       public final boolean isPriorityEnabled( final Priority priority )
  @@ -455,6 +455,7 @@
        * Unset the logtargets for this logger and all child loggers if recursive is set.
        * The loggers unset (and all child loggers who don't specify logtargets) will
        * inherit from the parents LogTargets.
  +     * @param recursive the recursion policy
        */
       public synchronized void unsetLogTargets( final boolean recursive )
       {
  @@ -714,7 +715,9 @@
       private synchronized void resetChildPriorities( final boolean recursive )
       {
           if( null == m_children )
  +        {
               return;
  +        }
   
           final Logger[] children = m_children;
   
  @@ -757,9 +760,13 @@
           if( null == m_logTargets )
           {
               if( null == m_parent )
  +            {
                   return new LogTarget[ 0 ];
  +            }
               else
  +            {
                   return m_parent.safeGetLogTargets();
  +            }
           }
           else
           {
  @@ -779,7 +786,9 @@
       private synchronized void resetChildLogTargets( final boolean recursive )
       {
           if( null == m_children )
  +        {
               return;
  +        }
   
           for( int i = 0; i < m_children.length; i++ )
           {
  
  
  
  1.22      +2 -2      jakarta-avalon-logkit/src/java/org/apache/log/Hierarchy.java
  
  Index: Hierarchy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/Hierarchy.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- Hierarchy.java	5 Feb 2003 06:15:14 -0000	1.21
  +++ Hierarchy.java	5 Feb 2003 08:28:32 -0000	1.22
  @@ -74,7 +74,7 @@
           + "%{message}\n%{throwable}";
   
       ///The instance of default hierarchy
  -    private static final Hierarchy c_hierarchy = new Hierarchy();
  +    private static final Hierarchy HIERARCHY = new Hierarchy();
   
       ///Error Handler associated with hierarchy
       private ErrorHandler m_errorHandler;
  @@ -98,7 +98,7 @@
        */
       public static Hierarchy getDefaultHierarchy()
       {
  -        return c_hierarchy;
  +        return HIERARCHY;
       }
   
       /**
  
  
  
  1.13      +4 -4      jakarta-avalon-logkit/src/java/org/apache/log/ContextMap.java
  
  Index: ContextMap.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/ContextMap.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ContextMap.java	5 Feb 2003 06:15:14 -0000	1.12
  +++ ContextMap.java	5 Feb 2003 08:28:33 -0000	1.13
  @@ -81,7 +81,7 @@
       implements Serializable
   {
       ///Thread local for holding instance of map associated with current thread
  -    private static final ThreadLocal c_context = new InheritableThreadLocal();
  +    private static final ThreadLocal LOCAL_CONTEXT = new InheritableThreadLocal();
   
       private final ContextMap m_parent;
   
  @@ -116,12 +116,12 @@
       public static final ContextMap getCurrentContext( final boolean autocreate )
       {
           //Check security permission here???
  -        ContextMap context = (ContextMap)c_context.get();
  +        ContextMap context = (ContextMap)LOCAL_CONTEXT.get();
   
           if( null == context && autocreate )
           {
               context = new ContextMap();
  -            c_context.set( context );
  +            LOCAL_CONTEXT.set( context );
           }
   
           return context;
  @@ -135,7 +135,7 @@
       public static final void bind( final ContextMap context )
       {
           //Check security permission here??
  -        c_context.set( context );
  +        LOCAL_CONTEXT.set( context );
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-cvs-help@jakarta.apache.org


Mime
View raw message