avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@codehaus.org
Subject [jira] Commented: (PNIX-9) Extract logging from environment.xml
Date Sun, 20 Apr 2003 08:34:09 GMT
The following comment has been added to this issue:

     Author: Peter Donald
    Created: Sun, 20 Apr 2003 3:32 AM
       Body:
I think we need to rework the Logger system in a more complete way. What I would like to see
is something like

interface LoggerStore
{
  //Null passed in gets root logger
  void getLogger( String name );

  //Shutdown the set of loggers
  void close();
}

interface LoggerStoreFactory
{
  LoggerStore createLoggerStore( Map params );
}

class LogkitLoggerStoreFactory
{
   public static final String XML =
                           Element.class.getName();

   LoggerStore createLoggerStore( Map params )
   {
     Element element = (Element)params.get( XML );
     if( null != element )
     {
        return createLoggerStoreWithXML( element );
     }
     else
     {
       throw new IllegalStateException( "missing config vars );
     }
   }
}

class Log4JLoggerStoreFactory
{
   public static final String XML =
                           Element.class.getName();
   public static final String PROPERTIES =
                           Properties.class.getName();

   LoggerStore createLoggerStore( Map params )
   {
     Properties properties = (Properties)params.get( PROPERTIES );
     if( null != properties )
     {
        return createLoggerStoreWithProps( properties );
     }

     Element element = (Element)params.get( XML );
     if( null != element )
     {
        return createLoggerStoreWithXML( element );
     }
     else
     {
       throw new IllegalStateException( "missing config vars );
     }
   }
}

then we search through the different possible log files in order. As soon as we find a log
file we use that and the associated LoggerStoreFactory to create logger.

Does that make sense?
---------------------------------------------------------------------
View the issue:

  http://jira.codehaus.org/secure/ViewIssue.jspa?key=PNIX-9


Here is an overview of the issue:
---------------------------------------------------------------------
        Key: PNIX-9
    Summary: Extract logging from environment.xml
       Type: New Feature

     Status: Assigned
   Priority: Major

 Time Spent: Unknown
   Estimate: 0 minutes

    Project: phoenix
 Components: 
             Log Manager
   Fix Fors:
             4.1
   Versions:
             4.1

   Assignee: Peter Donald
   Reporter: Peter Donald

    Created: Sat, 22 Mar 2003 12:17 AM
    Updated: Sat, 22 Mar 2003 12:17 AM

Description:
It has been suggested that we should extract logging definition from environment.xml and place
it in a new file 
 
SAR-INF/log.xml 
 
This has been suggested because it mimics behaviour in other containers and logging can not
really be considered to be part of the "environment" of an application.




---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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


Mime
View raw message