sysklogd/example/example.c
Joachim Nilsson 625a0d4abc Relicense example code/readme/makefile as public domain
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-08 13:43:37 +01:00

20 lines
406 B
C

/*-
* SPDX-License-Identifier: Unlicense
*
* This is free and unencumbered software released into the public domain.
*/
/* 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;
}