I"m in a CentosOS linux environment and I'm using syslog-ng to configure my logging for my php app.
on the php side I generate logs using the code below:
openlog(‘Program1', LOG_NDELAY, LOG_LOCAL1);
syslog(LOG_INFO, "My log message");
closelog();
Before I edited my syslog-ng.conf file all of the logs generated from the php code were logged into /var/log/messages.
I want to save my log to /var/log/program1.log so I added the following line to syslog-ng.conf:
local1.info /var/log/program1.log
But when I restarted the syslog-ng service I"m getting the following error:
Stopping syslog-ng: [FAILED]
Plugin module not found in 'module-path'; module-path='/lib64/syslog-ng', module='afsql'
Error parsing main, syntax error, unexpected LL_IDENTIFIER, expecting $end in /etc/syslog-ng/syslog-ng.conf at line X, column Y:
local1.info /var/log/programname.log
^^^^^^^^^^^
Any help would be much appreciated :)