2019-11-05 12:43:55 +05:30
|
|
|
/*-
|
2019-11-08 18:13:16 +05:30
|
|
|
* SPDX-License-Identifier: Unlicense
|
2019-11-05 12:43:55 +05:30
|
|
|
*
|
2019-11-08 18:13:16 +05:30
|
|
|
* This is free and unencumbered software released into the public domain.
|
2019-11-05 12:43:55 +05:30
|
|
|
*/
|
|
|
|
|
|
|
|
/* Example of how to use NetBSD syslogp() API with libsyslog from sysklogd */
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <syslog/syslog.h>
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
openlog("example", LOG_PID, LOG_USER);
|
|
|
|
syslogp(LOG_NOTICE, "MSGID", NULL, "Kilroy was here.");
|
|
|
|
closelog();
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|