libzypp  13.10.6
ZYPP_BASE_LOGGER_MACROS

Convenience macros for logging. More...

Macros

#define ZYPP_BASE_LOGGER_LOGGROUP   "DEFINE_LOGGROUP"
 Default log group if undefined. More...
 
#define XXX   _XXX( ZYPP_BASE_LOGGER_LOGGROUP )
 
#define DBG   _DBG( ZYPP_BASE_LOGGER_LOGGROUP )
 
#define MIL   _MIL( ZYPP_BASE_LOGGER_LOGGROUP )
 
#define WAR   _WAR( ZYPP_BASE_LOGGER_LOGGROUP )
 
#define ERR   _ERR( ZYPP_BASE_LOGGER_LOGGROUP )
 
#define SEC   _SEC( ZYPP_BASE_LOGGER_LOGGROUP )
 
#define INT   _INT( ZYPP_BASE_LOGGER_LOGGROUP )
 
#define USR   _USR( ZYPP_BASE_LOGGER_LOGGROUP )
 
#define _XXX(GROUP)   ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_XXX )
 
#define _DBG(GROUP)   ZYPP_BASE_LOGGER_LOG( GROUP"++", zypp::base::logger::E_MIL )
 
#define _MIL(GROUP)   ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_MIL )
 
#define _WAR(GROUP)   ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_WAR )
 
#define _ERR(GROUP)   ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_ERR )
 
#define _SEC(GROUP)   ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_SEC )
 
#define _INT(GROUP)   ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_INT )
 
#define _USR(GROUP)   ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_USR )
 
#define _BASEFILE   ( *__FILE__ == '/' ? strrchr( __FILE__, '/' ) + 1 : __FILE__ )
 
#define ZYPP_BASE_LOGGER_LOG(GROUP, LEVEL)   zypp::base::logger::getStream( GROUP, LEVEL, _BASEFILE, __FUNCTION__, __LINE__ )
 Actual call to getStream. More...
 

Detailed Description

Convenience macros for logging.

The macros finaly call getStream, providing appropriate arguments, to return the log stream.

* _DBG("foo") << ....
*

Logs a debug message for group "foo".

*
* DBG << ....
*

Defines group "foo" as default for log messages and logs a debug message.

Macro Definition Documentation

#define ZYPP_BASE_LOGGER_LOGGROUP   "DEFINE_LOGGROUP"

Default log group if undefined.

Definition at line 42 of file Logger.h.

#define XXX   _XXX( ZYPP_BASE_LOGGER_LOGGROUP )

Definition at line 45 of file Logger.h.

#define DBG   _DBG( ZYPP_BASE_LOGGER_LOGGROUP )

Definition at line 46 of file Logger.h.

#define MIL   _MIL( ZYPP_BASE_LOGGER_LOGGROUP )

Definition at line 47 of file Logger.h.

#define WAR   _WAR( ZYPP_BASE_LOGGER_LOGGROUP )

Definition at line 48 of file Logger.h.

#define ERR   _ERR( ZYPP_BASE_LOGGER_LOGGROUP )

Definition at line 49 of file Logger.h.

#define SEC   _SEC( ZYPP_BASE_LOGGER_LOGGROUP )

Definition at line 50 of file Logger.h.

#define INT   _INT( ZYPP_BASE_LOGGER_LOGGROUP )

Definition at line 51 of file Logger.h.

#define USR   _USR( ZYPP_BASE_LOGGER_LOGGROUP )

Definition at line 52 of file Logger.h.

#define _XXX (   GROUP)    ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_XXX )

Definition at line 54 of file Logger.h.

#define _DBG (   GROUP)    ZYPP_BASE_LOGGER_LOG( GROUP"++", zypp::base::logger::E_MIL )

Definition at line 55 of file Logger.h.

#define _MIL (   GROUP)    ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_MIL )

Definition at line 56 of file Logger.h.

#define _WAR (   GROUP)    ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_WAR )

Definition at line 57 of file Logger.h.

#define _ERR (   GROUP)    ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_ERR )

Definition at line 58 of file Logger.h.

#define _SEC (   GROUP)    ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_SEC )

Definition at line 59 of file Logger.h.

#define _INT (   GROUP)    ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_INT )

Definition at line 60 of file Logger.h.

#define _USR (   GROUP)    ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_USR )

Definition at line 61 of file Logger.h.

#define _BASEFILE   ( *__FILE__ == '/' ? strrchr( __FILE__, '/' ) + 1 : __FILE__ )

Definition at line 63 of file Logger.h.

#define ZYPP_BASE_LOGGER_LOG (   GROUP,
  LEVEL 
)    zypp::base::logger::getStream( GROUP, LEVEL, _BASEFILE, __FUNCTION__, __LINE__ )

Actual call to getStream.

Definition at line 66 of file Logger.h.