Skip to content

Commit

Permalink
Bugfixes on Logging functionnality
Browse files Browse the repository at this point in the history
Since the logging was improved, the view / delete functions of the current log file no longer pointed to the correct files.
This error has been corrected.
  • Loading branch information
gawindx committed Feb 20, 2021
1 parent 364e513 commit 2df565e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 5 additions & 5 deletions WinNUT_V2/Setup/Setup.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -5624,22 +5624,22 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:WinNUT"
"ProductCode" = "8:{C92CB539-2108-48B7-81C5-AD52CA52A030}"
"PackageCode" = "8:{8BF31541-B746-48D0-8D6E-49FD77B32651}"
"ProductCode" = "8:{1203E947-5DE0-4661-BA8E-DA6343971CEC}"
"PackageCode" = "8:{EC53C4C3-7855-4625-A4F8-58D955868905}"
"UpgradeCode" = "8:{7EA17151-76E7-4E29-8F6A-621C1B4144C2}"
"AspNetVersion" = "8:2.0.50727.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:FALSE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:2.0.7716"
"ProductVersion" = "8:2.0.7721"
"Manufacturer" = "8:Gawindx"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:https://github.com/gawindx/WinNUT-Client/issues"
"Title" = "8:WinNUT-Setup"
"Subject" = "8:WinNUT-Client v2.0.7716"
"Subject" = "8:WinNUT-Client v2.0.7721"
"ARPCONTACT" = "8:Gawindx"
"Keywords" = "8:WinNUT v2.0.7716"
"Keywords" = "8:WinNUT v2.0.7721"
"ARPCOMMENTS" = "8:Windows NUT Client"
"ARPURLINFOABOUT" = "8:"
"ARPPRODUCTICON" = "8:_33BCB1EF059B4E9B87FA7435A8F2499C"
Expand Down
4 changes: 4 additions & 0 deletions WinNUT_V2/WinNUT_GUI/Logger.vb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Public Class Logger
Me.LogFile.Location = LogFileLocation.Custom
Me.LogFile.CustomLocation = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\WinNUT-Client"
Me.LastEventsList.Capacity = 50
WinNUT_Globals.LogFilePath = Me.LogFile.FullLogFileName
End Sub

Public Property WriteLog() As Boolean
Expand Down Expand Up @@ -71,6 +72,9 @@ Public Class Logger
Dim EventTime = Now.ToLocalTime
Dim FinalMsg = EventTime & " Pid: " & Pid & " " & SenderName & " : " & message

'Update LogFilePath to make sure it's still the correct path
WinNUT_Globals.LogFilePath = Me.LogFile.FullLogFileName

' Always write log messages to the attached debug messages window.
#If DEBUG Then
Debug.WriteLine(FinalMsg)
Expand Down
2 changes: 1 addition & 1 deletion WinNUT_V2/WinNUT_GUI/WinNUT_Globals.vb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Module WinNUT_Globals
GitHubURL = My.Application.Info.Trademark
Copyright = My.Application.Info.Copyright
Directory_AppData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\WinNUT-Client"
LogFilePath = Directory_AppData & "\WinNUT-CLient.log"

If Not System.IO.Directory.Exists(Directory_AppData) Then
My.Computer.FileSystem.CreateDirectory(Directory_AppData)
End If
Expand Down

0 comments on commit 2df565e

Please sign in to comment.