Glassfish Logging to Syslog
This is Pushkar. I am trying to get glassfish to log to Syslog and I am not sucessfull in doing the same. I need to know if anyone has success fully done this before and how.
Operating System: Linux (CentOS 5.5 64 bit)
Glassfish: glassfish version2.1.1
JDK: jdk1.6.0_21 or up.
Step 1) I Wanted to glassfish to send all the logs to Syslog instead of just to the server.log files. When i was going through the configuration of glassfish logging, i cam across a check box which says
'file' command gives: /opt/glassfish/lib/libutilforsyslog.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped
I was not able to find a solution to this on glassfish forums as well. So i decided to use log4J and try to use their SyslogAppender to log to syslogs.
Step 2) I downloaded the log4j files and followed the following steps to get it log to syslog.
- copy the log4j.jar file to ~/glassfish/lib folder
- create a directory called logging inside this lib folder
- copy the log4j.xml and log4j.properties file in this folder
- the log4j.properties file looks like this:
log4j.appender.syslog.layout.conversionPattern=[%p] %c:%L - %m%n
5. after this to the Systems Path in glassfish, i added the path to the properties file which is ~/glassfish/lib/logging/
6. I restarted glassfish after this hoping that it will start using the syslog appender to log to syslogs.
Am I doing something wrong? Am I missing something? Is there some one who has achieved this on 64 bit linux and can help me with the same. Also is there some other solution for what i am trying to do.
Any Help is apprecitaed.
Thanks in Advance!!!