syslog_test.c 简单的syslog函数
#cat syslog_test.c
#include<stdio.h>
#include<stdlib.h>
#include<syslog.h>
int main()
{
int i;
openlog("jiangyi-tag",LOG_CONS,LOG_AUTH);
for ( i = 0; i < 10000; ++i)
{
/* code */
syslog(LOG_INFO,"ADD AUTH LOG..\n");
/* sleep(0.1); */
}
closelog();
}
muahao@aliyun.com