ubuntu下syslogd安装名字是inetutils-syslogd,另外还有一个busybox的 ,这个没有安装试过
apt-get install inetutils-syslogd
syslogd的配置文件
/etc/syslogd.conf
C中可以使用的函数
#include <syslog.h>
void openlog (char*ident,int option ,int facility);
void syslog(int priority,char*format,……)
void closelog();
另外通过C调用的方式如下
#include <syslog.h>
int main(int argc, char **argv)
{
openlog("MyMsgMARK", LOG_CONS | LOG_PID, 0);
syslog(LOG_DEBUG,
"This is a syslog test message generated by program '%s'\n",
argv[0]);
closelog();
return 0;
}