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 namespace log4cpp {
00056 
00061     class LOG4CPP_EXPORT Priority {
00062         public:
00063 
00064                 static const int MESSAGE_SIZE; // = 8;
00065 
00070         typedef enum {EMERG  = 0, 
00071                       FATAL  = 0,
00072                       ALERT  = 100,
00073                       CRIT   = 200,
00074                       ERROR  = 300, 
00075                       WARN   = 400,
00076                       NOTICE = 500,
00077                       INFO   = 600,
00078                       DEBUG  = 700,
00079                       NOTSET = 800
00080         } PriorityLevel;
00081 
00085         typedef int Value;
00086 
00095         static const std::string& getPriorityName(int priority) throw();
00096         
00106         static Value getPriorityValue(const std::string& priorityName)
00107         throw(std::invalid_argument);
00108     };
00109 }
00110 
00111 #endif // _LOG4CPP_PRIORITY_HH


log4cpp
Author(s): Stephen Roderick, Bastiaan Bakker, Cedric Le Goater, Steve Ostlind, Marcel Harkema, Walter Stroebel, Glenn Scott and Tony Cheung.
autogenerated on Thu Jan 2 2014 11:35:02