can't seem to get syslog working



Hello,
My system is an EL4 setup.

I've written a simple program and I'd expect this to log to /var/log/messages but unfortunately this remains resolutely empty.

#include <syslog.h>

int main(int argc, char *argv[])
{
openlog("logtest", LOG_PID, LOG_LOCAL1);

syslog(LOG_INFO, "Program started by User");

closelog();

return 0;
}

my /etc/syslog.conf is pretty much the default, which indicates that it should be logging info messages or higher.


# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none /var/log/messages

# The authpriv file has restricted access.
authpriv.* /var/log/secure

# Log all the mail messages in one place.
mail.* -/var/log/maillog


# Log cron stuff
cron.* /var/log/cron

# Everybody gets emergency messages
*.emerg *

# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler

# Save boot messages also to boot.log
local7.* /var/log/boot.log


I've checked with ps and syslogd is running!

I'd appreciate any ideas.

MTIA.

.



Relevant Pages

  • System Log Problems (Newbie Question -- Sorry!)
    ... I'm having some problems with the system logger ... # Log anything of level info or higher. ... # The authpriv file has restricted access. ... # Log all the mail messages in one place. ...
    (comp.os.linux.misc)
  • [fw-wiz] Firewall Messages
    ... I and others I know are getting console Firewall traffic and its rather ... > # Log anything of level info or higher. ... > # The authpriv file has restricted access. ... > # Log all the mail messages in one place. ...
    (Firewall-Wizards)
  • Re: Question on /var/log/secure file
    ... Just to give you a little more info I am able to see logins happening with ... # Log anything of level info or higher. ... # The authpriv file has restricted access. ... # Everybody gets emergency messages, ...
    (comp.os.linux.security)
  • Re: how to enable iptables from CLI
    ... login attempts that get logged to secure, ... # Log anything of level info or higher. ... # The authpriv file has restricted access. ...
    (comp.os.linux.security)