Browse Source

Added config option to reduce number of log files created

pull/32/head
Anairkoen Schno 5 years ago
parent
commit
0cc297146d
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 // LINE: ignore
public static bool ShowDebug_ => SelfConfigRef.Value.Debug.ShowDebug; 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; public bool ShowHandledErrorStackTraces = false;
// LINE: ignore // LINE: ignore
public static bool ShowHandledErrorStackTraces_ => SelfConfigRef.Value.Debug.ShowHandledErrorStackTraces; 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}"; logName = $"{parent.logName}/{subName}";
this.parent = parent; 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) if (logThread == null || !logThread.IsAlive)
{ {


Loading…
Cancel
Save