Implement new logger (#1426)

* Implement multi-channel logger

* Implement chat filter

* Improve a bit

* Improvement

* Add debug message filter and filter mode

* Avoid duplicate debug prefix string

Co-authored-by: ORelio <ORelio@users.noreply.github.com>
This commit is contained in:
ReinforceZwei 2021-01-29 07:45:18 +08:00 committed by GitHub
parent 939c8fb383
commit 38a890f840
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 277 additions and 43 deletions

View file

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MinecraftClient
{
public interface ILogger
{
bool DebugEnabled { get; set; }
bool WarnEnabled { get; set; }
bool InfoEnabled { get; set; }
bool ErrorEnabled { get; set; }
bool ChatEnabled { get; set; }
void Info(string msg);
void Info(string msg, params object[] args);
void Info(object msg);
void Debug(string msg);
void Debug(string msg, params object[] args);
void Debug(object msg);
void Warn(string msg);
void Warn(string msg, params object[] args);
void Warn(object msg);
void Error(string msg);
void Error(string msg, params object[] args);
void Error(object msg);
void Chat(string msg);
void Chat(string msg, params object[] args);
void Chat(object msg);
}
}