|
|
|
@ -42,10 +42,10 @@ public static class LoggingFileExtensions
|
|
|
|
|
public static WebApplicationBuilder UseLoggingFile(this WebApplicationBuilder builder)
|
|
|
|
|
{
|
|
|
|
|
builder.Logging.ClearProviders();
|
|
|
|
|
builder.Logging.AddConsole(options =>
|
|
|
|
|
{
|
|
|
|
|
options.FormatterName = "custom_format";
|
|
|
|
|
}).AddConsoleFormatter<ConsoleForamt, ConsoleFormatterOptions>();
|
|
|
|
|
//builder.Logging.AddConsole(options =>
|
|
|
|
|
//{
|
|
|
|
|
// options.FormatterName = "custom_format";
|
|
|
|
|
//}).AddConsoleFormatter<ConsoleForamt, ConsoleFormatterOptions>();
|
|
|
|
|
builder.Services.AddComponent<LoggingFileComponent>();
|
|
|
|
|
return builder;
|
|
|
|
|
}
|
|
|
|
|