set verbose default for debug

This commit is contained in:
Jakob 2023-04-03 20:57:46 +02:00
parent e4281943cd
commit ae9f50354e
2 changed files with 7 additions and 2 deletions

View file

@ -9,7 +9,13 @@ namespace EnvyUpdate
class Debug class Debug
{ {
public static bool isFake = false; public static bool isFake = false;
#if DEBUG
public static bool isVerbose = true;
#else
public static bool isVerbose = false; public static bool isVerbose = false;
#endif
public static string debugFile = Path.Combine(GlobalVars.exedirectory, "envyupdate.log"); public static string debugFile = Path.Combine(GlobalVars.exedirectory, "envyupdate.log");
public static int LoadFakeIDs(string idType) public static int LoadFakeIDs(string idType)

View file

@ -37,9 +37,8 @@ namespace EnvyUpdate
// This is necessary, since .NET throws an exception if you check for a non-existant arg. // This is necessary, since .NET throws an exception if you check for a non-existant arg.
} }
if (arguments.Contains("/verbose")) if (Debug.isVerbose)
{ {
Debug.isVerbose = true;
if (!File.Exists(Debug.debugFile)) if (!File.Exists(Debug.debugFile))
File.CreateText(Debug.debugFile); File.CreateText(Debug.debugFile);
File.AppendAllText(Debug.debugFile, "INFO Starting EnvyUpdate, version " + System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).FileVersion); File.AppendAllText(Debug.debugFile, "INFO Starting EnvyUpdate, version " + System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).FileVersion);