diff --git a/ATxService/AutoTx.cs b/ATxService/AutoTx.cs index 2d9d8ad3af92af192eddeffd5b06224b42eca5c0..622b409e3c48aca0fa7233efcfcffd04b0232d0e 100644 --- a/ATxService/AutoTx.cs +++ b/ATxService/AutoTx.cs @@ -157,9 +157,9 @@ namespace ATxService var logConfig = new LoggingConfiguration(); var fileTarget = new FileTarget { Name = "file", - FileName = $"var/{ServiceName}.{Environment.MachineName}.log", + FileName = $"var/{Environment.MachineName}.{ServiceName}.log", ArchiveAboveSize = 1 * Conv.MegaBytes, - ArchiveFileName = $"var/{ServiceName}.{Environment.MachineName}" + ".{#}.log", + ArchiveFileName = $"var/{Environment.MachineName}.{ServiceName}" + ".{#}.log", MaxArchiveFiles = 9, KeepFileOpen = true, Layout = LogFormatDefault, diff --git a/ATxService/Program.cs b/ATxService/Program.cs index 567c813726665775d724ab1b368132e1fa2b21f4..cc42e5829592a6faf53f4de8aad7c1b5040a962d 100644 --- a/ATxService/Program.cs +++ b/ATxService/Program.cs @@ -24,7 +24,7 @@ namespace ATxService var startupLog = Path.Combine( AppDomain.CurrentDomain.BaseDirectory, "var", - "startup.log"); + $"{Environment.MachineName}.startup.log"); using (var sw = File.AppendText(startupLog)) { sw.WriteLine(ex.Message); diff --git a/Scripts/Install-Service.ps1 b/Scripts/Install-Service.ps1 index ae40ead0d70ffc9c1cdedd4540ab0a3e13b5069e..f3f047fc22c91a4a6729ddbcd8fc02821cfccff7 100644 --- a/Scripts/Install-Service.ps1 +++ b/Scripts/Install-Service.ps1 @@ -93,7 +93,7 @@ if (Test-Path $LocalConfiguration) { Exit } -$ServiceLog = "$($ServiceDir)\$($ServiceName).log" +$ServiceLog = "$($ServiceDir)\var\$($env:COMPUTERNAME).$($ServiceName).log" $Service = Get-Service $ServiceName -ErrorAction SilentlyContinue diff --git a/Scripts/Watch-Logfile.ps1 b/Scripts/Watch-Logfile.ps1 index 3ad6dd34adf9b8cc0e04a07131249507d4177ee4..da9a9edb2cf1f72435cfb49ed52ff5eedae398d8 100644 --- a/Scripts/Watch-Logfile.ps1 +++ b/Scripts/Watch-Logfile.ps1 @@ -6,7 +6,7 @@ if (Test-Path $LocalConfiguration) { Exit } -$LogFile = "$($ServiceDir)\var\$($ServiceName).$($env:COMPUTERNAME).log" +$LogFile = "$($ServiceDir)\var\$($env:COMPUTERNAME).$($ServiceName).log" if (Test-Path $LogFile) { Write-Host "Watching logfile '$LogFile':" diff --git a/Updater/Update-Service.ps1 b/Updater/Update-Service.ps1 index b83ee5ac264d0ee3be9e38208d3c82e7973bdc57..3cd099e7324dc2b4201ce954b9af98e6aa748660 100644 --- a/Updater/Update-Service.ps1 +++ b/Updater/Update-Service.ps1 @@ -617,7 +617,7 @@ $ServiceRunningBefore = ServiceIsRunning $ServiceName $ConfigPath = "$($InstallationPath)\conf" $LogPath = "$($InstallationPath)\var" -$LogFilePfx = "$($LogPath)\$($ServiceName).$($env:COMPUTERNAME)" +$LogFilePfx = "$($LogPath)\$($env:COMPUTERNAME).$($ServiceName)" $StatusXml = "$($InstallationPath)\var\status.xml"