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

Ask Your Question
0

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-172.31.13.10-4104 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
0

You should use the standard Java logging.
See:
http://download.oracle.com/javase/1.5.0/docs/guide/logging/overview.html
http://www.gigaspaces.com/wiki/display/XAP71/GigaSpacesLogging

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

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

shay hassidim gravatar image
edit flag offensive delete link more

Comments

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-192.168.80.164-4832.log", 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 imagetqwang ( 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

Stats

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

Seen: 79 times

Last updated: Dec 28 '10