#include <string>
Go to the source code of this file.
Namespaces | |
| namespace | xlog |
Classes | |
| class | xlog::LogLevel |
| Log level base class. More... | |
Defines | |
| #define | LOGLEVEL(classname, ancestor, llname) |
| Declares a new log level. | |
| #define | LOGLEVELH(classname, ancestor, llname, head) |
| Declares a new log level with a header. | |
Functions | |
| xlog::LOGLEVEL (LogInfo, LogLevel,"Info") | |
| xlog::LOGLEVEL (LogNotice, LogLevel,"Notice") | |
| xlog::LOGLEVELH (LogWarning, LogLevel,"Warning","warning: ") | |
| xlog::LOGLEVELH (LogError, LogLevel,"Error","Error: ") | |
| xlog::LOGLEVELH (LogCritical, LogLevel,"Critical","Critical error: ") | |
| xlog::LOGLEVELH (LogFatal, LogLevel,"Fatal","FATAL: ") | |
| #define LOGLEVEL | ( | classname, | |||
| ancestor, | |||||
| llname | ) |
Value:
class classname : public ancestor \ { \ public: \ virtual bool operator==(std::string const &name) const \ { \ if (!strcasecmp(name.c_str(), llname)) \ return true; \ return ancestor::operator==(name); \ } \ }
| classname | The name of the new class. | |
| ancestor | The ancestor of the new class. | |
| llname | The name of the log level (as a char *). |
| #define LOGLEVELH | ( | classname, | |||
| ancestor, | |||||
| llname, | |||||
| head | ) |
Value:
class classname : public ancestor \ { \ public: \ virtual bool operator==(std::string const &name) const \ { \ if (!strcasecmp(name.c_str(), (llname))) \ return true; \ return ancestor::operator==(name); \ } \ \ virtual char const *header() const { return (head); } \ }
| classname | The name of the new class. | |
| ancestor | The ancestor of the new class. | |
| llname | The name of the log level (as a char *). | |
| head | The header of the log level (as a char *). |
1.5.2