Hi Berin,
two patches attached:
1. impl/handler/ComponentFactory.java:
support logger attribute of components, use id as default
2. util/ContextManager.java:
fully defined logger manager hierarchy
Since attachments worked not very vell lately in the list,
here additionally as text. Shall I add them to BugZilla, too?
Regards,
J�rg
--- ComponentFactory.java 2003-04-02 17:54:29.000000000 +0200
+++ ComponentFactory.new 2003-04-02 17:51:26.000000000 +0200
@@ -131,7 +131,9 @@
m_configuration = configuration;
m_serviceManager = serviceManager;
m_context = new DefaultContext( context );
- ( (DefaultContext)m_context ).put( "component.name",
configuration.getAttribute( "id", componentClass.getName() ) );
+ final String name = configuration.getAttribute( "id",
componentClass.getName() );
+ ( (DefaultContext)m_context ).put( "component.name", name );
+ ( (DefaultContext)m_context ).put( "component.logger",
configuration.getAttribute( "logger", name ) );
( (DefaultContext)m_context ).makeReadOnly();
m_loggerManager = loggerManager;
m_extManager = extManager;
@@ -206,7 +208,7 @@
try
{
- final String name = (String)m_context.get("component.name");
+ final String name = (String)m_context.get("component.logger");
if( getLogger().isDebugEnabled() )
{
final String message = "logger name is " + name;
--- ContextManager.java 2003-03-29 19:53:24.000000000 +0100
+++ ContextManager.new 2003-04-02 17:52:59.000000000 +0200
@@ -720,8 +720,8 @@
}
// Resolve a name for the logger, taking the logPrefix into account
- String lmDefaultLoggerName = "";
- String lmLoggerName = loggerManagerConfig.getAttribute( "logger",
"system.logkit" );
+ String lmDefaultLoggerName = (String)m_rootContext.get(
ContextManagerConstants.LOG_CATEGORY );
+ String lmLoggerName = loggerManagerConfig.getAttribute( "logger",
lmDefaultLoggerName + ".system.logkit" );
// Create the default logger for the Logger Manager.
org.apache.log.Logger lmDefaultLogger =
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]