Use Serilog in EntityFramework Core logging.

This commit is contained in:
2025-07-24 21:23:53 +01:00
parent 1435aa10ee
commit bf19439e49
15 changed files with 69 additions and 36 deletions

View File

@@ -32,6 +32,8 @@ using CommunityToolkit.Mvvm.Input;
using RomRepoMgr.Core.EventArgs;
using RomRepoMgr.Core.Workers;
using RomRepoMgr.Views;
using Serilog;
using Serilog.Extensions.Logging;
namespace RomRepoMgr.ViewModels;
@@ -154,7 +156,7 @@ public sealed partial class ExportRomsViewModel : ViewModelBase
public void OnOpened()
{
var worker = new FileExporter(_romSetId, FolderPath);
var worker = new FileExporter(_romSetId, FolderPath, new SerilogLoggerFactory(Log.Logger));
worker.SetMessage += OnWorkerOnSetMessage;
worker.SetProgress += OnWorkerOnSetProgress;
worker.SetProgressBounds += OnWorkerOnSetProgressBounds;