SMLogMono.cpp

Example showing log messages in all levels. Should be installed as ui-utilcpp-smlogmono along with the library.

// Local configuration
#include "config.h"
// C++ Libraries
#include <ui-utilcpp/SMLogMono.hpp>
int main()
{
// configure syslog
UI::Util::SysLogMonoSingleton logger("ui-utilcpp_smlogmono", LOG_PERROR, LOG_USER);
SM_LOGEMERG("EMERG log");
SM_LOGALERT("ALERT log");
SM_LOGCRIT("CRIT log");
SM_LOGERR("ERR log");
SM_LOGWARNING("WARNING log");
SM_LOGNOTICE("NOTICE log");
SM_LOGINFO("INFO log");
SM_LOGDEBUG("DEBUG log");
}
SMLogMono.hpp
Syslog Macro Log: Simple logging based on compiler macros and syslog(3) for mono-threaded aplications...
SM_LOGWARNING
#define SM_LOGWARNING(x)
Macro for syslog(3) level WARNING.
Definition SMLog.hpp:122
SM_LOGDEBUG
#define SM_LOGDEBUG(x)
Macro for syslog(3) level DEBUG.
Definition SMLog.hpp:143
SM_LOGALERT
#define SM_LOGALERT(x)
Macro for syslog(3) level ALERT.
Definition SMLog.hpp:101
SM_LOGEMERG
#define SM_LOGEMERG(x)
Macro for syslog(3) level EMERG.
Definition SMLog.hpp:94
SM_LOGCRIT
#define SM_LOGCRIT(x)
Macro for syslog(3) level CRIT.
Definition SMLog.hpp:108
SM_LOGINFO
#define SM_LOGINFO(x)
Macro for syslog(3) level INFO.
Definition SMLog.hpp:136
SM_LOGNOTICE
#define SM_LOGNOTICE(x)
Macro for syslog(3) level NOTICE.
Definition SMLog.hpp:129
SM_LOGERR
#define SM_LOGERR(x)
Macro for syslog(3) level ERR.
Definition SMLog.hpp:115
UI::Util::SysLogMonoSingleton
Singleton class holding one SysLogMono object.
Definition SysLogMono.hpp:55