Public Member Functions | |
Appender (Formatter *formatter) | |
Construct the appender. | |
virtual void | append (Logger::Level level, std::string msg, std::string category, LOG4SENDPP_INT64 stamp, const LocationInformation *loginfo, const Logger::DiagnosticInformation *diaginfo)=0 |
Formats a message. | |
void | setFormatter (Formatter *formatter) |
Sets the formatter for this appender. | |
virtual | ~Appender () |
Provide virtual destructor. | |
virtual bool | isWorking () const =0 |
Tests if the appender is correctly working. | |
virtual void | writeString (const std::string &data)=0 |
Appends a raw string to the current file. | |
Formatter * | getFormatter () const |
Gets the formatter for this appender. |
Definition at line 48 of file appender.h.
l4snd::Appender::Appender | ( | Formatter * | formatter | ) |
Construct the appender.
formatter | pointer to according formatter |
Definition at line 41 of file appender.cpp.
References setFormatter().
virtual void l4snd::Appender::append | ( | Logger::Level | level, | |
std::string | msg, | |||
std::string | category, | |||
LOG4SENDPP_INT64 | stamp, | |||
const LocationInformation * | loginfo, | |||
const Logger::DiagnosticInformation * | diaginfo | |||
) | [pure virtual] |
Formats a message.
level | severty level | |
msg | string to log | |
category | message category | |
stamp | timestamp in milliseconds since 1.1.1970 | |
loginfo | pointer to location info or 0 | |
diaginfo | pointer to diagnostic info or 0 |
Implemented in l4snd::FileAppender, l4snd::ostream_Appender, and l4snd::TcpIpAppender.
Referenced by l4snd::ostream_Appender::append(), and l4snd::Logger::log().
void l4snd::Appender::setFormatter | ( | Formatter * | formatter | ) |
Sets the formatter for this appender.
formatter | pointer to new formatter |
Definition at line 52 of file appender.cpp.
Referenced by Appender().
virtual bool l4snd::Appender::isWorking | ( | ) | const [pure virtual] |
Tests if the appender is correctly working.
Implemented in l4snd::FileAppender, l4snd::ostream_Appender, and l4snd::TcpIpAppender.
Referenced by l4snd::ostream_Appender::isWorking(), and l4snd::Logger::log().
virtual void l4snd::Appender::writeString | ( | const std::string & | data | ) | [pure virtual] |
Appends a raw string to the current file.
data | string with data |
Implemented in l4snd::FileAppender, l4snd::ostream_Appender, and l4snd::TcpIpAppender.
Referenced by l4snd::ostream_Appender::writeString().
Formatter * l4snd::Appender::getFormatter | ( | ) | const |
Gets the formatter for this appender.
Definition at line 58 of file appender.cpp.
Referenced by l4snd::TcpIpAppender::append(), and l4snd::FileAppender::append().