mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 04:22:30 +01:00
Fixed update log path issues.
This commit is contained in:
parent
3bd7d28d3f
commit
6e9a6313ff
@ -103,5 +103,17 @@ public void GetUpdateClientExePath()
|
||||
{
|
||||
GetEnviromentProvider().GetUpdateClientExePath().Should().BeEquivalentTo(@"C:\Temp\Nzbdrone_update\NzbDrone\NzbDrone.Update\NzbDrone.Update.exe");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetSandboxLogFolder()
|
||||
{
|
||||
GetEnviromentProvider().GetSandboxLogFolder().Should().BeEquivalentTo(@"C:\Temp\Nzbdrone_update\UpdateLogs\");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetUpdateLogFolder()
|
||||
{
|
||||
GetEnviromentProvider().GetUpdateLogFolder().Should().BeEquivalentTo(@"C:\NzbDrone\UpdateLogs\");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ public static class PathExtentions
|
||||
private const string UPDATE_BACKUP_FOLDER_NAME = "nzbdrone_backup\\";
|
||||
private const string UPDATE_CLIENT_EXE = "nzbdrone.update.exe";
|
||||
private const string UPDATE_CLIENT_FOLDER_NAME = "NzbDrone.Update\\";
|
||||
public const string UPDATE_LOG_FOLDER_NAME = "UpdateLogs\\";
|
||||
private const string UPDATE_LOG_FOLDER_NAME = "UpdateLogs\\";
|
||||
|
||||
public static string NormalizePath(this string path)
|
||||
{
|
||||
|
@ -65,11 +65,10 @@ private static void InitLoggers()
|
||||
LogConfiguration.RegisterConsoleLogger(LogLevel.Trace);
|
||||
LogConfiguration.RegisterUdpLogger();
|
||||
|
||||
|
||||
var lastUpgradeLog = new FileTarget();
|
||||
lastUpgradeLog.AutoFlush = true;
|
||||
lastUpgradeLog.ConcurrentWrites = false;
|
||||
lastUpgradeLog.FileName = Path.Combine(PathExtentions.UPDATE_LOG_FOLDER_NAME, DateTime.Now.ToString("yyyy.MM.dd-H-mm") + ".txt");
|
||||
lastUpgradeLog.FileName = Path.Combine(new EnviromentProvider().GetSandboxLogFolder(), DateTime.Now.ToString("yyyy.MM.dd-H-mm") + ".txt");
|
||||
lastUpgradeLog.KeepFileOpen = false;
|
||||
lastUpgradeLog.Layout = "${longdate} - ${logger}: ${message} ${exception:format=ToString}";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user