Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Priority.hh

Go to the documentation of this file.
00001 /* 00002 * Priority.hh 00003 * 00004 * Copyright 2000, LifeLine Networks BV (www.lifeline.nl). All rights reserved. 00005 * Copyright 2000, Bastiaan Bakker. All rights reserved. 00006 * 00007 * See the COPYING file for the terms of usage and distribution. 00008 */ 00009 00010 #ifndef _LOG4CPP_PRIORITY_HH 00011 #define _LOG4CPP_PRIORITY_HH 00012 00013 #include <log4cpp/Portability.hh> 00014 #include <string> 00015 #include <stdexcept> 00016 00017 /* 00018 * Optionally work around rudeness in windows.h on Win32. 00019 */ 00020 #ifdef ERROR 00021 #ifdef LOG4CPP_FIX_ERROR_COLLISION 00022 00023 namespace log4cpp { 00024 static const int _tmpERRORValue = ERROR; 00025 } 00026 00027 #undef ERROR 00028 static const int ERROR = log4cpp::_tmpERRORValue; 00029 #define ERROR ERROR 00030 00031 #else // LOG4CPP_FIX_ERROR_COLLISION 00032 #error Naming collision for 'ERROR' detected. Please read the FAQ for a \ 00033 workaround. 00034 #endif // LOG4CPP_FIX_ERROR_COLLISION 00035 00036 #endif // ERROR 00037 00038 /* 00039 * Other Win32 rudeness in EDK.h 00040 */ 00041 #ifdef DEBUG 00042 00043 #ifdef LOG4CPP_FIX_ERROR_COLLISION 00044 00045 #undef DEBUG 00046 #define DEBUG DEBUG 00047 00048 #else // LOG4CPP_FIX_ERROR_COLLISION 00049 #error Naming collision for 'DEBUG' detected. Please read the FAQ for a \ 00050 workaround. 00051 #endif // LOG4CPP_FIX_ERROR_COLLISION 00052 00053 #endif // DEBUG 00054 00055 00056 namespace log4cpp { 00057 00062 class Priority { 00063 public: 00064 00069 typedef enum {EMERG = 0, 00070 FATAL = 0, 00071 ALERT = 100, 00072 CRIT = 200, 00073 ERROR = 300, 00074 WARN = 400, 00075 NOTICE = 500, 00076 INFO = 600, 00077 DEBUG = 700, 00078 NOTSET = 800 00079 } PriorityLevel; 00080 00084 typedef int Value; 00085 00094 static const std::string& getPriorityName(int priority) throw(); 00095 00105 static Value getPriorityValue(const std::string& priorityName) 00106 throw(std::invalid_argument); 00107 }; 00108 } 00109 00110 #endif // _LOG4CPP_PRIORITY_HH

Generated on Fri Jun 4 21:26:08 2004 for log4cpp by doxygen 1.3.7