Viachaslau Tysianchuk
Viachaslau Tysianchuk

Reputation: 1690

Where the application should store its logs in Mac OS?

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.

Upvotes: 11

Views: 6545

Answers (1)

Jigar Joshi
Jigar Joshi

Reputation: 240996

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"

Upvotes: 6

Related Questions