public class ComponentBase extends Object implements Component
Modifier and Type | Field and Description |
---|---|
protected org.apache.log4j.spi.LoggerRepository |
repository
Logger repository.
|
Modifier | Constructor and Description |
---|---|
protected |
ComponentBase()
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected ULogger |
getLogger()
Return an instance specific logger to be used by the component itself.
|
protected org.apache.log4j.spi.LoggerRepository |
getLoggerRepository()
Return the LoggerRepository to which this component is attached.
|
protected ULogger |
getNonFloodingLogger()
Frequently called methods in log4j components can invoke this method in
order to avoid flooding the output when logging lasting error conditions.
|
protected void |
resetErrorCount()
Called by derived classes when they deem that the component has recovered
from an erroneous state.
|
void |
setLoggerRepository(org.apache.log4j.spi.LoggerRepository repository)
Set the owning repository.
|
protected org.apache.log4j.spi.LoggerRepository repository
protected void resetErrorCount()
public void setLoggerRepository(org.apache.log4j.spi.LoggerRepository repository)
setLoggerRepository
in interface Component
repository
- repositoryprotected org.apache.log4j.spi.LoggerRepository getLoggerRepository()
protected ULogger getLogger()
In case the repository for this component is not set,
this implementations returns a SimpleULogger
instance.
protected ULogger getNonFloodingLogger()
Copyright © 2002-2017 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache Chainsaw, Chainsaw, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.