mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
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:
parent
62c985376e
commit
240468ad22
11 changed files with 306 additions and 144 deletions
|
|
@ -12,6 +12,7 @@ using MinecraftClient.Proxy;
|
|||
using MinecraftClient.Protocol.Handlers.Forge;
|
||||
using MinecraftClient.Mapping;
|
||||
using MinecraftClient.Inventory;
|
||||
using MinecraftClient.Logger;
|
||||
|
||||
namespace MinecraftClient
|
||||
{
|
||||
|
|
@ -176,7 +177,9 @@ namespace MinecraftClient
|
|||
this.port = port;
|
||||
this.protocolversion = protocolversion;
|
||||
|
||||
this.Log = new MCLogger();
|
||||
this.Log = Settings.LogToFile
|
||||
? new FileLogLogger(Settings.ExpandVars(Settings.LogFile), Settings.PrependTimestamp)
|
||||
: new FilteredLogger();
|
||||
Log.DebugEnabled = Settings.DebugMessages;
|
||||
Log.InfoEnabled = Settings.InfoMessages;
|
||||
Log.ChatEnabled = Settings.ChatMessages;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue