Skip to content

Commit 39e4157

Browse files
committed
Put log paths in path repository
1 parent 09b1eff commit 39e4157

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

ModuleManager/FilePathRepository.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@ internal static class FilePathRepository
1717
internal static readonly string partDatabasePath = Path.Combine(KSPUtil.ApplicationRootPath, "PartDatabase.cfg");
1818

1919
internal static readonly string shaPath = Path.Combine(Path.Combine(KSPUtil.ApplicationRootPath, "GameData"), "ModuleManager.ConfigSHA");
20+
21+
internal static readonly string logsDirPath = Path.Combine(KSPUtil.ApplicationRootPath, "Logs");
22+
internal static readonly string logPath = Path.Combine(logsDirPath, "ModuleManager.log");
2023
}
2124
}

ModuleManager/MMPatchRunner.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
using ModuleManager.Logging;
99
using ModuleManager.Threading;
1010

11+
using static ModuleManager.FilePathRepository;
12+
1113
namespace ModuleManager
1214
{
1315
public class MMPatchRunner
@@ -28,9 +30,7 @@ public IEnumerator Run()
2830
{
2931
PostPatchLoader.Instance.databaseConfigs = null;
3032

31-
string logsDirPath = Path.Combine(KSPUtil.ApplicationRootPath, "Logs");
3233
if (!Directory.Exists(logsDirPath)) Directory.CreateDirectory(logsDirPath);
33-
string logPath = Path.Combine(logsDirPath, "ModuleManager.log");
3434

3535
kspLogger.Info("Patching started on a new thread, all output will be directed to " + logPath);
3636

0 commit comments

Comments
 (0)