Changeset 84:145152bbf19e in rrlib_logging


Ignore:
Timestamp:
18.01.2012 21:34:52 (8 years ago)
Author:
Tobias Föhst <foehst@…>
Branch:
default
Phase:
public
Transplant:
e4293795f40318e59007405a0b67bd6d538276fc
Message:

Fixed macros for release mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • messages.h

    r83 r84  
    7373    } \ 
    7474  } while(0) \ 
    75  
     75      
    7676#define __RRLIB_LOG_PRINT_STATIC__(domain, level, args...) \ 
    7777  do \ 
     
    8282    } \ 
    8383  } while(0) \ 
    84  
     84      
    8585#define __RRLIB_LOG_PRINTF__(domain, level, args...) \ 
    8686  do \ 
    8787  { \ 
    8888    if ((level) <= domain.MaxMessageLevel()) \ 
    89         { \ 
     89    { \ 
    9090      rrlib::logging::PrintFormatted(domain, GetLogDescription(), __FUNCTION__, __FILE__, __LINE__, level, args); \ 
    9191    } \ 
    9292  } while(0) \ 
    93  
     93      
    9494#define __RRLIB_LOG_PRINTF_STATIC__(domain, level, args...) \ 
    9595  do \ 
     
    100100    } \ 
    101101  } while(0) \ 
    102  
     102      
    103103//---------------------------------------------------------------------- 
    104104// The macro interface to the logging library 
     
    116116    if ((level) <= rrlib::logging::eLL_DEBUG) \ 
    117117    { \ 
    118       __RRLIB_LOG_PRINT__(rrlib::logging::GetConfiguration(__FILE__), level, args) \ 
    119     } \ 
    120   } while (0) \ 
    121  
     118      __RRLIB_LOG_PRINT__(rrlib::logging::GetConfiguration(__FILE__), level, args); \ 
     119    } \ 
     120  } while (0) \ 
     121      
    122122/*! Macro to print messages to explicitly specified domain using stream semantics 
    123123 * 
     
    131131    if ((level) <= rrlib::logging::eLL_DEBUG) \ 
    132132    { \ 
    133       __RRLIB_LOG_PRINT__(rrlib::logging::GetConfiguration(__FILE__, #domain), level, args) \ 
    134     } \ 
    135   } while (0) \ 
    136  
     133      __RRLIB_LOG_PRINT__(rrlib::logging::GetConfiguration(__FILE__, #domain), level, args); \ 
     134    } \ 
     135  } while (0) \ 
     136      
    137137/*! Macro to print messages using stream semantics from static context 
    138138 * 
     
    145145    if ((level) <= rrlib::logging::eLL_DEBUG) \ 
    146146    { \ 
    147       __RRLIB_LOG_PRINT_STATIC__(rrlib::logging::GetConfiguration(__FILE__), level, args) \ 
    148     } \ 
    149   } while (0) \ 
    150  
     147      __RRLIB_LOG_PRINT_STATIC__(rrlib::logging::GetConfiguration(__FILE__), level, args); \ 
     148    } \ 
     149  } while (0) \ 
     150      
    151151/*! Macro to print messages to explicitly specified domain using stream semantics from static context 
    152152 * 
     
    160160    if ((level) <= rrlib::logging::eLL_DEBUG) \ 
    161161    { \ 
    162       __RRLIB_LOG_PRINT_STATIC__(rrlib::logging::GetConfiguration(__FILE__, #domain), level, args) \ 
    163     } \ 
    164   } while (0) \ 
    165  
     162      __RRLIB_LOG_PRINT_STATIC__(rrlib::logging::GetConfiguration(__FILE__, #domain), level, args); \ 
     163    } \ 
     164  } while (0) \ 
     165      
    166166/*! Macro to print messages using printf semantics 
    167167 * 
     
    174174    if ((level) <= rrlib::logging::eLL_DEBUG) \ 
    175175    { \ 
    176       __RRLIB_LOG_PRINTF__(rrlib::logging::GetConfiguration(__FILE__), level, args) \ 
    177     } \ 
    178   } while (0) \ 
    179  
     176      __RRLIB_LOG_PRINTF__(rrlib::logging::GetConfiguration(__FILE__), level, args); \ 
     177    } \ 
     178  } while (0) \ 
     179      
    180180/*! Macro to print messages to explicitly specified domain using printf semantics 
    181181 * 
     
    189189    if ((level) <= rrlib::logging::eLL_DEBUG) \ 
    190190    { \ 
    191       __RRLIB_LOG_PRINTF__(rrlib::logging::GetConfiguration(__FILE__, #domain), level, args) \ 
    192     } \ 
    193   } while (0) \ 
    194  
     191      __RRLIB_LOG_PRINTF__(rrlib::logging::GetConfiguration(__FILE__, #domain), level, args); \ 
     192    } \ 
     193  } while (0) \ 
     194      
    195195/*! Macro to print messages using printf semantics from static context 
    196196 * 
     
    203203    if ((level) <= rrlib::logging::eLL_DEBUG) \ 
    204204    { \ 
    205       __RRLIB_LOG_PRINTF_STATIC__(rrlib::logging::GetConfiguration(__FILE__), level, args) \ 
    206     } \ 
    207   } while (0) \ 
    208  
     205      __RRLIB_LOG_PRINTF_STATIC__(rrlib::logging::GetConfiguration(__FILE__), level, args); \ 
     206    } \ 
     207  } while (0) \ 
     208      
    209209/*! Macro to print messages to explicitly specified domain using printf semantics from static context 
    210210 * 
     
    218218    if ((level) <= rrlib::logging::eLL_DEBUG) \ 
    219219    { \ 
    220       __RRLIB_LOG_PRINTF_STATIC__(rrlib::logging::GetConfiguration(__FILE__, #domain), level, args) \ 
    221     } \ 
    222   } while (0) \ 
    223  
     220      __RRLIB_LOG_PRINTF_STATIC__(rrlib::logging::GetConfiguration(__FILE__, #domain), level, args); \ 
     221    } \ 
     222  } while (0) \ 
     223      
    224224#else 
    225225 
     
    231231#define RRLIB_LOG_PRINT(level, args...) \ 
    232232  __RRLIB_LOG_PRINT__(rrlib::logging::GetConfiguration(__FILE__), level, args) \ 
    233  
     233    
    234234/*! Macro to print messages to explicitly specified domain using stream semantics 
    235235 * 
     
    240240#define RRLIB_LOG_PRINT_TO(domain, level, args...) \ 
    241241  __RRLIB_LOG_PRINT__(rrlib::logging::GetConfiguration(__FILE__, #domain), level, args) \ 
    242  
     242    
    243243/*! Macro to print messages using stream semantics static context 
    244244 * 
     
    248248#define RRLIB_LOG_PRINT_STATIC(level, args...) \ 
    249249  __RRLIB_LOG_PRINT_STATIC__(rrlib::logging::GetConfiguration(__FILE__), level, args) \ 
    250  
     250    
    251251/*! Macro to print messages to explicitly specified using stream semantics static context 
    252252 * 
     
    257257#define RRLIB_LOG_PRINT_STATIC_TO(domain, level, args...) \ 
    258258  __RRLIB_LOG_PRINT_STATIC__(rrlib::logging::GetConfiguration(__FILE__, #domain), level, args) \ 
    259  
     259    
    260260/*! Macro to print messages using printf semantics 
    261261 * 
     
    265265#define RRLIB_LOG_PRINTF(level, args...) \ 
    266266  __RRLIB_LOG_PRINTF__(rrlib::logging::GetConfiguration(__FILE__), level, args) \ 
    267  
     267    
    268268/*! Macro to print messages to explicitly specified using printf semantics 
    269269 * 
     
    274274#define RRLIB_LOG_PRINTF_TO(domain, level, args...) \ 
    275275  __RRLIB_LOG_PRINTF__(rrlib::logging::GetConfiguration(__FILE__, #domain), level, args) \ 
    276  
     276    
    277277/*! Macro to print messages using printf semantics from static context 
    278278 * 
     
    282282#define RRLIB_LOG_PRINTF_STATIC(level, args...) \ 
    283283  __RRLIB_LOG_PRINTF_STATIC__(rrlib::logging::GetConfiguration(__FILE__), level, args) \ 
    284  
     284    
    285285/*! Macro to print messages to explicitly specified using printf semantics from static context 
    286286 * 
     
    291291#define RRLIB_LOG_PRINTF_STATIC_TO(domain, level, args...) \ 
    292292  __RRLIB_LOG_PRINTF_STATIC__(rrlib::logging::GetConfiguration(__FILE__, #domain), level, args) \ 
    293  
     293    
    294294#endif 
    295295 
Note: See TracChangeset for help on using the changeset viewer.