I have a custom application running on client which uses php, whose log's are controlled by log4php.properties
( say DEBUG
or INFO
) however, in addtion existing logging setup, i would like to send these logs to syslog-ng
running server.
Below is my syslog-ng configuration on client ( where php application is running )
File - /etc/syslog-ng/syslog-ng.conf
entry,
destination loghost {
tcp("192.168.1.123" port(5140));
};
log {
source(src);
destination(loghost);
};
And on the client log4php.properties
,
log4php.appender.A2=LoggerAppenderSyslog
log4php.appender.A2.MaxFileSize=10MB
log4php.appender.A2.Priority=DEBUG
log4php.appender.A1.layout.ConversionPattern="%d{d M Y} %d{ABSOLUTE} %X{server.REMOTE_ADDR} %c{2} %-5p %m %n"
However, i am able to see the logs generated by my application under syslog folder in a file called - user-log - my question is - how can i customize the log entries? and is it possible to move these logs to some other file name ?
Any pointers are greatly helpful.
Thanks.