syslog(LOG_LOCAL7|LOG_ERR, "ERROR: just my test error msg syslog(test val=%d)\n", test);
closelog();
return 0; }
这个小程序执行完后
/var/log/boot.log:Nov 16 11:18:08 localhost MySysLogTest[2804]: ERROR: just my test error msg syslog(test val=10) /var/log/messages:Nov 16 11:18:08 localhost MySysLogTest[2804]: ERROR: just my test error msg syslog(test val=10)