1
0
DiscordMediaRichPresence/DiscordMediaRP/DisLogger.cs

36 lines
890 B
C#
Raw Normal View History

2024-02-22 02:46:19 +01:00
using Microsoft.Extensions.Logging;
namespace DiscordMediaRP;
public class DisLogger : DiscordRPC.Logging.ILogger
{
//WHY TF DID YOU CREATE YOUR OWN LOGGER-TYPE YOU *********
private ILogger? _logger;
public DisLogger(ILogger? logger)
{
this._logger = logger;
}
public void Trace(string message, params object[] args)
{
this._logger?.Log(LogLevel.Trace, message, args);
}
public void Info(string message, params object[] args)
{
this._logger?.Log(LogLevel.Information, message, args);
}
public void Warning(string message, params object[] args)
{
this._logger?.Log(LogLevel.Warning, message, args);
}
public void Error(string message, params object[] args)
{
this._logger?.Log(LogLevel.Error, message, args);
}
public DiscordRPC.Logging.LogLevel Level { get; set; }
}