views:

22

answers:

1

I'm porting a Windows app written in C# to Mac OS using Java and Swing.

The Windows app stores the logs (environment info, exceptions, etc.) in the file C:\Program Files\MyProgram\Logs\app.log. Occasionally I ask users to send me this file to diagnose problems.

What is the right place for logs in Mac OS? If there are several possible places, I'd like to use the one that is easier for users to locate.

+2  A: 

generally we store it in a dir [with the name of app] in home folder and in that .log file

System.getProperty("user.home")+System.getProperty("file.separator")+"appname"+System.getProperty("file.separator")+"appname.log"
org.life.java
I think you should use "separator" instead of "path-separator". Path-separator is to separate paths, not folders within a path.
Jeroen Rosenberg
@Jeroen Rosenberg updated the things, its file-saperator
org.life.java