From e5d7cca6c61d0504f75cdcf89d775061e5b98c4e Mon Sep 17 00:00:00 2001 From: ikpil Date: Mon, 24 Apr 2023 23:18:48 +0900 Subject: [PATCH] async log --- src/DotRecast.Recast.Demo/Program.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/DotRecast.Recast.Demo/Program.cs b/src/DotRecast.Recast.Demo/Program.cs index e8a49b2..6608e9a 100644 --- a/src/DotRecast.Recast.Demo/Program.cs +++ b/src/DotRecast.Recast.Demo/Program.cs @@ -25,13 +25,14 @@ public static class Program .Enrich.WithThreadId() .Enrich.WithThreadName() .Enrich.WithProperty(ThreadNameEnricher.ThreadNamePropertyName, "main") - .WriteTo.LogMessageBroker(outputTemplate: format) - .WriteTo.Console(outputTemplate: format) - .WriteTo.File( + .WriteTo.Async(c => c.LogMessageBroker(outputTemplate: format)) + .WriteTo.Async(c => c.Console(outputTemplate: format)) + .WriteTo.Async(c => c.File( "logs/log.log", rollingInterval: RollingInterval.Day, rollOnFileSizeLimit: true, outputTemplate: format) + ) .CreateLogger(); Run();