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 © 2013 The Apache Software Foundation. Licensed under the Apache License, Version 2.0
Apache Extras for Apache log4j, Apache log4j and Apache are trademarks of the Apache Software Foundation.