|
| AsyncAppender () |
| Create new instance. More...
|
|
virtual | ~AsyncAppender () |
| Destructor. More...
|
|
void | addRef () const |
|
void | releaseRef () const |
|
void | addAppender (const AppenderPtr &newAppender) |
| Add appender. More...
|
|
virtual void | doAppend (const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &pool1) |
| This method performs threshold checks and invokes filters before delegating actual logging to the subclasses specific AppenderSkeleton::append method. More...
|
|
void | append (const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &p) |
| Subclasses of AppenderSkeleton should implement this method to perform actual logging. More...
|
|
void | close () |
| Close this AsyncAppender by interrupting the dispatcher thread which will process all pending events before exiting. More...
|
|
AppenderList | getAllAppenders () const |
| Get iterator over attached appenders. More...
|
|
AppenderPtr | getAppender (const LogString &name) const |
| Get appender by name. More...
|
|
bool | getLocationInfo () const |
| Gets whether the location of the logging request call should be captured. More...
|
|
bool | isAttached (const AppenderPtr &appender) const |
| Determines if specified appender is attached. More...
|
|
virtual bool | requiresLayout () const |
| Configurators call this method to determine if the appender requires a layout. More...
|
|
void | removeAllAppenders () |
| Removes and closes all attached appenders. More...
|
|
void | removeAppender (const AppenderPtr &appender) |
| Removes an appender. More...
|
|
void | removeAppender (const LogString &name) |
| Remove appender by name. More...
|
|
void | setLocationInfo (bool flag) |
| The LocationInfo attribute is provided for compatibility with log4j and has no effect on the log output. More...
|
|
void | setBufferSize (int size) |
| The BufferSize option takes a non-negative integer value. More...
|
|
int | getBufferSize () const |
| Gets the current buffer size. More...
|
|
void | setBlocking (bool value) |
| Sets whether appender should wait if there is no space available in the event buffer or immediately return. More...
|
|
bool | getBlocking () const |
| Gets whether appender should block calling thread when buffer is full. More...
|
|
void | setOption (const LogString &option, const LogString &value) |
| Set appender properties by name. More...
|
|
virtual void | addAppender (const AppenderPtr &newAppender)=0 |
| Add an appender. More...
|
|
virtual AppenderList | getAllAppenders () const =0 |
| Get all previously added appenders as an AppenderList. More...
|
|
virtual AppenderPtr | getAppender (const LogString &name) const =0 |
| Get an appender by name. More...
|
|
virtual bool | isAttached (const AppenderPtr &appender) const =0 |
| Returns true if the specified appender is in list of attached appenders, false otherwise. More...
|
|
virtual void | removeAllAppenders ()=0 |
| Remove all previously added appenders. More...
|
|
virtual void | removeAppender (const AppenderPtr &appender)=0 |
| Remove the appender passed as parameter from the list of appenders. More...
|
|
virtual void | removeAppender (const LogString &name)=0 |
| Remove the appender with the name passed as parameter from the list of appenders. More...
|
|
virtual | ~AppenderAttachable () |
|
virtual const helpers::Class & | getClass () const |
|
virtual | ~Object () |
|
virtual void | addRef () const =0 |
|
virtual void | releaseRef () const =0 |
|
virtual bool | instanceof (const Class &clazz) const =0 |
|
virtual const void * | cast (const Class &clazz) const =0 |
|
| AppenderSkeleton () |
|
| AppenderSkeleton (const LayoutPtr &layout) |
|
void | addRef () const |
|
void | releaseRef () const |
|
void | finalize () |
| Finalize this appender by calling the derived class' close method. More...
|
|
virtual void | activateOptions (log4cxx::helpers::Pool &) |
| Derived appenders should override this method if option structure requires it. More...
|
|
virtual void | setOption (const LogString &option, const LogString &value) |
| Set option to value . More...
|
|
void | addFilter (const spi::FilterPtr &newFilter) |
| Add a filter to end of the filter list. More...
|
|
void | clearFilters () |
| Clear the filters chain. More...
|
|
const spi::ErrorHandlerPtr & | getErrorHandler () const |
| Return the currently set spi::ErrorHandler for this Appender. More...
|
|
spi::FilterPtr | getFilter () const |
| Returns the head Filter. More...
|
|
const spi::FilterPtr & | getFirstFilter () const |
| Return the first filter in the filter chain for this Appender. More...
|
|
LayoutPtr | getLayout () const |
| Returns the layout of this appender. More...
|
|
LogString | getName () const |
| Returns the name of this Appender. More...
|
|
const LevelPtr & | getThreshold () const |
| Returns this appenders threshold level. More...
|
|
bool | isAsSevereAsThreshold (const LevelPtr &level) const |
| Check whether the message level is below the appender's threshold. More...
|
|
virtual void | doAppend (const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &pool) |
| This method performs threshold checks and invokes filters before delegating actual logging to the subclasses specific AppenderSkeleton::append method. More...
|
|
void | setErrorHandler (const spi::ErrorHandlerPtr &eh) |
| Set the ErrorHandler for this Appender. More...
|
|
void | setLayout (const LayoutPtr &layout1) |
| Set the layout for this appender. More...
|
|
void | setName (const LogString &name1) |
| Set the name of this Appender. More...
|
|
void | setThreshold (const LevelPtr &threshold) |
| Set the threshold level. More...
|
|
virtual | ~Appender () |
|
virtual void | addFilter (const spi::FilterPtr &newFilter)=0 |
| Add a filter to the end of the filter list. More...
|
|
virtual spi::FilterPtr | getFilter () const =0 |
| Returns the head Filter. More...
|
|
virtual void | clearFilters ()=0 |
| Clear the list of filters by removing all the filters in it. More...
|
|
virtual void | close ()=0 |
| Release any resources allocated within the appender such as file handles, network connections, etc. More...
|
|
virtual void | doAppend (const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &pool)=0 |
| Log in Appender specific way. More...
|
|
virtual LogString | getName () const =0 |
| Get the name of this appender. More...
|
|
virtual void | setLayout (const LayoutPtr &layout)=0 |
| Set the Layout for this appender. More...
|
|
virtual LayoutPtr | getLayout () const =0 |
| Returns this appenders layout. More...
|
|
virtual void | setName (const LogString &name)=0 |
| Set the name of this appender. More...
|
|
virtual bool | requiresLayout () const =0 |
| Configurators call this method to determine if the appender requires a layout. More...
|
|
Public Member Functions inherited from OptionHandler |
virtual | ~OptionHandler () |
|
virtual void | activateOptions (log4cxx::helpers::Pool &p)=0 |
| Activate the options that were previously set with calls to option setters. More...
|
|
virtual void | setOption (const LogString &option, const LogString &value)=0 |
| Set option to value . More...
|
|
| ObjectImpl () |
|
virtual | ~ObjectImpl () |
|
void | addRef () const |
|
void | releaseRef () const |
|
The AsyncAppender lets users log events asynchronously.
It uses a bounded buffer to store logging events.
The AsyncAppender will collect the events sent to it and then dispatch them to all the appenders that are attached to it. You can attach multiple appenders to an AsyncAppender.
The AsyncAppender uses a separate thread to serve the events in its bounded buffer.
Important note: The AsyncAppender
can only be script configured using the DOMConfigurator
.