开发者

Where the application should store its logs in Mac OS?

开发者 https://www.devze.com 2023-01-18 05:15 出处:网络
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.

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 l开发者_如何转开发ocate.


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"
0

精彩评论

暂无评论...
验证码 换一张
取 消