avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/logger DefaultLogManager.java Resources.properties
Date Tue, 20 Nov 2001 11:12:58 GMT
donaldp     01/11/20 03:12:58

  Modified:    src/java/org/apache/avalon/phoenix/components/logger
                        DefaultLogManager.java Resources.properties
  Log:
  Add some more logging when creating log hierarchies.
  
  Revision  Changes    Path
  1.9       +13 -0     jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/logger/DefaultLogManager.java
  
  Index: DefaultLogManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/logger/DefaultLogManager.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DefaultLogManager.java	2001/11/19 12:21:30	1.8
  +++ DefaultLogManager.java	2001/11/20 11:12:58	1.9
  @@ -15,6 +15,8 @@
   import org.apache.avalon.phoenix.interfaces.LogManager;
   import org.apache.avalon.phoenix.metadata.SarMetaData;
   import org.apache.log.Hierarchy;
  +import org.apache.avalon.excalibur.i18n.ResourceManager;
  +import org.apache.avalon.excalibur.i18n.Resources;
   
   /**
    * Interface that is used to manage Log objects for a Sar.
  @@ -25,6 +27,9 @@
       extends AbstractLogEnabled
       implements LogManager
   {
  +    private static final Resources REZ =
  +        ResourceManager.getPackageResources( SimpleLogKitManager.class );
  +
       public Hierarchy createHierarchy( final SarMetaData metaData,
                                         final Configuration logs )
           throws Exception
  @@ -34,6 +39,14 @@
           context.put( BlockContext.APP_HOME_DIR, metaData.getHomeDirectory() );
   
           final String version = logs.getAttribute( "version", "1.0" );
  +
  +        if( getLogger().isDebugEnabled() )
  +        {
  +            final String message =
  +                REZ.getString( "logger-create", metaData.getName(), version );
  +            getLogger().debug( message );
  +        }
  +
           if( version.equals( "1.0" ) )
           {
               final SimpleLogKitManager manager = new SimpleLogKitManager();
  
  
  
  1.3       +2 -0      jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/logger/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/logger/Resources.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Resources.properties	2001/11/09 21:14:30	1.2
  +++ Resources.properties	2001/11/20 11:12:58	1.3
  @@ -1,3 +1,5 @@
   target.nocreate=Error creating LogTarget named "{0}" for file {0}. (Reason: {2}).
   unknown-target=Unable to locate LogTarget named "{0}" for Logger named "{1}".
   unknown-priority=Unknown priority "{0}" for Logger named "{1}".
  +logger-create=Creating log hierarchy for application named "{0}", using log format version
"{1}".
  +category-create=Creating a log category named "{0}" that writes to "{1}" target at priority
"{2}".
  
  
  

--
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