Log4j 1.3alpha-6

org.apache.log4j.spi
Class ComponentBase

java.lang.Object
  |
  +--org.apache.log4j.spi.ComponentBase
All Implemented Interfaces:
Component
Direct Known Subclasses:
Action, AppenderSkeleton, Compress, ConnectionSourceSkeleton, FileNamePattern, Filter, Layout, PatternConverter, PatternParser, PluginSkeleton, PropertySetter, RendererMap, RollingPolicyBase, SocketNode, Util, Util, XMLSocketNode

public class ComponentBase
extends java.lang.Object
implements Component

Most log4j components derive from this class.

Since:
1.3
Author:
Ceki Gulcu

Field Summary
protected  LoggerRepository repository
           
 
Constructor Summary
ComponentBase()
           
 
Method Summary
protected  ULogger getLogger()
          Return an instance specific logger to be used by the component itself.
 void setLoggerRepository(LoggerRepository repository)
          Set the owning repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

repository

protected LoggerRepository repository
Constructor Detail

ComponentBase

public ComponentBase()
Method Detail

setLoggerRepository

public void setLoggerRepository(LoggerRepository repository)
Set the owning repository. The owning repository cannot be set more than once.

Specified by:
setLoggerRepository in interface Component
Parameters:
repository - The repository where this appender is attached.

getLogger

protected ULogger getLogger()
Return an instance specific logger to be used by the component itself. This logger is not intended to be accessed by the end-user, hence the protected keyword.

In case the repository for this component is not set, this implementations returns a SimpleLogger instance.

Returns:
A ULogger instance.

Log4j 1.3alpha-6

Copyright 2000-2005 Apache Software Foundation.