encfs/vendor/github.com/muflihun/easyloggingpp/samples/STL/syslog.cpp
Valient Gough 5f0806c5cc Add "easylogging" from "https://github.com/muflihun/easyloggingpp@master"
git-vendor-name: easylogging
git-vendor-dir: vendor/github.com/muflihun/easyloggingpp
git-vendor-repository: https://github.com/muflihun/easyloggingpp
git-vendor-ref: master
2017-08-05 23:23:41 -07:00

26 lines
562 B
C++

//
// This file is part of Easylogging++ samples
// Syslog sample
//
// Revision 1.0
// @author mkhan3189
//
#define ELPP_SYSLOG
#include "easylogging++.h"
INITIALIZE_EASYLOGGINGPP
int main(void) {
ELPP_INITIALIZE_SYSLOG("syslog_sample", LOG_PID | LOG_CONS | LOG_PERROR, LOG_USER);
SYSLOG(INFO) << "My first easylogging++ syslog message";
SYSLOG_IF(true, INFO) << "This is conditional info syslog";
for (int i = 1; i <= 10; ++i)
SYSLOG_EVERY_N(2, INFO) << "This is [" << i << "] iter of SYSLOG_EVERY_N";
return 0;
}