-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample.c
16 lines (15 loc) · 815 Bytes
/
sample.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <github.com/apronchenkov/syslog_client/public/SyslogClient.h>
int main(int argc, char **argv) {
(void)argc;
SyslogClient *const syslog =
SyslogClientCreateDefault(SYSLOG_FACILITY_USER, argv[0]);
SyslogClientPrintf(syslog, SYSLOG_SEVERITY_DEBUG, "Debug message.");
SyslogClientPrintf(syslog, SYSLOG_SEVERITY_INFO, "Info message.");
SyslogClientPrintf(syslog, SYSLOG_SEVERITY_NOTICE, "Notice message.");
SyslogClientPrintf(syslog, SYSLOG_SEVERITY_WARNING, "Warning message.");
SyslogClientPrintf(syslog, SYSLOG_SEVERITY_ERROR, "Error message.");
SyslogClientPrintf(syslog, SYSLOG_SEVERITY_CRITICAL, "Critical message.");
SyslogClientPrintf(syslog, SYSLOG_SEVERITY_ALERT, "Alert message.");
SyslogClientPrintf(syslog, SYSLOG_SEVERITY_EMERGENCY, "Emergency message.");
return 0;
}