#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#define ELOG_INIT(ident, facility) openlog(ident, 0, facility)
#define ELOG_DEBUG(fmt, ...) syslog(LOG_DEBUG, "%s:%d:%s: "fmt, __FILE__, __LINE__, __func__, ##__VA_ARGS__)
int main(int argc, char *argv[])
{
char *ident = "logtest";
char *buf = "test buf";
char *t = "%s";
ELOG_INIT(ident, LOG_LOCAL6);
ELOG_DEBUG(t, buf);
return 0;
}