I'm having some trouble with <syslog.h> in 10.5. I'm writing a small fork based server for class and I want to use syslog() to print a bunch of debug info. However, I can't find any of the messages I issue via syslog() while using Console (I'm looking in both all messages & system.log).
Here is a code snippet of a plain C:
#include <syslog.h>
#include <stdarg.h>
int main (int argc, const char * argv[])
{
openlog("Syslog Test", LOG_PID | LOG_NDELAY | LOG_CONS | LOG_PERROR, LOG_USER);
setlogmask(LOG_UPTO(LOG_DEBUG));
syslog(LOG_DEBUG, "%s", "Hello, World!");
syslog(LOG_DEBUG, "%s", "And goodbye!");
closelog();
return 0;
}
And I don't see anything in "All Messages", "Console Messages" or system.log. Any advice?
