Skip to content

Fix logs going to App directory again #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
193 changes: 70 additions & 123 deletions WinNUT_V2/Setup/Setup.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@
}
"Entry"
{
"MsmKey" = "8:_0418C0A68EC444EE896C1D543C8AFD63"
"OwnerKey" = "8:_70DBA11C2BF449198BA594449914C1BC"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_04BC2107644AB3257DDD15248220E634"
"OwnerKey" = "8:_CAA83D70E80C09C89E42A34FA8F23665"
"MsmSig" = "8:_UNDEFINED"
Expand Down Expand Up @@ -279,12 +273,6 @@
}
"Entry"
{
"MsmKey" = "8:_2A6481F0F99C80219D875FADD7CEBCF5"
"OwnerKey" = "8:_70DBA11C2BF449198BA594449914C1BC"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_2FE95EC14D3C411D8F0A93940FFCBCF3"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
Expand Down Expand Up @@ -501,12 +489,6 @@
}
"Entry"
{
"MsmKey" = "8:_4F81608AEF82517B403CCE166E5C9E7B"
"OwnerKey" = "8:_70DBA11C2BF449198BA594449914C1BC"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_4FBF49FC0C81EBB2568861BC1E029FD1"
"OwnerKey" = "8:_70DBA11C2BF449198BA594449914C1BC"
"MsmSig" = "8:_UNDEFINED"
Expand Down Expand Up @@ -1647,6 +1629,12 @@
}
"Entry"
{
"MsmKey" = "8:_7643B2E01E55816C8BA2265FF9E9B786"
"OwnerKey" = "8:_70DBA11C2BF449198BA594449914C1BC"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_76C124487B58F9503C60B5679A43F43E"
"OwnerKey" = "8:_CAA83D70E80C09C89E42A34FA8F23665"
"MsmSig" = "8:_UNDEFINED"
Expand Down Expand Up @@ -3021,6 +3009,12 @@
}
"Entry"
{
"MsmKey" = "8:_B8073AE507D3E3454F05FE38F157CEDD"
"OwnerKey" = "8:_70DBA11C2BF449198BA594449914C1BC"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_B8623759245285260351785642DF324A"
"OwnerKey" = "8:_70DBA11C2BF449198BA594449914C1BC"
"MsmSig" = "8:_UNDEFINED"
Expand Down Expand Up @@ -4990,13 +4984,13 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_4F81608AEF82517B403CCE166E5C9E7B"
"OwnerKey" = "8:_B8073AE507D3E3454F05FE38F157CEDD"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_0418C0A68EC444EE896C1D543C8AFD63"
"OwnerKey" = "8:_7643B2E01E55816C8BA2265FF9E9B786"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
Expand Down Expand Up @@ -5548,12 +5542,6 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_2A6481F0F99C80219D875FADD7CEBCF5"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_D6E439F8F358953CF705B4AFF62D3C03"
"MsmSig" = "8:_UNDEFINED"
}
Expand Down Expand Up @@ -6423,37 +6411,6 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_0418C0A68EC444EE896C1D543C8AFD63"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:AGauge, Version=2.1.8688.25884, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_0418C0A68EC444EE896C1D543C8AFD63"
{
"Name" = "8:AGauge.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:AGauge.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_7A1917372AF14D75845D775AAEB7CD48"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:TRUE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_04BC2107644AB3257DDD15248220E634"
{
"AssemblyRegister" = "3:1"
Expand Down Expand Up @@ -7373,37 +7330,6 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_2A6481F0F99C80219D875FADD7CEBCF5"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"ScatterAssemblies"
{
"_2A6481F0F99C80219D875FADD7CEBCF5"
{
"Name" = "8:System.Net.Http.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:System.Net.Http.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_7A1917372AF14D75845D775AAEB7CD48"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:TRUE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_2FE95EC14D3C411D8F0A93940FFCBCF3"
{
"SourcePath" = "8:..\\WinNUT-Client\\bin\\PreRelease\\WinNUT-Client_Common.pdb"
Expand Down Expand Up @@ -8301,37 +8227,6 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_4F81608AEF82517B403CCE166E5C9E7B"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:WinNUT-Client_Common, Version=2.2.8688.25884, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_4F81608AEF82517B403CCE166E5C9E7B"
{
"Name" = "8:WinNUT-Client_Common.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:WinNUT-Client_Common.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_7A1917372AF14D75845D775AAEB7CD48"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_4FBF49FC0C81EBB2568861BC1E029FD1"
{
"AssemblyRegister" = "3:1"
Expand Down Expand Up @@ -9530,6 +9425,32 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_7643B2E01E55816C8BA2265FF9E9B786"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:AGauge, Version=2.1.8690.23867, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
}
"SourcePath" = "8:AGauge.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_7A1917372AF14D75845D775AAEB7CD48"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:TRUE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_76C124487B58F9503C60B5679A43F43E"
{
"AssemblyRegister" = "3:1"
Expand Down Expand Up @@ -11078,6 +10999,32 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_B8073AE507D3E3454F05FE38F157CEDD"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:WinNUT-Client_Common, Version=2.2.8690.23867, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
}
"SourcePath" = "8:WinNUT-Client_Common.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_7A1917372AF14D75845D775AAEB7CD48"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_B8623759245285260351785642DF324A"
{
"AssemblyRegister" = "3:1"
Expand Down Expand Up @@ -12921,15 +12868,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:WinNUT"
"ProductCode" = "8:{023BDDA5-359C-4698-A4DB-5B104D4C9340}"
"PackageCode" = "8:{0EA7AC02-24AA-4A40-97F3-DBC77D170BE8}"
"ProductCode" = "8:{59FA2D2B-9A33-4889-897C-EDA8E87DE6A0}"
"PackageCode" = "8:{725679C7-4AF5-4AB4-9AF4-CBB753A11D56}"
"UpgradeCode" = "8:{7EA17151-76E7-4E29-8F6A-621C1B4144C2}"
"AspNetVersion" = "8:2.0.50727.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:2.2.8688"
"ProductVersion" = "8:2.2.8690"
"Manufacturer" = "8:NUTDotNet"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:https://github.com/nutdotnet/WinNUT-Client/issues"
Expand Down Expand Up @@ -13481,7 +13428,7 @@
{
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_314CE5030A4040E69371869B1C94AA16"
{
"SourcePath" = "8:..\\AGauge_mod\\obj\\Debug\\AGauge.dll"
"SourcePath" = "8:..\\AGauge_mod\\obj\\Release\\AGauge.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_7A1917372AF14D75845D775AAEB7CD48"
Expand Down
10 changes: 5 additions & 5 deletions WinNUT_V2/WinNUT-Client/ApplicationEvents.vb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Namespace My
' NetworkAvailabilityChanged : Déclenché quand la connexion réseau est connectée ou déconnectée.
Partial Friend Class MyApplication
' Default culture for output so logs can be shared with the project.
Private Shared DEF_CULTURE_INFO As CultureInfo = CultureInfo.InvariantCulture

Private Shared ReadOnly DEF_CULTURE_INFO As CultureInfo = CultureInfo.InvariantCulture
Private Shared ReadOnly CRASHBUG_OUTPUT_PATH = System.Windows.Forms.Application.LocalUserAppDataPath

Private CrashBug_Form As New Form
Private BtnClose As New Button
Expand Down Expand Up @@ -168,13 +168,13 @@ Namespace My

Computer.Clipboard.SetText(crashReportData)

Directory.CreateDirectory(TEMP_DATA_PATH)
Dim CrashLog_Report = New StreamWriter(Path.Combine(TEMP_DATA_PATH, logFileName))
Directory.CreateDirectory(CRASHBUG_OUTPUT_PATH)
Dim CrashLog_Report = New StreamWriter(Path.Combine(CRASHBUG_OUTPUT_PATH, logFileName))
CrashLog_Report.WriteLine(crashReportData)
CrashLog_Report.Close()

' Open an Explorer window to the crash log.
Process.Start(TEMP_DATA_PATH)
Process.Start(CRASHBUG_OUTPUT_PATH)
End
End Sub

Expand Down
4 changes: 2 additions & 2 deletions WinNUT_V2/WinNUT-Client/Pref_Gui.vb
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ Public Class Pref_Gui

Private Sub Btn_ViewLog_Click(sender As Object, e As EventArgs) Handles Btn_ViewLog.Click
LogFile.LogTracing("Show LogFile", LogLvl.LOG_DEBUG, Me)
If File.Exists(LogFile.LogFileLocation) Then
Process.Start(LogFile.LogFileLocation)
If File.Exists(LogFile.LogFilePath) Then
Process.Start(LogFile.LogFilePath)
Else
LogFile.LogTracing("LogFile does not exists", LogLvl.LOG_WARNING, Me)
Btn_ViewLog.Enabled = False
Expand Down
2 changes: 0 additions & 2 deletions WinNUT_V2/WinNUT-Client/WinNUT-client.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,11 @@
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Runtime" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
Expand Down
11 changes: 1 addition & 10 deletions WinNUT_V2/WinNUT-Client/WinNUT.vb
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,6 @@ Public Class WinNUT
WinNUT_PrefsChanged(True)
LogFile.LogTracing("Loaded Params Complete", LogLvl.LOG_DEBUG, Me)

' Setup logging preferences
' LogFile.LogLevel = Arr_Reg_Key.Item("Log Level")
' LogFile.IsWritingToFile = Arr_Reg_Key.Item("UseLogFile")
'If Arr_Reg_Key.Item("UseLogFile") Then
' LogFile.InitializeLogFile()
'End If

'LogFile.LogTracing("Logging is configured.", LogLvl.LOG_DEBUG, Me)

'Init Systray
NotifyIcon.Text = LongProgramName & " - " & ShortProgramVersion
NotifyIcon.Visible = False
Expand Down Expand Up @@ -836,7 +827,7 @@ Public Class WinNUT
' Setup logging preferences
If Arr_Reg_Key.Item("UseLogFile") Then
LogFile.LogLevelValue = Arr_Reg_Key.Item("Log Level")
LogFile.InitializeLogFile(ApplicationDataPath)
LogFile.InitializeLogFile()
ElseIf LogFile.IsWritingToFile Then
LogFile.DeleteLogFile()
End If
Expand Down
Loading