Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _LOG4CPP_PRIORITY_HH
00011 #define _LOG4CPP_PRIORITY_HH
00012
00013 #include "Base/GCException.h"
00014 #include <log4cpp/Portability.hh>
00015 #include <string>
00016 #include <stdexcept>
00017
00018
00019
00020
00021 #ifdef ERROR
00022 #ifdef LOG4CPP_FIX_ERROR_COLLISION
00023
00024 LOG4CPP_NS_BEGIN
00025 static const int _tmpERRORValue = ERROR;
00026 LOG4CPP_NS_END
00027
00028 #undef ERROR
00029 static const int ERROR = LOG4CPP_NS::_tmpERRORValue;
00030 #define ERROR ERROR
00031
00032 #else // LOG4CPP_FIX_ERROR_COLLISION
00033 #error Naming collision for 'ERROR' detected. Please read the FAQ for a \
00034 workaround.
00035 #endif // LOG4CPP_FIX_ERROR_COLLISION
00036
00037 #endif // ERROR
00038
00039
00040
00041
00042 #ifdef DEBUG
00043
00044 #ifdef LOG4CPP_FIX_ERROR_COLLISION
00045
00046 #undef DEBUG
00047 #define DEBUG DEBUG
00048
00049 #else // LOG4CPP_FIX_ERROR_COLLISION
00050 #error Naming collision for 'DEBUG' detected. Please read the FAQ for a \
00051 workaround.
00052 #endif // LOG4CPP_FIX_ERROR_COLLISION
00053
00054 #endif // DEBUG
00055
00056 LOG4CPP_NS_BEGIN
00057
00062 class LOG4CPP_EXPORT Priority {
00063 public:
00064
00065 static const int MESSAGE_SIZE;
00066
00071 typedef enum {
00072 EMERG = 0,
00073 FATAL = 0,
00074 ALERT = 100,
00075 CRIT = 200,
00076 ERROR = 300,
00077 WARN = 400,
00078 NOTICE = 500,
00079 INFO = 600,
00080 DEBUG = 700,
00081 NOTSET = 800
00082 } PriorityLevel;
00083
00087 typedef int Value;
00088
00097 static const std::string& getPriorityName(int priority) throw();
00098
00108 static Value getPriorityValue(const std::string& priorityName);
00109
00110 };
00111 LOG4CPP_NS_END
00112
00113 #endif // _LOG4CPP_PRIORITY_HH