Adjust logging and add debugger option
All checks were successful
Deploy to Gitea Releases / deploy-to-gitea-releases (push) Successful in 1m12s
All checks were successful
Deploy to Gitea Releases / deploy-to-gitea-releases (push) Successful in 1m12s
This commit is contained in:
18
StatusWindow/SerilogVelopackLogger.cs
Normal file
18
StatusWindow/SerilogVelopackLogger.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user