Browse Source

Added config option to reduce number of log files created

pull/46/head
Anairkoen Schno 5 years ago
parent
commit
0556d5355f
2 changed files with 9 additions and 4 deletions
  1. +6
    -0
      IPA.Loader/Config/SelfConfig.cs
  2. +3
    -4
      IPA.Loader/Logging/StandardLogger.cs

+ 6
- 0
IPA.Loader/Config/SelfConfig.cs View File

@ -72,6 +72,12 @@ namespace IPA.Config
// LINE: ignore
public static bool ShowDebug_ => SelfConfigRef.Value.Debug.ShowDebug;
// This option only takes effect after a full game restart, unless new logs are created again
public bool CondenseModLogs = false;
// LINE: ignore 2
public static bool CondenseModLogs_ => SelfConfigRef.Value.Debug.CondenseModLogs
&& CommandLineValues.Debug.CondenseModLogs;
public bool ShowHandledErrorStackTraces = false;
// LINE: ignore
public static bool ShowHandledErrorStackTraces_ => SelfConfigRef.Value.Debug.ShowHandledErrorStackTraces;


+ 3
- 4
IPA.Loader/Logging/StandardLogger.cs View File

@ -120,10 +120,9 @@ namespace IPA.Logging
{
logName = $"{parent.logName}/{subName}";
this.parent = parent;
printers = new List<LogPrinter>()
{
new PluginSubLogPrinter(parent.logName, subName)
};
printers = new List<LogPrinter>();
if (SelfConfig.Debug_.CondenseModLogs_)
printers.Add(new PluginSubLogPrinter(parent.logName, subName));
if (logThread == null || !logThread.IsAlive)
{


Loading…
Cancel
Save