Files
SPT-Server-Build/Testing/UnitTests/Mock/MockLogger.cs
T
Cj c16c988fda Merge pull request #539 from CJ-SPT/test-mod
Intoduce test mod and restructure test suites into their own solution folder
2025-08-09 19:26:06 +00:00

83 lines
1.9 KiB
C#

using SPTarkov.DI.Annotations;
using SPTarkov.Server.Core.Models.Logging;
using SPTarkov.Server.Core.Models.Spt.Logging;
using SPTarkov.Server.Core.Models.Utils;
using SPTarkov.Server.Core.Utils.Logger;
namespace UnitTests.Mock;
[Injectable(TypeOverride = typeof(SptLogger<>))]
public class MockLogger<T> : ISptLogger<T>
{
public void LogWithColor(string data, LogTextColor? textColor = null, LogBackgroundColor? backgroundColor = null, Exception? ex = null)
{
Console.WriteLine(data);
}
public void Success(string data, Exception? ex = null)
{
Console.WriteLine(data);
}
public void Error(string data, Exception? ex = null)
{
Console.WriteLine(data);
}
public void Warning(string data, Exception? ex = null)
{
Console.WriteLine(data);
}
public void Info(string data, Exception? ex = null)
{
Console.WriteLine(data);
}
public void Debug(string data, Exception? ex = null)
{
Console.WriteLine(data);
}
public void Critical(string data, Exception? ex = null)
{
Console.WriteLine(data);
}
public void Log(
LogLevel level,
string data,
LogTextColor? textColor = null,
LogBackgroundColor? backgroundColor = null,
Exception? ex = null
)
{
throw new NotImplementedException();
}
public void WriteToLogFile(string body, LogLevel level = LogLevel.Info)
{
throw new NotImplementedException();
}
public bool IsLogEnabled(LogLevel level)
{
return true;
}
public void DumpAndStop()
{
throw new NotImplementedException();
}
public void LogWithColor(string data, Exception? ex = null, LogTextColor? textColor = null, LogBackgroundColor? backgroundColor = null)
{
Console.WriteLine(data);
}
public void WriteToLogFile(object body)
{
Console.WriteLine(body);
}
}