Where to store an application log file on Windows

logging, windows

Solution

The Application Data directory would seem to be the perfect place, but it's an area that is nearly invisible. You need to give your users an easy way to get to it.

Have your installation script create a Log folder in the Application Data area for your program, and include a link to the folder in your Start menu.

Problem

Where would be the best "standard" place to put an application's debug log file in a Windows user environment? In this particular case, it is an application that is run once and could go wrong. It will be run by system administrator types who may need to inspect the log after the application is run. Everytime the application is run, a new log file is created. Options that have been floated so far include: - The program directory - The user's desktop - The user's local Application Data directory. I have my favourite, but I wondered what the SO consensus was. Note: this is similar to this question, but we're dealing with an application that's only likely to be run once by one user.

Original source

Related problems