Skip to content

Commit

Permalink
Dump ModuleManager log to main log after patching
Browse files Browse the repository at this point in the history
Makes it easier to debug people's issues
  • Loading branch information
blowfishpro committed Jan 10, 2019
1 parent de6b621 commit 6ed6702
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions ModuleManager/PostPatchLoader.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
Expand All @@ -7,6 +8,8 @@
using ModuleManager.Extensions;
using ModuleManager.Logging;

using static ModuleManager.FilePathRepository;

namespace ModuleManager
{
public delegate void ModuleManagerPostPatchCallback();
Expand Down Expand Up @@ -80,6 +83,20 @@ private IEnumerator Run()

databaseConfigs = null;

yield return null;

if (File.Exists(logPath))
{
logger.Info("Dumping ModuleManager log to main log");
logger.Info("\n#### BEGIN MODULEMANAGER LOG ####\n\n\n" + File.ReadAllText(logPath) + "\n\n\n#### END MODULEMANAGER LOG ####");
}
else
{
logger.Error("ModuleManager log does not exist: " + logPath);
}

yield return null;

#if DEBUG
InGameTestRunner testRunner = new InGameTestRunner(logger);
testRunner.RunTestCases(GameDatabase.Instance.root);
Expand Down

0 comments on commit 6ed6702

Please sign in to comment.