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

Ask Your Question

How write message into GSC log file

Dear Sir,

We wrote a service PU and deployed into a GSC. In the service PU, we wrote some logs by using both System.out.print() and org.apache.log4j.Logger.logger.debug(). We saw message from the GSC cmd console, but cannot found them in the GSC log file located in XAP log folder, say C:\gigaspaces-xap-premium-7.1.2-ga\logs\2010-12-29~00.04-gigaspaces-gsc-NASTURITUM-7072. Besides, there was a separate log file for the deployed service PU, named : 2010-12-29~00.20-gigaspaces-service- in the XAP log folder, but with nothing in it.

Could you pls explain how to use XAP framework to write logs?

Thanks, Tianqi

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

asked 2010-12-28 10:49:08 -0500

tqwang gravatar image

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

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

You should use the standard Java logging.

This will place your log data into the GSC log file.

answered 2010-12-28 11:19:06 -0500

shay hassidim gravatar image
edit flag offensive delete link more


Thanks Shay.

It works by using java.util.logging.Logger and adding "com.cloud.xap.myService.level = ALL" in gs_logging.properties. Now all logs generated by package "com.cloud.xap.myService" go to the corresponding GSC log file. However, I ever saw a separate log file for the deployed service PU, e.g. ,"2010-12-29~11.36-gigaspaces-service-", but now I couldn't find such files in XAP/log directory any more.

How to to make sure all logs generated from the service PU go into a separate log service log file (in addition to logging to GSC log file)?

Thanks, Tianqi

tqwang gravatar image tqwang  ( 2010-12-28 23:20:09 -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


Asked: 2010-12-28 10:49:08 -0500

Seen: 127 times

Last updated: Dec 28 '10