From 48e204021f554cfefc2c2c3692cf7d2163363843 Mon Sep 17 00:00:00 2001 From: martincostello Date: Sun, 26 Nov 2023 15:07:30 +0000 Subject: [PATCH] Configure logging Apply logging configuration from `IConfiguration`. --- src/LondonTravel.Skill/AlexaFunction.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/LondonTravel.Skill/AlexaFunction.cs b/src/LondonTravel.Skill/AlexaFunction.cs index 8164bfce..7cec2511 100644 --- a/src/LondonTravel.Skill/AlexaFunction.cs +++ b/src/LondonTravel.Skill/AlexaFunction.cs @@ -121,7 +121,11 @@ protected virtual void ConfigureServices(IServiceCollection services) services.AddOptions(); services.Configure(configuration.GetSection("Skill")); - services.AddLogging((builder) => builder.AddJsonConsole()); + services.AddLogging((builder) => + { + builder.AddConfiguration(configuration.GetSection("Logging")); + builder.AddJsonConsole(); + }); services.AddHttpClients();