

Public Member Functions | |
| XmlFormatter (const std::string &appname) | |
| Constructs the formatter. | |
| XmlFormatter (const std::string &appname, const std::string &hostname) | |
| Constructs the formatter. | |
| virtual std::vector < std::string > | format (Logger::Level level, const std::string &msg, std::string category, LOG4SENDPP_INT64 stamp, const LocationInformation *loginfo, const Logger::DiagnosticInformation *diaginfo) |
| Formats a message. | |
Static Public Member Functions | |
| static std::string | xmlEscape (const std::string &msg) |
| Replaces dangerous xml literals. | |
Definition at line 43 of file xmlformatter.h.
| l4snd::XmlFormatter::XmlFormatter | ( | const std::string & | appname | ) |
Constructs the formatter.
Sets also the hostname.
| appname | application name |
Definition at line 62 of file xmlformatter.cpp.
References l4snd::TcpIpAppender::gethostname().
| l4snd::XmlFormatter::XmlFormatter | ( | const std::string & | appname, | |
| const std::string & | hostname | |||
| ) |
Constructs the formatter.
| appname | application name | |
| hostname | hostname |
Definition at line 52 of file xmlformatter.cpp.
| std::vector< std::string > l4snd::XmlFormatter::format | ( | Logger::Level | level, | |
| const std::string & | msg, | |||
| std::string | category, | |||
| LOG4SENDPP_INT64 | stamp, | |||
| const LocationInformation * | loginfo, | |||
| const Logger::DiagnosticInformation * | diaginfo | |||
| ) | [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 |
Implements l4snd::Formatter.
Definition at line 78 of file xmlformatter.cpp.
References l4snd::Logger::Debug, l4snd::Logger::Error, l4snd::Logger::Fatal, l4snd::Logger::Info, l4snd::number(), l4snd::Logger::Trace, l4snd::Logger::Warning, and xmlEscape().
| std::string l4snd::XmlFormatter::xmlEscape | ( | const std::string & | msg | ) | [static] |
Replaces dangerous xml literals.
| msg | message |
Definition at line 71 of file xmlformatter.cpp.
Referenced by format().
1.5.3