Changeset 94:3b6e24a99a45 in rrlib_logging


Ignore:
Timestamp:
20.07.2012 13:52:17 (8 years ago)
Author:
Tobias Föhst <foehst@…>
Branch:
default
Phase:
public
Transplant:
c4450cad5315b3423f03183c79232723ae75411d
Message:

RRLIB_LOG_PRINT* macros now classify the given level themselves reducing overhead in message level specification

Files:
9 edited

Legend:

Unmodified
Added
Removed
  • configuration.cpp

    r90 r94  
    171171#endif 
    172172 
    173   RRLIB_LOG_PRINT(eLL_ERROR, "XML support not available due to missing rrlib_mca2_wrapper."); 
     173  RRLIB_LOG_PRINT(ERROR, "XML support not available due to missing rrlib_mca2_wrapper."); 
    174174  return false; 
    175175} 
     
    185185bool AddConfigurationFromXMLNode(const xml::tNode &node, const std::string &parent_name) 
    186186{ 
    187   static const std::vector<std::string> level_names = { "error", "warning", "debug_warning", "debug", "debug_verbose_1", "debug_verbose_2", "debug_verbose_3" }; 
    188   static const std::vector<std::string> sink_names = { "stdout", "stderr", "file", "combined_file" }; 
    189  
    190187  assert(node.Name() == "domain"); 
    191188 
     
    196193    if (node_name[0] != '.') 
    197194    { 
    198       RRLIB_LOG_PRINT(eLL_ERROR, "Trying to configure a log domain not below root domain"); 
     195      RRLIB_LOG_PRINT(ERROR, "Trying to configure a log domain not below root domain"); 
    199196      return false; 
    200197    } 
     
    234231  if (node.HasAttribute("max_level")) 
    235232  { 
    236     configuration.SetMaxMessageLevel(static_cast<tLogLevel>(eLL_ERROR + node.GetEnumAttribute<tLogLevel>("max_level", level_names))); 
     233    configuration.SetMaxMessageLevel(node.GetEnumAttribute<tLogLevel>("max_level")); 
    237234  } 
    238235 
     
    285282  if (node.Name() != "rrlib_logging") 
    286283  { 
    287     RRLIB_LOG_PRINT(eLL_ERROR, "Unexpected content (Not an rrlib_logging tree)"); 
     284    RRLIB_LOG_PRINT(ERROR, "Unexpected content (Not an rrlib_logging tree)"); 
    288285    return false; 
    289286  } 
     
    313310  catch (const xml::tException &exception) 
    314311  { 
    315     RRLIB_LOG_PRINT(eLL_ERROR, exception); 
     312    RRLIB_LOG_PRINT(ERROR, exception); 
    316313    return false; 
    317314  } 
  • configuration/tConfiguration.cpp

    r88 r94  
    6565//---------------------------------------------------------------------- 
    6666#ifdef RRLIB_LOGGING_LESS_OUTPUT 
    67 const bool cDEFAULT_PRINTS_NAME = false;                //!< Default prints name setting for reduced output mode 
    68 const bool cDEFAULT_PRINTS_TIME = false;                //!< Default prints time setting for reduced output mode 
    69 const bool cDEFAULT_PRINTS_LEVEL = false;               //!< Default prints level setting for reduced output mode 
    70 const bool cDEFAULT_PRINTS_LOCATION = false;            //!< Default prints location setting for reduced output mode 
    71 const tLogLevel cDEFAULT_MAX_LOG_LEVEL = eLL_WARNING;   //!< Default max log level for reduced output mode 
    72 const int cDEFAULT_SINK_MASK = 1 << eLS_STDOUT;         //!< Default output stream mask 
     67const bool cDEFAULT_PRINTS_NAME = false;                       //!< Default prints name setting for reduced output mode 
     68const bool cDEFAULT_PRINTS_TIME = false;                       //!< Default prints time setting for reduced output mode 
     69const bool cDEFAULT_PRINTS_LEVEL = false;                      //!< Default prints level setting for reduced output mode 
     70const bool cDEFAULT_PRINTS_LOCATION = false;                   //!< Default prints location setting for reduced output mode 
     71const tLogLevel cDEFAULT_MAX_LOG_LEVEL = tLogLevel::WARNING;   //!< Default max log level for reduced output mode 
     72const int cDEFAULT_SINK_MASK = 1 << eLS_STDOUT;                //!< Default output stream mask 
    7373#else 
    74 const bool cDEFAULT_PRINTS_NAME = false;                //!< Default prints name setting for normal output mode 
    75 const bool cDEFAULT_PRINTS_TIME = false;                //!< Default prints time setting for normal output mode 
    76 const bool cDEFAULT_PRINTS_LEVEL = false;               //!< Default prints level setting for normal output mode 
    77 const bool cDEFAULT_PRINTS_LOCATION = true;             //!< Default prints location setting for normal output mode 
    78 const tLogLevel cDEFAULT_MAX_LOG_LEVEL = eLL_DEBUG;     //!< Default max log level for normal output mode 
    79 const int cDEFAULT_SINK_MASK = 1 << eLS_STDOUT;         //!< Default output stream mask 
     74const bool cDEFAULT_PRINTS_NAME = false;                       //!< Default prints name setting for normal output mode 
     75const bool cDEFAULT_PRINTS_TIME = false;                       //!< Default prints time setting for normal output mode 
     76const bool cDEFAULT_PRINTS_LEVEL = false;                      //!< Default prints level setting for normal output mode 
     77const bool cDEFAULT_PRINTS_LOCATION = true;                    //!< Default prints location setting for normal output mode 
     78const tLogLevel cDEFAULT_MAX_LOG_LEVEL = tLogLevel::DEBUG;     //!< Default max log level for normal output mode 
     79const int cDEFAULT_SINK_MASK = 1 << eLS_STDOUT;                //!< Default output stream mask 
    8080#endif 
    8181 
  • log_levels.h

    r88 r94  
    5757//---------------------------------------------------------------------- 
    5858//! Enumeration type that contains the available message levels 
    59 enum tLogLevel 
     59enum class tLogLevel 
    6060{ 
    61   eLL_USER,             //!< Information for user (including end-users). Is always shown. 
    62   eLL_ERROR,            //!< Error message. Used to inform about _certain_ malfunction of application. Is always shown. 
    63   eLL_WARNING,          //!< Critical warning. Warns about possible application malfunction and invalid (and therefore discarded) user input. (default max level with RRLIB_LOGGING_LESS_OUTPUT) 
    64   eLL_DEBUG_WARNING,    //!< Debug info with warning character (e.g. "Parameter x not set - using default y") 
    65   eLL_DEBUG,            //!< Debug info about coarse program flow (default max level without RRLIB_LOGGING_LESS_OUTPUT) - information possibly relevant to developers outside of respective domain 
    66   eLL_DEBUG_VERBOSE_1,  //!< Higher detail debug info (not available in release mode) - only relevant to developers in respective domain 
    67   eLL_DEBUG_VERBOSE_2,  //!< Higher detail debug info (not available in release mode) - only relevant to developers in respective domain 
    68   eLL_DEBUG_VERBOSE_3,  //!< Higher detail debug info (not available in release mode) - only relevant to developers in respective domain 
    69   eLL_DIMENSION         //!< Endmarker and dimension of eLogLevel 
     61  USER,             //!< Information for user (including end-users). Is always shown. 
     62  ERROR,            //!< Error message. Used to inform about _certain_ malfunction of application. Is always shown. 
     63  WARNING,          //!< Critical warning. Warns about possible application malfunction and invalid (and therefore discarded) user input. (default max level with RRLIB_LOGGING_LESS_OUTPUT) 
     64  DEBUG_WARNING,    //!< Debug info with warning character (e.g. "Parameter x not set - using default y") 
     65  DEBUG,            //!< Debug info about coarse program flow (default max level without RRLIB_LOGGING_LESS_OUTPUT) - information possibly relevant to developers outside of respective domain 
     66  DEBUG_VERBOSE_1,  //!< Higher detail debug info (not available in release mode) - only relevant to developers in respective domain 
     67  DEBUG_VERBOSE_2,  //!< Higher detail debug info (not available in release mode) - only relevant to developers in respective domain 
     68  DEBUG_VERBOSE_3,  //!< Higher detail debug info (not available in release mode) - only relevant to developers in respective domain 
    7069}; 
    7170 
  • messages.h

    r88 r94  
    101101  } while(0) \ 
    102102      
     103#define __EXPAND_LEVEL__(level) rrlib::logging::tLogLevel::level 
     104 
    103105//---------------------------------------------------------------------- 
    104106// The macro interface to the logging library 
     
    114116  do \ 
    115117  { \ 
    116     if ((level) <= rrlib::logging::eLL_DEBUG) \ 
    117     { \ 
    118       __RRLIB_LOG_PRINT__(rrlib::logging::GetConfiguration(__FILE__), level, args); \ 
     118    if ((__EXPAND_LEVEL__(level)) <= rrlib::logging::tLogLevel::DEBUG) \ 
     119    { \ 
     120      __RRLIB_LOG_PRINT__(rrlib::logging::GetConfiguration(__FILE__), __EXPAND_LEVEL__(level), args); \ 
    119121    } \ 
    120122  } while (0) \ 
     
    129131  do \ 
    130132  { \ 
    131     if ((level) <= rrlib::logging::eLL_DEBUG) \ 
    132     { \ 
    133       __RRLIB_LOG_PRINT__(rrlib::logging::GetConfiguration(__FILE__, #domain), level, args); \ 
     133    if ((__EXPAND_LEVEL__(level)) <= rrlib::logging::tLogLevel::DEBUG) \ 
     134    { \ 
     135      __RRLIB_LOG_PRINT__(rrlib::logging::GetConfiguration(__FILE__, #domain), __EXPAND_LEVEL__(level), args); \ 
    134136    } \ 
    135137  } while (0) \ 
     
    143145  do \ 
    144146  { \ 
    145     if ((level) <= rrlib::logging::eLL_DEBUG) \ 
    146     { \ 
    147       __RRLIB_LOG_PRINT_STATIC__(rrlib::logging::GetConfiguration(__FILE__), level, args); \ 
     147    if ((__EXPAND_LEVEL__(level)) <= rrlib::logging::tLogLevel::DEBUG) \ 
     148    { \ 
     149      __RRLIB_LOG_PRINT_STATIC__(rrlib::logging::GetConfiguration(__FILE__), __EXPAND_LEVEL__(level), args); \ 
    148150    } \ 
    149151  } while (0) \ 
     
    158160  do \ 
    159161  { \ 
    160     if ((level) <= rrlib::logging::eLL_DEBUG) \ 
    161     { \ 
    162       __RRLIB_LOG_PRINT_STATIC__(rrlib::logging::GetConfiguration(__FILE__, #domain), level, args); \ 
     162    if ((__EXPAND_LEVEL__(level)) <= rrlib::logging::tLogLevel::DEBUG) \ 
     163    { \ 
     164      __RRLIB_LOG_PRINT_STATIC__(rrlib::logging::GetConfiguration(__FILE__, #domain), __EXPAND_LEVEL__(level), args); \ 
    163165    } \ 
    164166  } while (0) \ 
     
    172174  do \ 
    173175  { \ 
    174     if ((level) <= rrlib::logging::eLL_DEBUG) \ 
    175     { \ 
    176       __RRLIB_LOG_PRINTF__(rrlib::logging::GetConfiguration(__FILE__), level, args); \ 
     176    if ((__EXPAND_LEVEL__(level)) <= rrlib::logging::tLogLevel::DEBUG) \ 
     177    { \ 
     178      __RRLIB_LOG_PRINTF__(rrlib::logging::GetConfiguration(__FILE__), __EXPAND_LEVEL__(level), args); \ 
    177179    } \ 
    178180  } while (0) \ 
     
    187189  do \ 
    188190  { \ 
    189     if ((level) <= rrlib::logging::eLL_DEBUG) \ 
    190     { \ 
    191       __RRLIB_LOG_PRINTF__(rrlib::logging::GetConfiguration(__FILE__, #domain), level, args); \ 
     191    if ((__EXPAND_LEVEL__(level)) <= rrlib::logging::tLogLevel::DEBUG) \ 
     192    { \ 
     193      __RRLIB_LOG_PRINTF__(rrlib::logging::GetConfiguration(__FILE__, #domain), __EXPAND_LEVEL__(level), args); \ 
    192194    } \ 
    193195  } while (0) \ 
     
    201203  do \ 
    202204  { \ 
    203     if ((level) <= rrlib::logging::eLL_DEBUG) \ 
    204     { \ 
    205       __RRLIB_LOG_PRINTF_STATIC__(rrlib::logging::GetConfiguration(__FILE__), level, args); \ 
     205    if ((__EXPAND_LEVEL__(level)) <= rrlib::logging::tLogLevel::DEBUG) \ 
     206    { \ 
     207      __RRLIB_LOG_PRINTF_STATIC__(rrlib::logging::GetConfiguration(__FILE__), __EXPAND_LEVEL__(level), args); \ 
    206208    } \ 
    207209  } while (0) \ 
     
    216218  do \ 
    217219  { \ 
    218     if ((level) <= rrlib::logging::eLL_DEBUG) \ 
    219     { \ 
    220       __RRLIB_LOG_PRINTF_STATIC__(rrlib::logging::GetConfiguration(__FILE__, #domain), level, args); \ 
     220    if ((__EXPAND_LEVEL__(level)) <= rrlib::logging::tLogLevel::DEBUG) \ 
     221    { \ 
     222      __RRLIB_LOG_PRINTF_STATIC__(rrlib::logging::GetConfiguration(__FILE__, #domain), __EXPAND_LEVEL__(level), args); \ 
    221223    } \ 
    222224  } while (0) \ 
     
    230232 */ 
    231233#define RRLIB_LOG_PRINT(level, args...) \ 
    232   __RRLIB_LOG_PRINT__(rrlib::logging::GetConfiguration(__FILE__), level, args) \ 
     234  __RRLIB_LOG_PRINT__(rrlib::logging::GetConfiguration(__FILE__), __EXPAND_LEVEL__(level), args) \ 
    233235    
    234236/*! Macro to print messages to explicitly specified domain using stream semantics 
     
    239241 */ 
    240242#define RRLIB_LOG_PRINT_TO(domain, level, args...) \ 
    241   __RRLIB_LOG_PRINT__(rrlib::logging::GetConfiguration(__FILE__, #domain), level, args) \ 
     243  __RRLIB_LOG_PRINT__(rrlib::logging::GetConfiguration(__FILE__, #domain), __EXPAND_LEVEL__(level), args) \ 
    242244    
    243245/*! Macro to print messages using stream semantics static context 
     
    247249 */ 
    248250#define RRLIB_LOG_PRINT_STATIC(level, args...) \ 
    249   __RRLIB_LOG_PRINT_STATIC__(rrlib::logging::GetConfiguration(__FILE__), level, args) \ 
     251  __RRLIB_LOG_PRINT_STATIC__(rrlib::logging::GetConfiguration(__FILE__), __EXPAND_LEVEL__(level), args) \ 
    250252    
    251253/*! Macro to print messages to explicitly specified using stream semantics static context 
     
    256258 */ 
    257259#define RRLIB_LOG_PRINT_STATIC_TO(domain, level, args...) \ 
    258   __RRLIB_LOG_PRINT_STATIC__(rrlib::logging::GetConfiguration(__FILE__, #domain), level, args) \ 
     260  __RRLIB_LOG_PRINT_STATIC__(rrlib::logging::GetConfiguration(__FILE__, #domain), __EXPAND_LEVEL__(level), args) \ 
    259261    
    260262/*! Macro to print messages using printf semantics 
     
    264266 */ 
    265267#define RRLIB_LOG_PRINTF(level, args...) \ 
    266   __RRLIB_LOG_PRINTF__(rrlib::logging::GetConfiguration(__FILE__), level, args) \ 
     268  __RRLIB_LOG_PRINTF__(rrlib::logging::GetConfiguration(__FILE__), __EXPAND_LEVEL__(level), args) \ 
    267269    
    268270/*! Macro to print messages to explicitly specified using printf semantics 
     
    273275 */ 
    274276#define RRLIB_LOG_PRINTF_TO(domain, level, args...) \ 
    275   __RRLIB_LOG_PRINTF__(rrlib::logging::GetConfiguration(__FILE__, #domain), level, args) \ 
     277  __RRLIB_LOG_PRINTF__(rrlib::logging::GetConfiguration(__FILE__, #domain), __EXPAND_LEVEL__(level), args) \ 
    276278    
    277279/*! Macro to print messages using printf semantics from static context 
     
    281283 */ 
    282284#define RRLIB_LOG_PRINTF_STATIC(level, args...) \ 
    283   __RRLIB_LOG_PRINTF_STATIC__(rrlib::logging::GetConfiguration(__FILE__), level, args) \ 
     285  __RRLIB_LOG_PRINTF_STATIC__(rrlib::logging::GetConfiguration(__FILE__), __EXPAND_LEVEL__(level), args) \ 
    284286    
    285287/*! Macro to print messages to explicitly specified using printf semantics from static context 
     
    290292 */ 
    291293#define RRLIB_LOG_PRINTF_STATIC_TO(domain, level, args...) \ 
    292   __RRLIB_LOG_PRINTF_STATIC__(rrlib::logging::GetConfiguration(__FILE__, #domain), level, args) \ 
     294  __RRLIB_LOG_PRINTF_STATIC__(rrlib::logging::GetConfiguration(__FILE__, #domain), __EXPAND_LEVEL__(level), args) \ 
    293295    
    294296#endif 
  • messages/implementation.cpp

    r74 r94  
    9999  switch (level) 
    100100  { 
    101   case eLL_ERROR: 
     101  case tLogLevel::ERROR: 
    102102    stream_buffer.SetColor(eSBE_BOLD, eSBC_RED); 
    103103    break; 
    104   case eLL_WARNING: 
     104  case tLogLevel::WARNING: 
    105105    stream_buffer.SetColor(eSBE_BOLD, eSBC_BLUE); 
    106106    break; 
    107   case eLL_DEBUG_WARNING: 
     107  case tLogLevel::DEBUG_WARNING: 
    108108    stream_buffer.SetColor(eSBE_DARK, eSBC_YELLOW); 
    109109    break; 
    110   case eLL_DEBUG: 
     110  case tLogLevel::DEBUG: 
    111111    stream_buffer.SetColor(eSBE_DARK, eSBC_GREEN); 
    112112    break; 
    113   case eLL_DEBUG_VERBOSE_1: 
     113  case tLogLevel::DEBUG_VERBOSE_1: 
    114114    stream_buffer.SetColor(eSBE_REGULAR, eSBC_CYAN); 
    115115    break; 
    116   case eLL_DEBUG_VERBOSE_2: 
     116  case tLogLevel::DEBUG_VERBOSE_2: 
    117117    stream_buffer.SetColor(eSBE_REGULAR, eSBC_CYAN); 
    118118    break; 
    119   case eLL_DEBUG_VERBOSE_3: 
     119  case tLogLevel::DEBUG_VERBOSE_3: 
    120120    stream_buffer.SetColor(eSBE_REGULAR, eSBC_CYAN); 
    121121    break; 
     
    143143  switch (level) 
    144144  { 
    145   case eLL_ERROR: 
     145  case tLogLevel::ERROR: 
    146146    level_name = "[error]"; 
    147147    break; 
    148   case eLL_WARNING: 
     148  case tLogLevel::WARNING: 
    149149    level_name = "[warning]"; 
    150150    break; 
    151   case eLL_DEBUG_WARNING: 
     151  case tLogLevel::DEBUG_WARNING: 
    152152    level_name = "[debug]"; 
    153153    break; 
    154   case eLL_DEBUG: 
     154  case tLogLevel::DEBUG: 
    155155    level_name = "[debug]"; 
    156156    break; 
    157   case eLL_DEBUG_VERBOSE_1: 
     157  case tLogLevel::DEBUG_VERBOSE_1: 
    158158    level_name = "[verbose]"; 
    159159    break; 
    160   case eLL_DEBUG_VERBOSE_2: 
     160  case tLogLevel::DEBUG_VERBOSE_2: 
    161161    level_name = "[verbose]"; 
    162162    break; 
    163   case eLL_DEBUG_VERBOSE_3: 
     163  case tLogLevel::DEBUG_VERBOSE_3: 
    164164    level_name = "[verbose]"; 
    165165    break; 
  • messages/implementation.h

    r88 r94  
    103103  domain_configuration.StreamBuffer().InitializeMultiLinePadding(); 
    104104 
    105   if (level != eLL_USER) 
     105  if (level != tLogLevel::USER) 
    106106  { 
    107107 
     
    139139    switch (level) 
    140140    { 
    141     case eLL_ERROR: 
     141    case tLogLevel::ERROR: 
    142142      stream << "ERROR: "; 
    143143      break; 
    144     case eLL_WARNING: 
    145     case eLL_DEBUG_WARNING: 
     144    case tLogLevel::WARNING: 
     145    case tLogLevel::DEBUG_WARNING: 
    146146      stream << "WARNING: "; 
    147147      break; 
  • test/libA/libA.h

    r68 r94  
    88void Test() 
    99{ 
    10   RRLIB_LOG_PRINT(rrlib::logging::eLL_DEBUG, "Test in libA"); 
     10  RRLIB_LOG_PRINT(DEBUG, "Test in libA"); 
    1111} 
    1212} 
  • test/libB/libB.h

    r68 r94  
    88void Test() 
    99{ 
    10   RRLIB_LOG_PRINT(rrlib::logging::eLL_USER, "Test in libB"); 
     10  RRLIB_LOG_PRINT(USER, "Test in libB"); 
    1111} 
    1212} 
  • test/test_messages.cpp

    r90 r94  
    8181  static void function() 
    8282  { 
    83     RRLIB_LOG_PRINT_TO(my_domain, rrlib::logging::eLL_DEBUG_WARNING, "this ", "is a ", "local class test"); 
     83    RRLIB_LOG_PRINT_TO(my_domain, DEBUG_WARNING, "this ", "is a ", "local class test"); 
    8484 
    85     RRLIB_LOG_PRINT(rrlib::logging::eLL_WARNING, "foo"); 
    86     RRLIB_LOG_PRINT_TO(my_domain, rrlib::logging::eLL_ERROR, "foo2"); 
     85    RRLIB_LOG_PRINT(WARNING, "foo"); 
     86    RRLIB_LOG_PRINT_TO(my_domain, ERROR, "foo2"); 
    8787    if (true) 
    8888    { 
    89       RRLIB_LOG_PRINTF_TO(my_domain, rrlib::logging::eLL_DEBUG, "%s\n", "FOO"); 
     89      RRLIB_LOG_PRINTF_TO(my_domain, DEBUG, "%s\n", "FOO"); 
    9090    } 
    9191  } 
     
    103103  static void StaticMethod() 
    104104  { 
    105     RRLIB_LOG_PRINT_STATIC(rrlib::logging::eLL_USER, "From static method"); 
     105    RRLIB_LOG_PRINT_STATIC(USER, "From static method"); 
    106106  } 
    107107 
    108108  void NonStaticMethod() 
    109109  { 
    110     RRLIB_LOG_PRINT(rrlib::logging::eLL_USER, "From non-static method"); 
     110    RRLIB_LOG_PRINT(USER, "From non-static method"); 
    111111  } 
    112112}; 
     
    121121  if (!rrlib::logging::ConfigureFromFile("logging_config.xml")) 
    122122  { 
    123     RRLIB_LOG_PRINT(rrlib::logging::eLL_ERROR, "Loading configuration failed!"); 
     123    RRLIB_LOG_PRINT(ERROR, "Loading configuration failed!"); 
    124124    return EXIT_FAILURE; 
    125125  } 
     
    132132//  rrlib::logging::SetDomainPrintsLevel(".", true); 
    133133//  rrlib::logging::SetDomainPrintsLocation(".", true); 
    134 //  rrlib::logging::SetDomainMaxMessageLevel(".", rrlib::logging::eLL_DEBUG_VERBOSE_3); 
     134//  rrlib::logging::SetDomainMaxMessageLevel(".", DEBUG_VERBOSE_3); 
    135135//  rrlib::logging::SetDomainSink(".", rrlib::logging::eLS_FILE); 
    136136 
    137   rrlib::logging::SetDomainMaxMessageLevel(".example", rrlib::logging::eLL_DEBUG_VERBOSE_3); 
     137  rrlib::logging::SetDomainMaxMessageLevel(".example", rrlib::logging::tLogLevel::DEBUG_VERBOSE_3); 
    138138//  rrlib::logging::SetDomainSink(".example", rrlib::logging::eLS_STDOUT, rrlib::logging::eLS_FILE_SUBTREE); 
    139139 
    140   RRLIB_LOG_PRINT(rrlib::logging::eLL_WARNING, "foo"); 
     140  RRLIB_LOG_PRINT(WARNING, "foo"); 
    141141 
    142142  libA::Test(); 
     
    147147  std::runtime_error exception("runtime_error"); 
    148148  std::exception &e(exception); 
    149   RRLIB_LOG_PRINT(rrlib::logging::eLL_ERROR, e); 
     149  RRLIB_LOG_PRINT(ERROR, e); 
    150150 
    151   RRLIB_LOG_PRINT(rrlib::logging::eLL_WARNING, "0x", std::setw(20), std::setfill('0'), std::hex, 324); 
     151  RRLIB_LOG_PRINT(WARNING, "0x", std::setw(20), std::setfill('0'), std::hex, 324); 
    152152 
    153   RRLIB_LOG_PRINT(rrlib::logging::eLL_ERROR, "Das hier ist ein mehrzeiliger\nFehler."); 
    154   RRLIB_LOG_PRINT(rrlib::logging::eLL_USER, "Und das hier ein mehrzeiliger\nText fuer den lieben Benutzer."); 
     153  RRLIB_LOG_PRINT(ERROR, "Das hier ist ein mehrzeiliger\nFehler."); 
     154  RRLIB_LOG_PRINT(USER, "Und das hier ein mehrzeiliger\nText fuer den lieben Benutzer."); 
    155155 
    156156  const char* texts[] = {"Dies", "ist", "ein", "kleiner", "Text."}; 
    157   RRLIB_LOG_PRINT(rrlib::logging::eLL_DEBUG, rrlib::util::Join(texts, texts + 5, " ")); 
     157  RRLIB_LOG_PRINT(DEBUG, rrlib::util::Join(texts, texts + 5, " ")); 
    158158 
    159159  TestStatic test_static; 
     
    163163  int *a = 0; 
    164164  const int *b = 0; 
    165   RRLIB_LOG_PRINT(rrlib::logging::eLL_DEBUG, "Pointer: ", a); 
    166   RRLIB_LOG_PRINT(rrlib::logging::eLL_DEBUG, "Const-Pointer: ", b); 
    167   RRLIB_LOG_PRINT(rrlib::logging::eLL_DEBUG, "Bool: ", true, false); 
    168   RRLIB_LOG_PRINT(rrlib::logging::eLL_DEBUG, "Function: ", main); 
    169   RRLIB_LOG_PRINT(rrlib::logging::eLL_DEBUG, "Mal noch einzelne Zeichen: ", 'a', '\0', 'b'); 
     165  RRLIB_LOG_PRINT(DEBUG, "Pointer: ", a); 
     166  RRLIB_LOG_PRINT(DEBUG, "Const-Pointer: ", b); 
     167  RRLIB_LOG_PRINT(DEBUG, "Bool: ", true, false); 
     168  RRLIB_LOG_PRINT(DEBUG, "Function: ", main); 
     169  RRLIB_LOG_PRINT(DEBUG, "Mal noch einzelne Zeichen: ", 'a', '\0', 'b'); 
    170170 
    171171  rrlib::logging::PrintDomainConfigurations(); 
Note: See TracChangeset for help on using the changeset viewer.