mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Add logging of color codes (#1811)
This commit is contained in:
parent
6928cd40fd
commit
4ba09754de
3 changed files with 5 additions and 1 deletions
|
|
@ -29,6 +29,7 @@ namespace MinecraftClient.Logger
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (!Settings.SaveColorCodes)
|
||||||
msg = ChatBot.GetVerbatim(msg);
|
msg = ChatBot.GetVerbatim(msg);
|
||||||
if (prependTimestamp)
|
if (prependTimestamp)
|
||||||
msg = GetTimestamp() + ' ' + msg;
|
msg = GetTimestamp() + ' ' + msg;
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@ filtermode=blacklist # blacklist OR whitelist. Blacklist hide mess
|
||||||
logtofile=false # Write log messages to file
|
logtofile=false # Write log messages to file
|
||||||
logfile=console-log-%username%-%serverip%.txt # Log file name
|
logfile=console-log-%username%-%serverip%.txt # Log file name
|
||||||
prependtimestamp=false # Prepend timestamp to messages in log file
|
prependtimestamp=false # Prepend timestamp to messages in log file
|
||||||
|
savecolorcodes=false # Keep color codes in the saved text (§b)
|
||||||
|
|
||||||
[AppVars]
|
[AppVars]
|
||||||
# yourvar=yourvalue
|
# yourvar=yourvalue
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,7 @@ namespace MinecraftClient
|
||||||
public static bool LogToFile = false;
|
public static bool LogToFile = false;
|
||||||
public static string LogFile = "console-log.txt";
|
public static string LogFile = "console-log.txt";
|
||||||
public static bool PrependTimestamp = false;
|
public static bool PrependTimestamp = false;
|
||||||
|
public static bool SaveColorCodes = false;
|
||||||
|
|
||||||
//AntiAFK Settings
|
//AntiAFK Settings
|
||||||
public static bool AntiAFK_Enabled = false;
|
public static bool AntiAFK_Enabled = false;
|
||||||
|
|
@ -502,6 +503,7 @@ namespace MinecraftClient
|
||||||
case "logtofile": LogToFile = str2bool(argValue); return true;
|
case "logtofile": LogToFile = str2bool(argValue); return true;
|
||||||
case "logfile": LogFile = argValue; return true;
|
case "logfile": LogFile = argValue; return true;
|
||||||
case "prependtimestamp": PrependTimestamp = str2bool(argValue); return true;
|
case "prependtimestamp": PrependTimestamp = str2bool(argValue); return true;
|
||||||
|
case "savecolorcodes": SaveColorCodes = str2bool(argValue); return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue