tags:

views:

16

answers:

1

I am working on a java web start application which needs to log some statements. The clients running this app can be running on windows,mac or linux. I am planning to use log4j for my logging utilities and each log file to be named as , meaning each run of the app should create a new log file. As there is nothing actually getting installed, i am not sure which directory should i store these files to, as these need to be persisted for future debugging. Also, then the question arises as to find how to find out the directory structure of the client machine.

Could someone please suggest on these?

A: 

First of all you need to get access to the local machine. You can sign your application and require full access, or you can use the web start facilities to get access to various services including file access. See the web start documentation for details.

Then you need to determine where to put your log files.

A good place to start is the user.home system property which usually points to the home direcotry of the active user, so if you can use a convention like ".yourapp/debug.log" you can put it there.

More than that require deeper knowledge of the target machine.

Thorbjørn Ravn Andersen
I was exploring the avenue for storing the logs at the server side for this web start app.Any idea on how to do it?
kshtjsnghl