levels.h File Reference

Log levels header file. More...

#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: ")


Detailed Description


Define Documentation

#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); \
            } \
    }
Declares a new log level.

Parameters:
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); } \
    }
Declares a new log level with a header.

Parameters:
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 *).


Generated on Wed Aug 15 00:37:22 2007 for Epona API by  doxygen 1.5.2