libDwm-0.6.0
DwmSysLogger.hh File Reference

Dwm::SysLogger class definition and Syslog() macro. More...

#include <errno.h>
#include <stdarg.h>
#include <syslog.h>
#include <cstdio>
#include <map>
#include <mutex>
#include <string>
Include dependency graph for DwmSysLogger.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Dwm::SysLogger
 This class encapsulates syslog logging in global scope (all members are static). More...
 

Macros

#define Syslog(...)   Dwm::SysLogger::Log(__FILE__,__LINE__,__PRETTY_FUNCTION__,__VA_ARGS__)
 Used just like syslog(), but calls Dwm::SysLogger::Log() to allow the filename, line number and function name to be logged automatically and the priority tag text provided by Dwm::SysLogger. More...
 

Detailed Description

Dwm::SysLogger class definition and Syslog() macro.

Macro Definition Documentation

◆ Syslog

#define Syslog (   ...)    Dwm::SysLogger::Log(__FILE__,__LINE__,__PRETTY_FUNCTION__,__VA_ARGS__)

Used just like syslog(), but calls Dwm::SysLogger::Log() to allow the filename, line number and function name to be logged automatically and the priority tag text provided by Dwm::SysLogger.

Note this requires variadic macros, but g++ and clang++ support them.