Add logging of color codes (#1811)

This commit is contained in:
Daenges 2021-10-30 05:40:58 +02:00 committed by GitHub
parent 6928cd40fd
commit 4ba09754de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View file

@ -29,6 +29,7 @@ namespace MinecraftClient.Logger
{
try
{
if (!Settings.SaveColorCodes)
msg = ChatBot.GetVerbatim(msg);
if (prependTimestamp)
msg = GetTimestamp() + ' ' + msg;

View file

@ -60,6 +60,7 @@ filtermode=blacklist # blacklist OR whitelist. Blacklist hide mess
logtofile=false # Write log messages to file
logfile=console-log-%username%-%serverip%.txt # Log file name
prependtimestamp=false # Prepend timestamp to messages in log file
savecolorcodes=false # Keep color codes in the saved text (§b)
[AppVars]
# yourvar=yourvalue

View file

@ -116,6 +116,7 @@ namespace MinecraftClient
public static bool LogToFile = false;
public static string LogFile = "console-log.txt";
public static bool PrependTimestamp = false;
public static bool SaveColorCodes = false;
//AntiAFK Settings
public static bool AntiAFK_Enabled = false;
@ -502,6 +503,7 @@ namespace MinecraftClient
case "logtofile": LogToFile = str2bool(argValue); return true;
case "logfile": LogFile = argValue; return true;
case "prependtimestamp": PrependTimestamp = str2bool(argValue); return true;
case "savecolorcodes": SaveColorCodes = str2bool(argValue); return true;
}
break;