Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/recyclarr/src/commit/207d3aaf97c2ba75f46b26de77955dffdcbf700b/tests/Recyclarr.TestLibrary/TestableLogger.cs You should set ROOT_URL correctly, otherwise the web may not work correctly.
recyclarr/tests/Recyclarr.TestLibrary/TestableLogger.cs

29 lines
680 B

using JetBrains.Annotations;
using Serilog.Core;
using Serilog.Events;
namespace Recyclarr.TestLibrary;
[UsedImplicitly]
public sealed class TestableLogger : ILogger
{
private readonly Logger _log;
private readonly List<string> _messages = new();
public TestableLogger()
{
_log = new LoggerConfiguration()
.MinimumLevel.Is(LogEventLevel.Verbose)
.WriteTo.Observers(o => o.Subscribe(x => _messages.Add(x.RenderMessage())))
.WriteTo.Console()
.CreateLogger();
}
public void Write(LogEvent logEvent)
{
_log.Write(logEvent);
}
public IEnumerable<string> Messages => _messages;
}