avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/logging DefaultLoggingManager.java
Date Wed, 11 Dec 2002 04:56:15 GMT
mcconnell    2002/12/10 20:56:14

  Modified:    assembly/src/java/org/apache/avalon/assembly/logging
                        DefaultLoggingManager.java
  Log:
  Enhancement to the logging defaults code.
  
  Revision  Changes    Path
  1.3       +12 -11    avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/logging/DefaultLoggingManager.java
  
  Index: DefaultLoggingManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/logging/DefaultLoggingManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultLoggingManager.java	3 Dec 2002 06:57:26 -0000	1.2
  +++ DefaultLoggingManager.java	11 Dec 2002 04:56:14 -0000	1.3
  @@ -86,6 +86,9 @@
       // static
       //===============================================================
   
  +    private static final Resources REZ =
  +        ResourceManager.getPackageResources( DefaultLoggingManager.class );
  +
       /**
        * The default logging priority value.
        */
  @@ -96,12 +99,16 @@
        */
       public static final String DEFAULT_TARGET = "default";
   
  -    private static final Resources REZ =
  -        ResourceManager.getPackageResources( DefaultLoggingManager.class );
  -
       private static final String DEFAULT_FORMAT =
           "[%7.7{priority}] (%{category}): %{message}\\n%{throwable}";
   
  +    /**
  +     * The default fallback log target.
  +     */
  +    private static final StreamTarget DEFAULT_STREAM = 
  +      new StreamTarget( System.out, new AvalonFormatter( DEFAULT_FORMAT ) );
  +
  +
       //===============================================================
       // state
       //===============================================================
  @@ -127,12 +134,6 @@
       private org.apache.avalon.framework.logger.Logger m_logger;
   
       /**
  -     * The default fallback log target.
  -     */
  -    private StreamTarget m_stream = 
  -      new StreamTarget( System.out, new AvalonFormatter( DEFAULT_FORMAT ) );
  -
  -    /**
        * The list of logging targets.
        */
       private final HashMap m_targets = new HashMap();
  @@ -184,8 +185,8 @@
           //
   
           m_logHierarchy = new Hierarchy();
  -        getHierarchy().setDefaultLogTarget( m_stream );
  -        m_targets.put( DEFAULT_TARGET, m_stream );
  +        getHierarchy().setDefaultLogTarget( DEFAULT_STREAM );
  +        m_targets.put( DEFAULT_TARGET, DEFAULT_STREAM );
           if( m_descriptor.getPriority() != null )
           {
               getHierarchy().setDefaultPriority(
  
  
  

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


Mime
View raw message