Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 691
Viachaslau Tysianchuk Avatar asked Sep 29 '10 10:09

Viachaslau Tysianchuk


People also ask

Where are Mac application logs stored?

“~Library/Logs” is your current Mac user account's user-specific application log folder, “/Library/Logs” is the system-wide application log folder, and “/var/log” generally contains logs for low-level system services. The search bar works to filter these log files, too.

Where are application logs stored?

On a Windows computer: Inside the Control Panel, find System & Security. From there, go to Administrative Tools and then the Event Viewer. Open Windows Logs and choose Application. This will show you all the application logs saved on your computer.


1 Answers

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"
like image 153
jmj Avatar answered Sep 30 '22 10:09

jmj