Originally posted by jrch2k8
View Post
openlog("MYPROGRAM", LOG_PID|LOG_NDELAY, facility);
// ...
syslog(LOG_DEBUG, "%s", "Some people think this code is a royal pain in the ass!");
// ..
closelog();
This ^^^ is simple stuff.
The UNIX way, if I may be so pedantic, is to be configurable. If you compare Ubuntu to, say, Suse, well the logs are named differently. That's nothing to do with C++, it's to do with your syslog daemon config file.
You can change the syslog daemon's config if you want.
Leave a comment: