| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Level.cc File Reference

#include "Level.hh"
#include <map>
#include <vector>
#include <iostream>
#include <cstring>
#include <cstdio>

Include dependency graph for Level.cc:

Go to the source code of this file.


Typedefs

typedef std::vector< std::pair<
Level, string > > 
SynonymTable_t

Functions

SynonymTable_tGetSynonymTable ()
string Logging::LevelToString (Level lvl)
Level Logging::StringToLevel (string str)

Typedef Documentation

typedef std::vector< std::pair<Level,string> > SynonymTable_t

Definition at line 16 of file Level.cc.


Function Documentation

SynonymTable_t& GetSynonymTable (  ) 

Definition at line 18 of file Level.cc.

00019 {
00020   static SynonymTable_t sTable;
00021   static bool first = true;
00022   if(first) {
00023     first = false;
00024 
00025     // Names with a 'k'
00026     sTable.push_back(std::pair<Level,string>(kVerbose   ,"kVerbose"));
00027     sTable.push_back(std::pair<Level,string>(kDebug3    ,"kDebug3"));
00028     sTable.push_back(std::pair<Level,string>(kDebug2    ,"kDebug2"));
00029     sTable.push_back(std::pair<Level,string>(kDebug1    ,"kDebug1"));
00030     sTable.push_back(std::pair<Level,string>(kMonitor   ,"kMonitor"));
00031     sTable.push_back(std::pair<Level,string>(kInfo      ,"kInfo"));
00032     sTable.push_back(std::pair<Level,string>(kWarning   ,"kWarning"));
00033     sTable.push_back(std::pair<Level,string>(kError     ,"kError"));
00034     sTable.push_back(std::pair<Level,string>(kFatal     ,"kFatal"));
00035     sTable.push_back(std::pair<Level,string>(kNever     ,"kNever"));
00036     sTable.push_back(std::pair<Level,string>(kDefault   ,"kDefault"));
00037     sTable.push_back(std::pair<Level,string>(kEverything,"kEverything")); 
00038     sTable.push_back(std::pair<Level,string>(kOff       ,"kOff"));
00039 
00040     // Names without a 'k;
00041     sTable.push_back(std::pair<Level,string>(kVerbose   ,"Verbose"));
00042     sTable.push_back(std::pair<Level,string>(kDebug3    ,"Debug3"));
00043     sTable.push_back(std::pair<Level,string>(kDebug2    ,"Debug2"));
00044     sTable.push_back(std::pair<Level,string>(kDebug1    ,"Debug1"));
00045     sTable.push_back(std::pair<Level,string>(kMonitor   ,"Monitor"));
00046     sTable.push_back(std::pair<Level,string>(kInfo      ,"Info"));
00047     sTable.push_back(std::pair<Level,string>(kWarning   ,"Warning"));
00048     sTable.push_back(std::pair<Level,string>(kError     ,"Error"));
00049     sTable.push_back(std::pair<Level,string>(kFatal     ,"Fatal"));
00050     sTable.push_back(std::pair<Level,string>(kNever     ,"Never"));
00051     sTable.push_back(std::pair<Level,string>(kDefault   ,"Default"));
00052     sTable.push_back(std::pair<Level,string>(kEverything,"Everything")); 
00053     sTable.push_back(std::pair<Level,string>(kOff       ,"Off"));
00054 
00055     // Short names
00056     sTable.push_back(std::pair<Level,string>(kVerbose   ,"verb"));
00057     sTable.push_back(std::pair<Level,string>(kDebug1    ,"debug"));
00058     sTable.push_back(std::pair<Level,string>(kMonitor   ,"mon"));
00059     sTable.push_back(std::pair<Level,string>(kInfo      ,"info"));
00060     sTable.push_back(std::pair<Level,string>(kWarning   ,"warn"));
00061     sTable.push_back(std::pair<Level,string>(kError     ,"err"));
00062     sTable.push_back(std::pair<Level,string>(kFatal     ,"fat"));
00063     sTable.push_back(std::pair<Level,string>(kDefault   ,"def"));
00064     sTable.push_back(std::pair<Level,string>(kDefault   ,"on"));
00065 
00066     // single letters
00067     sTable.push_back(std::pair<Level,string>(kVerbose   ,"V"));
00068     sTable.push_back(std::pair<Level,string>(kDebug1    ,"D"));
00069     sTable.push_back(std::pair<Level,string>(kMonitor   ,"M"));
00070     sTable.push_back(std::pair<Level,string>(kInfo      ,"I"));
00071     sTable.push_back(std::pair<Level,string>(kWarning   ,"W"));
00072     sTable.push_back(std::pair<Level,string>(kError     ,"E"));
00073     sTable.push_back(std::pair<Level,string>(kFatal     ,"F"));
00074   }
00075   return sTable;
00076 }

| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:06:22 2011 for Log by doxygen 1.4.7