Browse Source

Changed default options to not emit log files for every plugin seperately

pull/94/head
Anairkoen Schno 3 years ago
parent
commit
c812dd67bf
Signed by: DaNike GPG Key ID: BEFB74D5F3FC4387
3 changed files with 19 additions and 11 deletions
  1. +11
    -2
      IPA.Loader/Config/SelfConfig.cs
  2. +3
    -2
      IPA.Loader/Logging/StandardLogger.cs
  3. +5
    -7
      docs/articles/command-line.md

+ 11
- 2
IPA.Loader/Config/SelfConfig.cs View File

@ -56,6 +56,9 @@ namespace IPA.Config
case "--condense-logs":
CommandLineValues.Debug.CondenseModLogs = true;
break;
case "--plugin-logs":
CommandLineValues.Debug.CreateModLogs = true;
break;
#if false
case "--no-updates":
CommandLineValues.Updates.AutoCheckUpdates = false;
@ -117,6 +120,12 @@ namespace IPA.Config
public static bool CondenseModLogs_ => (Instance?.Debug?.CondenseModLogs ?? false)
|| CommandLineValues.Debug.CondenseModLogs;
// This option only takes effect after a full game restart, unless new logs are created again
public virtual bool CreateModLogs { get; set; } = false;
// LINE: ignore 2
public static bool CreateModLogs_ => (Instance?.Debug?.CreateModLogs ?? false)
|| CommandLineValues.Debug.CreateModLogs;
public virtual bool ShowHandledErrorStackTraces { get; set; } = false;
// LINE: ignore
public static bool ShowHandledErrorStackTraces_ => Instance?.Debug?.ShowHandledErrorStackTraces ?? false;
@ -164,9 +173,9 @@ namespace IPA.Config
// LINE: ignore
public static HashSet<string> GameAssemblies_ => Instance?.GameAssemblies ?? new HashSet<string> { "Assembly-CSharp.dll" };
[JsonProperty(Required = Required.DisallowNull)] // Used for documentation schema generation
// LINE: ignore
#if false
#if false // Used for documentation schema generation
[JsonProperty(Required = Required.DisallowNull)]
public virtual string LastGameVersion { get; set; } = null;
// LINE: ignore 2
#endif


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

@ -131,7 +131,7 @@ namespace IPA.Logging
logName = $"{parent.logName}/{subName}";
this.parent = parent;
printers = new List<LogPrinter>();
if (!SelfConfig.Debug_.CondenseModLogs_)
if (SelfConfig.Debug_.CreateModLogs_ && !SelfConfig.Debug_.CondenseModLogs_)
printers.Add(new PluginSubLogPrinter(parent.logName, subName));
if (logThread == null || !logThread.IsAlive)
@ -153,7 +153,8 @@ namespace IPA.Logging
}
logName = name;
printers.Add(new PluginLogFilePrinter(name));
if (SelfConfig.Debug_.CreateModLogs_)
printers.Add(new PluginLogFilePrinter(name));
if (logThread == null || !logThread.IsAlive)
{


+ 5
- 7
docs/articles/command-line.md View File

@ -83,15 +83,13 @@ Here's a quick list of what they are and what they do.
> that behaviour, and restricts it to only create a global log and mod logs.
>
> Overrides the config setting `Debug.CondenseModLogs`.
>
- `--no-updates`
> Disables automatic updating.
>
> By default, BSIPA will check [BeatMods](http://beatmods.com) for all of the loaded mods to see if there is a new version
> avaliable. If there is, it will be downloaded and installed on the next run. This flag disables that behaviour.
- `--plugin-logs`
> Causes each plugins' log messages to be written to files in their own folder for ease of debugging.
>
> Overrides the config settings `Updates.AutoCheckUpdates` and `Updates.AutoUpdate`.
> This was the default through 4.1.6, however is now disabled by default.
>
> Overrides the config setting `Debug.CreateModLogs`.
***

Loading…
Cancel
Save