diff --git a/scripts/set-environment-minikube.fish b/scripts/set-environment-minikube.fish index c4e4bf4..b133da4 100755 --- a/scripts/set-environment-minikube.fish +++ b/scripts/set-environment-minikube.fish @@ -22,5 +22,4 @@ export KAFKA__EVENTROUTENETWORKTOPICNAME="event.route-network" export KAFKA__EVENTGEOGRAPHICALAREAUPDATED="event.geographical-area-updated" # Logging -export SERILOG__MINIMUMLEVEL__DEFAULT="Information" -export SERILOG__WRITETO__NAME="Console" +export SERILOG__MINIMUMLEVEL="Information" diff --git a/src/OpenFTTH.GDBIntegrator/Internal/HostConfig.cs b/src/OpenFTTH.GDBIntegrator/Internal/HostConfig.cs index 35a5b5b..45ab2f2 100644 --- a/src/OpenFTTH.GDBIntegrator/Internal/HostConfig.cs +++ b/src/OpenFTTH.GDBIntegrator/Internal/HostConfig.cs @@ -21,6 +21,7 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Serialization; using Serilog; +using Serilog.Formatting.Compact; namespace OpenFTTH.GDBIntegrator.Internal { @@ -105,6 +106,8 @@ private static void ConfigureLogging(IHostBuilder hostBuilder) { var logger = new LoggerConfiguration() .ReadFrom.Configuration(loggingConfiguration) + .Enrich.FromLogContext() + .WriteTo.Console(new CompactJsonFormatter()) .CreateLogger(); loggingBuilder.AddSerilog(logger, true); diff --git a/src/OpenFTTH.GDBIntegrator/OpenFTTH.GDBIntegrator.csproj b/src/OpenFTTH.GDBIntegrator/OpenFTTH.GDBIntegrator.csproj index 96dbb2e..817ef44 100644 --- a/src/OpenFTTH.GDBIntegrator/OpenFTTH.GDBIntegrator.csproj +++ b/src/OpenFTTH.GDBIntegrator/OpenFTTH.GDBIntegrator.csproj @@ -24,6 +24,7 @@ +