Files
HardwareMonitorStatusWindow/StatusWindow/SerilogVelopackLogger.cs
Chris Kaczor 2e14ff032b
All checks were successful
Deploy to Gitea Releases / deploy-to-gitea-releases (push) Successful in 1m12s
Adjust logging and add debugger option
2026-01-27 19:59:51 -05:00

18 lines
490 B
C#

using System;
using Velopack.Logging;
namespace HardwareMonitorStatusWindow.StatusWindow;
internal class SerilogVelopackLogger : IVelopackLogger
{
public void Log(VelopackLogLevel logLevel, string? message, Exception? exception)
{
if (exception != null)
{
Serilog.Log.Error(exception, "");
return;
}
Serilog.Log.Information("[{time}] [{logLevel}] {message}", DateTime.Now.ToShortTimeString(), logLevel, message);
}
}