Implement log to file logger (#1494)

* Implement log to file

Logger moved to it's own namespace

* Add lock to log file
This commit is contained in:
ReinforceZwei 2021-03-07 14:23:26 +08:00 committed by GitHub
parent 62c985376e
commit 240468ad22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 306 additions and 144 deletions

View file

@ -110,6 +110,9 @@ namespace MinecraftClient
public static Regex ChatFilter = null;
public static Regex DebugFilter = null;
public static FilterModeEnum FilterMode = FilterModeEnum.Blacklist;
public static bool LogToFile = false;
public static string LogFile = "console-log.txt";
public static bool PrependTimestamp = false;
//AntiAFK Settings
public static bool AntiAFK_Enabled = false;
@ -428,6 +431,9 @@ namespace MinecraftClient
else
FilterMode = FilterModeEnum.Blacklist;
break;
case "logtofile": LogToFile = str2bool(argValue); break;
case "logfile": LogFile = argValue; break;
case "prependtimestamp": PrependTimestamp = str2bool(argValue); break;
}
break;