diff --git a/CleanArchitecture.Api/Program.cs b/CleanArchitecture.Api/Program.cs index 6be1f06..da17e91 100644 --- a/CleanArchitecture.Api/Program.cs +++ b/CleanArchitecture.Api/Program.cs @@ -12,6 +12,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; var builder = WebApplication.CreateBuilder(args); @@ -49,6 +50,12 @@ builder.Services.AddApiUser(); builder.Services.AddMediatR(cfg => { cfg.RegisterServicesFromAssemblies(typeof(Program).Assembly); }); +builder.Services.AddLogging(x => x.AddSimpleConsole(console => +{ + console.TimestampFormat = "[yyyy-MM-ddTHH:mm:ss.fff] "; + console.IncludeScopes = true; +})); + var app = builder.Build(); using (var scope = app.Services.CreateScope())