Hi all,
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.
System Info:
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
* Write to system log * * Enabled * *Use UNIX syslog service to produce and
manage log messages
* I checked this box and then restarted glassfish hoping that this would
solve my problem. But this did not work out, It showed me the following
problem. *
* *The libutilforsyslog.so is a ELF32 library file *
*'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.
1) copy the log4j.jar file to ~/glassfish/lib folder
2) create a directory called logging inside this lib folder
3) copy the log4j.xml and log4j.properties file in this folder
4) the log4j.properties file looks like this:
* log4j.rootCategory=syslog
*
*
log4j.appender.syslog=org.apache.log4j.net.SyslogAppender
log4j.appender.syslog.syslogHost=<hostname>
log4j.appender.syslog.layout=org.apache.log4j.PatternLayout
log4j.appender.syslog.layout.conversionPattern=[%p]
%c:%L - %m%n
log4j.appender.syslog.Facility=local4*
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!!!
Regards,
Pushkar
www.strongauth.com
--
[Message sent by forum member 'push2085']
View Post: http://forums.java.net/node/861928