Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

GigaSpaces logging to Splunk

Hi, We have an application that uses Log4J to log things to a SysLogAppender to Splunk.

Is it possible to change the java.util.logging config that GigaSpaces uses to write to SysLog, so we can get the logging directly from GigaSpaces into Splunk?

Regards,

Jos Lagerweij

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=3725]{quote}

asked 2011-08-02 03:02:17 -0500

jlagerweij gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

The <GigaSpaces root>/config/gs_logging.properties contains the logging properties used by java.util.Logging facility.
The "handlers" are like the "appenders" in Log4J. You can set a different handler, or add a handler to the existing list of handlers.
The handler classes should be available as part of the PRE_CLASSPATH environment variable.

I am not familiar with a SysLogAppender available for java.util.Logging - you might need to write an adapter for it.

Regards,
Moran

answered 2011-08-02 08:44:09 -0500

edit flag offensive delete link more

Comments

I have implemented my own custom handler for this. I was hoping for an existing solution that you might have heard of, but this works as well.

Thanks for your help in this.

Jos

jlagerweij gravatar imagejlagerweij ( 2011-08-03 03:11:15 -0500 )edit

Hi Jos

You can use the slf4j bridge for java logging. This should allow you to tunnel messages from a java.util.logging.Handler to a log4j appender.

Uri

uri gravatar imageuri ( 2011-08-03 08:31:00 -0500 )edit

Uri,
I have seen the jul-to-slf4j bridge, here: http://www.slf4j.org/legacy.html#jul-to-slf4j.
That part also has a warning:
jul-to-slf4j translates LogRecord objects into their SLF4J equivalent. Please note this traslation process incurs the cost of constructing a LogRecord instance regardless of whether the SLF4J logger is disabled for the given level or nor. Consequently, j.u.l. to SLF4J translation can seriously impact on the cost of disabled logging statements (60 fold increase) and a measurable impact on enabled log statements (20% overall increase).

For this reason I wanted to go with a simple SysLogHandler, although I don't know the performance impact on it yet.

Jos

jlagerweij gravatar imagejlagerweij ( 2011-08-17 13:17:32 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2011-08-02 03:02:17 -0500

Seen: 974 times

Last updated: Aug 08 '13