#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..
");
/* sleep(0.1); */
}
closelog();
}