#include <Msg.h>
Public Types | |
| typedef int | LogLevel_t |
Static Public Member Functions | |
| LogLevel_t | GetLevelCode (const char *level) |
| const char * | LevelAsString (int level) |
| int | GetFormatCode (const char *fmt) |
Static Public Attributes | |
| const LogLevel_t | kMinLogLevel = 0 |
| const LogLevel_t | kVerbose = 0 |
| const LogLevel_t | kDebug = 1 |
| const LogLevel_t | kSynopsis = 2 |
| const LogLevel_t | kInfo = 3 |
| const LogLevel_t | kWarning = 5 |
| const LogLevel_t | kError = 6 |
| const LogLevel_t | kFatal = 7 |
| const LogLevel_t | kNLogLevel = 8 |
| const int | kPriority = 0x01 |
| const int | kName = 0x02 |
| const int | kTime = 0x04 |
| const int | kFile = 0x08 |
| const int | kCVSId = 0x10 |
| const int | kLine = 0x20 |
| const int | kHost = 0x40 |
| const int | kPID = 0x80 |
| const int | kRunSnarl = 0x100 |
| const int | kStackTrace = 0x200 |
| const int | kColorAll = 0x1000 |
| const int | kBold = 0x2000 |
| const int | kDim = 0x4000 |
| const int | kUnderline = 0x8000 |
| const int | kBlink = 0x10000 |
| const int | kReverse = 0x20000 |
| const int | kBlack = 0x100000 |
| const int | kRed = 0x200000 |
| const int | kGreen = 0x300000 |
| const int | kYellow = 0x400000 |
| const int | kBlue = 0x500000 |
| const int | kMagenta = 0x600000 |
| const int | kCyan = 0x700000 |
| const int | kWhite = 0x800000 |
| const int | kBgBlack = 0x1000000 |
| const int | kBgRed = 0x2000000 |
| const int | kBgGreen = 0x3000000 |
| const int | kBgYellow = 0x4000000 |
| const int | kBgBlue = 0x5000000 |
| const int | kBgMagenta = 0x6000000 |
| const int | kBgCyan = 0x7000000 |
| const int | kBgWhite = 0x8000000 |
| const int | kFgColorMask = 0xF00000 |
| const int | kBgColorMask = 0xF000000 |
| const int | kFontMask = 0xFFF0000 |
Private Member Functions | |
| Msg () | |
|
|
Definition at line 19 of file Msg.h. Referenced by GetLevelCode(). |
|
|
|
|
|
Definition at line 50 of file Msg.cxx. Referenced by JobCMsgModule::Format(), and JobCMsgModule::SetDefaultFormat(). 00051 {
00052 //======================================================================
00053 // Purpose: Convert a text string to the print level code
00054 //
00055 // Returns: the level code for corresponding to the string
00056 // -1 if none match
00057 //======================================================================
00058 if (strcasecmp(fmt,"Priority")==0) return Msg::kPriority;
00059 if (strcasecmp(fmt,"Name")==0) return Msg::kName;
00060 if (strcasecmp(fmt,"Time")==0) return Msg::kTime;
00061 if (strcasecmp(fmt,"File")==0) return Msg::kFile;
00062 if (strcasecmp(fmt,"CVSId")==0) return Msg::kCVSId;
00063 if (strcasecmp(fmt,"Line")==0) return Msg::kLine;
00064 if (strcasecmp(fmt,"Host")==0) return Msg::kHost;
00065 if (strcasecmp(fmt,"PID")==0) return Msg::kPID;
00066 if (strcasecmp(fmt,"RunSnarl")==0) return Msg::kRunSnarl;
00067 if (strcasecmp(fmt,"StackTrace")==0) return Msg::kStackTrace;
00068
00069 if (strcasecmp(fmt,"ColorAll")==0) return Msg::kColorAll;
00070 if (strcasecmp(fmt,"Bold")==0) return Msg::kBold;
00071 if (strcasecmp(fmt,"Dim")==0) return Msg::kDim;
00072 if (strcasecmp(fmt,"Underline")==0) return Msg::kUnderline;
00073 if (strcasecmp(fmt,"Blink")==0) return Msg::kBlink;
00074 if (strcasecmp(fmt,"Reverse")==0) return Msg::kReverse;
00075 if (strcasecmp(fmt,"Black")==0) return Msg::kBlack;
00076 if (strcasecmp(fmt,"Red")==0) return Msg::kRed;
00077 if (strcasecmp(fmt,"Green")==0) return Msg::kGreen;
00078 if (strcasecmp(fmt,"Yellow")==0) return Msg::kYellow;
00079 if (strcasecmp(fmt,"Blue")==0) return Msg::kBlue;
00080 if (strcasecmp(fmt,"Magenta")==0) return Msg::kMagenta;
00081 if (strcasecmp(fmt,"Cyan")==0) return Msg::kCyan;
00082 if (strcasecmp(fmt,"White")==0) return Msg::kWhite;
00083 if (strcasecmp(fmt,"BgBlack")==0) return Msg::kBgBlack;
00084 if (strcasecmp(fmt,"BgRed")==0) return Msg::kBgRed;
00085 if (strcasecmp(fmt,"BgGreen")==0) return Msg::kBgGreen;
00086 if (strcasecmp(fmt,"BgYellow")==0) return Msg::kBgYellow;
00087 if (strcasecmp(fmt,"BgBlue")==0) return Msg::kBgBlue;
00088 if (strcasecmp(fmt,"BgMagenta")==0) return Msg::kBgMagenta;
00089 if (strcasecmp(fmt,"BgCyan")==0) return Msg::kBgCyan;
00090 if (strcasecmp(fmt,"BgWhite")==0) return Msg::kBgWhite;
00091 return -1;
00092 }
|
|
|
Definition at line 11 of file Msg.cxx. References LogLevel_t. Referenced by JobCMsgModule::Attach(), UgliGeometry::BuildNodes(), JobCMsgModule::Format(), main(), FidVol::MsgLevel(), LIAnalysis::PrintGainTableRow(), JobCMsgModule::SetDefaultFormat(), and JobCMsgModule::SetLevel(). 00012 {
00013 //======================================================================
00014 // Purpose: Convert a text string to the print level code
00015 //
00016 // Returns: the level code for corresponding to the string
00017 // -1 if none match
00018 //======================================================================
00019 if (strcasecmp(level,"Verbose") == 0) return Msg::kVerbose;
00020 else if (strcasecmp(level,"Debug") == 0) return Msg::kDebug;
00021 else if (strcasecmp(level,"Info") == 0) return Msg::kInfo;
00022 else if (strcasecmp(level,"Synopsis") == 0) return Msg::kSynopsis;
00023 else if (strcasecmp(level,"Warning") == 0) return Msg::kWarning;
00024 else if (strcasecmp(level,"Error") == 0) return Msg::kError;
00025 else if (strcasecmp(level,"Fatal") == 0) return Msg::kFatal;
00026 return -1;
00027 }
|
|
|
Definition at line 31 of file Msg.cxx. Referenced by FidVol::GetMsgLevel(), and DDSParentServer::Print(). 00032 {
00033 //======================================================================
00034 // Purpose: Convert the integer level to the string name it represents
00035 //
00036 // Returns: The level represented by the int
00037 //======================================================================
00038 if (level == Msg::kVerbose) return "Verbose";
00039 if (level == Msg::kDebug) return "Debug";
00040 if (level == Msg::kInfo) return "Info";
00041 if (level == Msg::kSynopsis) return "Synopsis";
00042 if (level == Msg::kWarning) return "Warning";
00043 if (level == Msg::kError) return "Error";
00044 if (level == Msg::kFatal) return "Fatal";
00045 return "Unknown?!";
00046 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.9.1