feat:uow & log
This commit is contained in:
parent
f0d96c0cb3
commit
b6e3bb6678
@ -6,6 +6,9 @@
|
||||
"Microsoft.AspNetCore": "Debug"
|
||||
}
|
||||
},
|
||||
"Properties": {
|
||||
"ServiceName": "interface-api"
|
||||
},
|
||||
"Enrich": [
|
||||
"FromLogContext",
|
||||
"WithMachineName",
|
||||
@ -16,7 +19,8 @@
|
||||
{
|
||||
"Name": "Console",
|
||||
"Args": {
|
||||
"outputTemplate": "[{Timestamp:HH:mm:ss} {Level:u3}] {SourceContext} - {Message:lj}{NewLine}{Exception}"
|
||||
"outputTemplate": "[{Timestamp:HH:mm:ss} {Level:u3}] {SourceContext} - {Message:lj}{NewLine}{Exception}",
|
||||
"formatter": "Serilog.Formatting.Json.JsonFormatter, Serilog"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using System.Text;
|
||||
using Fake.DependencyInjection;
|
||||
using Fake.UnitOfWork;
|
||||
using InterfaceForward.Application.Contracts.ForwardCore;
|
||||
using InterfaceForward.Application.Services;
|
||||
using InterfaceForward.Domain.Shared;
|
||||
@ -24,7 +25,8 @@ public class BatchForwardEventHandler(
|
||||
return options.Queue.StartsWith(BatchForwardEventSubscribe);
|
||||
}
|
||||
|
||||
public async Task Handle(BasicDeliverEventArgs args)
|
||||
[UnitOfWork]
|
||||
public virtual async Task Handle(BasicDeliverEventArgs args)
|
||||
{
|
||||
var msg = Encoding.UTF8.GetString(args.Body.ToArray());
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user