From 0af69af204cd354b5803b8b7e5cc3a72abd2ac51 Mon Sep 17 00:00:00 2001 From: stam Date: Thu, 14 Jan 2021 20:00:27 +0300 Subject: [PATCH] logs --- src/atlassian-downloader/Program.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/atlassian-downloader/Program.cs b/src/atlassian-downloader/Program.cs index b482058..9af80d0 100644 --- a/src/atlassian-downloader/Program.cs +++ b/src/atlassian-downloader/Program.cs @@ -40,9 +40,11 @@ namespace EpicMorg.Atlassian.Downloader { .AddEnvironmentVariables(); }) .ConfigureServices((ctx, services) => { + services .AddOptions() .AddLogging(builder => { + builder.ClearProviders(); Log.Logger = new LoggerConfiguration() .ReadFrom.Configuration(ctx.Configuration) .CreateLogger(); @@ -96,7 +98,7 @@ namespace EpicMorg.Atlassian.Downloader { }; Console.Title = $"{appTitle} {appVersion} {appBuildType}"; - logger.LogInformation($"Task started at {appStartupDate}."); + logger.LogTrace($"Task started at {appStartupDate}."); var client = new HttpClient(); @@ -143,11 +145,11 @@ namespace EpicMorg.Atlassian.Downloader { } } } - logger.LogCritical($"All files from \"{feedUrl}\" successfully downloaded."); + logger.LogTrace($"All files from \"{feedUrl}\" successfully downloaded."); } } - logger.LogCritical($"Download complete at {appStartupDate}."); + logger.LogTrace($"Download complete at {appStartupDate}."); }