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.
“~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.
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.
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With