nutdotnet / WinNUT-Client

WinForms-based client for monitoring your Uninterruptible Power Supply (UPS) connected to a Network UPS Tools (NUT) server.
GNU General Public License v3.0
226 stars 20 forks source link

Log files are being sent to the application directory again #110

Closed gbakeman closed 1 year ago

gbakeman commented 1 year ago

At some point (likely to do with the new PreRelease build configuration), log files are now trying to be written to the application directory when they should be going to the AppData folder.

gbakeman commented 1 year ago

Tagging @masterwishx per our conversation in #105 :

also i was looking in commits and cant find changes about logs dir ...

I think the issue comes down to commit https://github.com/nutdotnet/WinNUT-Client/commit/d9723b023185b9cbcdc40fba1bd8f474edf5e209 and how I added the PreRelease build configuration. The Client-Common library is built with the DEBUG flag enabled, and in the WinNUT_Globals.vb file, this causes the program to start logging in Debug mode, meaning the log files are supposed to be created next to the executable (which fails in a normal installation, since the Program Files folder is read-only to the user.)

I was working on some more changes to the logging system which should be friendly to the PreRelease build config and behave normally. I'll see if I can backport those changes into a quick bugfix release.