|
||||
File indexing completed on 2025-01-18 09:54:33
0001 #ifndef ZMEXSEVERITY_H 0002 #define ZMEXSEVERITY_H 0003 0004 0005 // ---------------------------------------------------------------------- 0006 // 0007 // ZMexSeverity.h - define severity codes & ancillary information 0008 // 0009 // Revision History: 0010 // 970917 WEB Updated per code review 2 0011 // 971006 WEB Added ZMexSeverityLimit to support limiting 0012 // logging by severity 0013 // 971016 WEB Added explanations of the various severity levels 0014 // 971112 WEB Updated for conformance to standard and the zoom 0015 // compatability headers 0016 // 980615 WEB Added namespace support 0017 // 000217 WEB Improve C++ standards compliance 0018 // 000503 WEB Avoid global using 0019 // 031105 LG Get rid of all ZMutility references 0020 // 0021 // ---------------------------------------------------------------------- 0022 0023 #ifndef STRING_INCLUDED 0024 #define STRING_INCLUDED 0025 #include <string> 0026 #endif 0027 0028 0029 namespace zmex { 0030 0031 0032 enum ZMexSeverity { 0033 0034 ZMexNORMAL, 0035 // All is well; always safe to ignore; typically not worth logging 0036 // since it's probably just a temporary placeholder. 0037 ZMexINFO, 0038 // In the normal course of events, here is news worth logging; 0039 // always safe to ignore; often useful for progress reporting and 0040 // for debugging purposes. 0041 ZMexWARNING, 0042 // Something unusual has happened, but we have a quite reasonable 0043 // action to take; it's generally safe to ignore the warning because 0044 // you'll probably get just about the result you intended; logging 0045 // can probably cease after (say) 50 of the same warnings. 0046 ZMexERROR, 0047 // We encountered something such that, although we can make it safe 0048 // to continue running (e.g., by supplying a default value instead of 0049 // a value we can't for some reason calculate), you probably won't 0050 // get the result you expected unless you handle this yourself; ought 0051 // always be logged (but may be sensible, if hundreds of the same 0052 // error are intentionally ignored, to stop logging each one). 0053 ZMexSEVERE, 0054 // The action you intended will almost certainly have a seriously 0055 // flawed outcome and we doubt that either we or you can make it safe 0056 // to continue if you ignore this; ought always be logged. 0057 ZMexFATAL, 0058 // We can make no representations as to the state of any part of the 0059 // software, even of software parts not obviously associated with the 0060 // failed intended action and even if you try to handle the problem; 0061 // ought always be logged and essentially never be ignored. 0062 ZMexPROBLEM, 0063 // The software has reached a logically impossible internal state; 0064 // must always be logged and never be ignored; if encountered, should 0065 // always be reported to the software's developers and/or maintainers. 0066 ZMexSEVERITYenumLAST 0067 // Not a true severity level; useful to count the number of distinct 0068 // severity levels and, as such, must always be physically last 0069 // within this enum's definition. 0070 0071 }; // ZMexSeverity 0072 0073 0074 extern const std::string ZMexSeverityName[ ZMexSEVERITYenumLAST ]; 0075 0076 extern const char ZMexSeverityLetter[ ZMexSEVERITYenumLAST ]; 0077 0078 extern int ZMexSeverityLimit[ ZMexSEVERITYenumLAST ]; 0079 0080 0081 } // namespace zmex 0082 0083 0084 #endif // ZMEXSEVERITY_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |