24 #ifndef LOG4CPLUS_APPENDER_HEADER_ 25 #define LOG4CPLUS_APPENDER_HEADER_ 29 #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 43 #include <condition_variable> 67 virtual void reset() = 0;
151 void destructorImpl();
160 virtual void close() = 0;
165 bool isClosed()
const;
203 virtual void setErrorHandler(std::unique_ptr<ErrorHandler> eh);
216 virtual void setLayout(std::unique_ptr<Layout> layout);
223 virtual Layout* getLayout();
243 void addFilter (std::function<
275 void waitToFinishAsyncLogging();
315 #if ! defined (LOG4CPLUS_SINGLE_THREADED) 325 #if ! defined (LOG4CPLUS_SINGLE_THREADED) 326 void subtract_in_flight();
335 #endif // LOG4CPLUS_APPENDER_HEADER_ The internal representation of logging events.
This header defines Filter and all of it's subclasses.
This class is used to layout strings sent to an {}.
LogLevel getThreshold() const
Returns this appenders threshold LogLevel.
std::unique_ptr< helpers::LockFile > lockFile
Optional system wide synchronization lock.
std::atomic< std::size_t > in_flight
std::condition_variable in_flight_condition
log4cplus::spi::FilterPtr filter
The first filter in the filter chain.
void setThreshold(LogLevel th)
Set the threshold LogLevel.
bool useLockFile
Use lock file for inter-process synchronization of access to log file.
This class is used to "handle" errors encountered in an {}.
helpers::SharedObjectPtr< Appender > SharedAppenderPtr
This is a pointer to an Appender.
const LogLevel NOT_SET_LOG_LEVEL
The NOT_SET_LOG_LEVEL LogLevel is used to indicated that no particular LogLevel is desired and that t...
std::basic_string< tchar > tstring
This header defines the LogLevel type.
int LogLevel
Defines the minimum set of priorities recognized by the system, that is FATAL_LOG_LEVEL,...
LogLevel threshold
There is no LogLevel threshold filtering by default.
log4cplus::tstring name
Appenders are named.
Extend this class for implementing your own strategies for printing log statements.
bool closed
Is this appender closed?
std::unique_ptr< ErrorHandler > errorHandler
It is assumed and enforced that errorHandler is never null.
std::mutex in_flight_mutex
bool isAsSevereAsThreshold(LogLevel ll) const
Check whether the message LogLevel is below the appender's threshold.
bool async
Asynchronous append.
std::unique_ptr< Layout > layout
The layout variable does not need to be set if the appender implementation has its own layout.