Where to store an application log file on Windows

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.


1.The program directory <- not good. Ideally you will only have RX permissions on this folder.

2.The user's desktop <- technically can be done, but I don't like this idea. Polluting desktop... I, as a user, don't like it.

3.The user's local Application Data directory. <- better

My preference is a subdirectory under the program directory (with a clear name like "DebugLog" or something similar). Permissions on that subdirectory should allow creating and writing files ("Change" will be fine)


In the organization I work for we use the (%TEMP% or %TMP%)\CompanyOrProductName\Logs directory Using %APPDATA% may be problematic with roaming profiles if the logs are numerous or huge : it slows their login process ...