CLHEP VERSION Reference Documentation
CLHEP Home Page CLHEP Documentation CLHEP Bug Reports |
00001 #ifndef ZMEXSEVERITY_H 00002 #define ZMEXSEVERITY_H 00003 00004 00005 // ---------------------------------------------------------------------- 00006 // 00007 // ZMexSeverity.h - define severity codes & ancillary information 00008 // 00009 // Revision History: 00010 // 970917 WEB Updated per code review 2 00011 // 971006 WEB Added ZMexSeverityLimit to support limiting 00012 // logging by severity 00013 // 971016 WEB Added explanations of the various severity levels 00014 // 971112 WEB Updated for conformance to standard and the zoom 00015 // compatability headers 00016 // 980615 WEB Added namespace support 00017 // 000217 WEB Improve C++ standards compliance 00018 // 000503 WEB Avoid global using 00019 // 031105 LG Get rid of all ZMutility references 00020 // 00021 // ---------------------------------------------------------------------- 00022 00023 #ifndef STRING_INCLUDED 00024 #define STRING_INCLUDED 00025 #include <string> 00026 #endif 00027 00028 00029 namespace zmex { 00030 00031 00032 enum ZMexSeverity { 00033 00034 ZMexNORMAL, 00035 // All is well; always safe to ignore; typically not worth logging 00036 // since it's probably just a temporary placeholder. 00037 ZMexINFO, 00038 // In the normal course of events, here is news worth logging; 00039 // always safe to ignore; often useful for progress reporting and 00040 // for debugging purposes. 00041 ZMexWARNING, 00042 // Something unusual has happened, but we have a quite reasonable 00043 // action to take; it's generally safe to ignore the warning because 00044 // you'll probably get just about the result you intended; logging 00045 // can probably cease after (say) 50 of the same warnings. 00046 ZMexERROR, 00047 // We encountered something such that, although we can make it safe 00048 // to continue running (e.g., by supplying a default value instead of 00049 // a value we can't for some reason calculate), you probably won't 00050 // get the result you expected unless you handle this yourself; ought 00051 // always be logged (but may be sensible, if hundreds of the same 00052 // error are intentionally ignored, to stop logging each one). 00053 ZMexSEVERE, 00054 // The action you intended will almost certainly have a seriously 00055 // flawed outcome and we doubt that either we or you can make it safe 00056 // to continue if you ignore this; ought always be logged. 00057 ZMexFATAL, 00058 // We can make no representations as to the state of any part of the 00059 // software, even of software parts not obviously associated with the 00060 // failed intended action and even if you try to handle the problem; 00061 // ought always be logged and essentially never be ignored. 00062 ZMexPROBLEM, 00063 // The software has reached a logically impossible internal state; 00064 // must always be logged and never be ignored; if encountered, should 00065 // always be reported to the software's developers and/or maintainers. 00066 ZMexSEVERITYenumLAST 00067 // Not a true severity level; useful to count the number of distinct 00068 // severity levels and, as such, must always be physically last 00069 // within this enum's definition. 00070 00071 }; // ZMexSeverity 00072 00073 00074 extern const std::string ZMexSeverityName[ ZMexSEVERITYenumLAST ]; 00075 00076 extern const char ZMexSeverityLetter[ ZMexSEVERITYenumLAST ]; 00077 00078 extern int ZMexSeverityLimit[ ZMexSEVERITYenumLAST ]; 00079 00080 00081 } // namespace zmex 00082 00083 00084 #endif // ZMEXSEVERITY_H