proyal 2002/07/14 08:17:00
Modified: src/java/org/apache/avalon/phoenix/components/logger
DefaultLogManager.java
Added: src/java/org/apache/avalon/phoenix/components/logger
LogKitHierarchyLogger.java
Log:
Fix v1.1 logging.
Revision Changes Path
1.16 +1 -1
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.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- DefaultLogManager.java 14 Jul 2002 02:27:16 -0000 1.15
+++ DefaultLogManager.java 14 Jul 2002 15:16:59 -0000 1.16
@@ -76,7 +76,7 @@
setupLogger( manager );
manager.contextualize( context );
manager.configure( logs );
- return new LogKitLogger( manager.getHierarchy().getLoggerFor( "" ) );
+ return new LogKitHierarchyLogger( manager.getHierarchy() );
}
else
{
1.1
jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/logger/LogKitHierarchyLogger.java
Index: LogKitHierarchyLogger.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.avalon.phoenix.components.logger;
import org.apache.avalon.framework.logger.LogKitLogger;
import org.apache.avalon.framework.logger.Logger;
import org.apache.log.Hierarchy;
/**
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Royal</a>
*/
public class LogKitHierarchyLogger implements Logger
{
private final Hierarchy m_hierarchy;
private final org.apache.log.Logger m_root;
public LogKitHierarchyLogger( Hierarchy hierarchy )
{
this.m_hierarchy = hierarchy;
this.m_root = m_hierarchy.getLoggerFor( "" );
}
public void debug( String message )
{
this.m_root.debug( message );
}
public void debug( String message, Throwable throwable )
{
this.m_root.debug( message, throwable );
}
public void error( String message )
{
this.m_root.error( message );
}
public void error( String message, Throwable throwable )
{
this.m_root.error( message, throwable );
}
public void fatalError( String message )
{
this.m_root.fatalError( message );
}
public void fatalError( String message, Throwable throwable )
{
this.m_root.fatalError( message, throwable );
}
public Logger getChildLogger( String name )
{
return new LogKitLogger( this.m_hierarchy.getLoggerFor( name ) );
}
public void info( String message )
{
this.m_root.info( message );
}
public void info( String message, Throwable throwable )
{
this.m_root.info( message, throwable );
}
public boolean isDebugEnabled()
{
return this.m_root.isDebugEnabled();
}
public boolean isErrorEnabled()
{
return this.m_root.isErrorEnabled();
}
public boolean isFatalErrorEnabled()
{
return this.m_root.isFatalErrorEnabled();
}
public boolean isInfoEnabled()
{
return this.m_root.isInfoEnabled();
}
public boolean isWarnEnabled()
{
return this.m_root.isWarnEnabled();
}
public void warn( String message )
{
this.m_root.warn( message );
}
public void warn( String message, Throwable throwable )
{
this.m_root.warn( message, throwable );
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>