From a75a5c46604d3632a4f90ee07434227e4f849935 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Fri, 11 Jun 2021 12:44:48 +0800 Subject: [PATCH] inline initialization --- Flow.Launcher.Infrastructure/Logger/Log.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher.Infrastructure/Logger/Log.cs b/Flow.Launcher.Infrastructure/Logger/Log.cs index 1784726d9..4b69c7791 100644 --- a/Flow.Launcher.Infrastructure/Logger/Log.cs +++ b/Flow.Launcher.Infrastructure/Logger/Log.cs @@ -26,9 +26,11 @@ namespace Flow.Launcher.Infrastructure.Logger } var configuration = new LoggingConfiguration(); - var fileTarget = new FileTarget(); - fileTarget.FileName = CurrentLogDirectory.Replace(@"\", "/") + "/${shortdate}.txt"; - + var fileTarget = new FileTarget + { + FileName = CurrentLogDirectory.Replace(@"\", "/") + "/${shortdate}.txt" + }; + var fileTargetASyncWrapper = new AsyncTargetWrapper(fileTarget); configuration.AddTarget("file", fileTargetASyncWrapper); #if DEBUG