I've tried to use syslog() on different *nix There is no any problems with RedHat:
Add one line in /etc/syslog.conf like: local5.* {TABs!} /var/log/localmsg
Execute short PHP-code like: <? define_syslog_variables(); openlog("TEST: ", LOG_ODELAY | LOG_PID, LOG_LOCAL5); syslog(LOG_WARNING, "Test msg"); closelog(); ?>
Checking log:
Dec 16 18:20:01 kuhulin TEST: [2665]: Test msg
So, it's OK.
On FreeBSD the same actions fail. Messages write into /var/log/messages (assuming you have line *.warning /var/log/messages) and no any other place. I've ried different levels like DEBUG, NOTICE, INFO
WTF?
Hmmm, not sure <???>
try this in /etc/syslog.conf:
!httpd *.* ---tab--- /var/log/yourlogfile
Touch the new log, -HUP the syslog daemon, and try again?
HTH,
Yeah, I've tried that. No way 🙁