Skip to content

Commit

Permalink
Merge pull request #329 from amazingalek/dev
Browse files Browse the repository at this point in the history
harmony logs to OWML Logs folder (#328)
  • Loading branch information
amazingalek authored Dec 22, 2020
2 parents c03274c + f7fca7a commit b72f3a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/OWML.Launcher/OWML.Manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Alek",
"name": "OWML",
"uniqueName": "Alek.OWML",
"version": "1.1.1",
"version": "1.1.2",
"description": "The mod loader and mod framework for Outer Wilds",
"minGameVersion": "1.0.7.0",
"maxGameVersion": "1.0.7.481"
Expand Down
6 changes: 5 additions & 1 deletion src/OWML.ModHelper.Events/HarmonyHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ public class HarmonyHelper : IHarmonyHelper
private readonly IModLogger _logger;
private readonly IModConsole _console;
private readonly IModManifest _manifest;
private readonly IOwmlConfig _owmlConfig;
private readonly HarmonyInstance _harmony;

public HarmonyHelper(IModLogger logger, IModConsole console, IModManifest manifest)
public HarmonyHelper(IModLogger logger, IModConsole console, IModManifest manifest, IOwmlConfig owmlConfig)
{
_logger = logger;
_console = console;
_manifest = manifest;
_owmlConfig = owmlConfig;

_harmony = CreateInstance();
}

Expand All @@ -27,6 +30,7 @@ private HarmonyInstance CreateInstance()
{
_logger.Log($"Creating harmony instance: {_manifest.UniqueName}");
HarmonyInstance.DEBUG = true;
FileLog.logPath = $"{_owmlConfig.LogsPath}/harmony.log.txt";
harmony = HarmonyInstance.Create(_manifest.UniqueName);
}
catch (TypeLoadException ex)
Expand Down

0 comments on commit b72f3a0

Please sign in to comment.