Send logs to localsyslog (Apache,Mysql,Glassfish)

Adding you logfiles to an syslog server is an easy way to get all logs collected in one place.

I Use to set all my service (apache,mysqlmmm) to log there logs to the local syslog server.
Then I config the local syslog to send al its log to an central logserver.
This way I get all my logs collected and displayd at one place.
In the file httpd.con fins the line ErrorLogs and replace the line with
ErrorLog syslog:local1

In the file my.cnf fins the section [mysqld_safe] And add at top

To make the glassfish server send its log to you localsyslog find the command asadmin locaed in you glassfish folder.
and run the command.
./asadmin set-log-attributes com.sun.enterprise.server.logging.SyslogHandler.useSystemLogging=true

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: