libzypp  17.5.0
Logger.h File Reference
#include <cstring>
#include <iosfwd>
#include <string>
Include dependency graph for Logger.h:

Go to the source code of this file.

Namespaces

 zypp
 Easy-to use interface to the ZYPP dependency resolver.
 
 zypp::debug
 
 zypp::base
 
 zypp::base::logger
 

Macros

#define OSDLOG(MSG)   ::zypp::debug::osdlog( MSG, 0 )
 
#define OSMLOG(L, MSG)   ::zypp::debug::osdlog( MSG, L )
 
#define ZYPP_BASE_LOGGER_LOGGROUP   "DEFINE_LOGGROUP"
 Default log group if undefined. More...
 
#define XXX   L_XXX( ZYPP_BASE_LOGGER_LOGGROUP )
 
#define DBG   L_DBG( ZYPP_BASE_LOGGER_LOGGROUP )
 
#define MIL   L_MIL( ZYPP_BASE_LOGGER_LOGGROUP )
 
#define WAR   L_WAR( ZYPP_BASE_LOGGER_LOGGROUP )
 
#define ERR   L_ERR( ZYPP_BASE_LOGGER_LOGGROUP )
 
#define SEC   L_SEC( ZYPP_BASE_LOGGER_LOGGROUP )
 
#define INT   L_INT( ZYPP_BASE_LOGGER_LOGGROUP )
 
#define USR   L_USR( ZYPP_BASE_LOGGER_LOGGROUP )
 
#define L_XXX(GROUP)   ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_XXX )
 
#define L_DBG(GROUP)   ZYPP_BASE_LOGGER_LOG( GROUP"++", zypp::base::logger::E_MIL )
 
#define L_MIL(GROUP)   ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_MIL )
 
#define L_WAR(GROUP)   ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_WAR )
 
#define L_ERR(GROUP)   ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_ERR )
 
#define L_SEC(GROUP)   ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_SEC )
 
#define L_INT(GROUP)   ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_INT )
 
#define L_USR(GROUP)   ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_USR )
 
#define L_BASEFILE   ( *__FILE__ == '/' ? strrchr( __FILE__, '/' ) + 1 : __FILE__ )
 
#define ZYPP_BASE_LOGGER_LOG(GROUP, LEVEL)   zypp::base::logger::getStream( GROUP, LEVEL, L_BASEFILE, __FUNCTION__, __LINE__ )
 Actual call to getStream. More...
 

Enumerations

enum  zypp::base::logger::LogLevel {
  zypp::base::logger::E_XXX = 999, zypp::base::logger::E_DBG = 0, zypp::base::logger::E_MIL, zypp::base::logger::E_WAR,
  zypp::base::logger::E_ERR, zypp::base::logger::E_SEC, zypp::base::logger::E_INT, zypp::base::logger::E_USR
}
 Definition of log levels. More...
 

Functions

void zypp::debug::osdlog (const std::string &msg_r, unsigned level_r)
 
std::ostream & zypp::base::logger::getStream (const char *group_r, LogLevel level_r, const char *file_r, const char *func_r, const int line_r)
 Return a log stream to write on. More...
 
bool zypp::base::logger::isExcessive ()
 

Macro Definition Documentation

◆ OSDLOG

#define OSDLOG (   MSG)    ::zypp::debug::osdlog( MSG, 0 )

Definition at line 30 of file Logger.h.

◆ OSMLOG

#define OSMLOG (   L,
  MSG 
)    ::zypp::debug::osdlog( MSG, L )

Definition at line 31 of file Logger.h.