Skip to content

Commit 2c736f6

Browse files
committed
Add console exporter for Azure Monitor conditioned to ENV Var values.
1 parent c4a7b38 commit 2c736f6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dotnet/src/dotnetcore/GxClasses/Services/LogService/OpenTelemetry/OtelLogProvider.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public static ILoggerFactory GetAzureMonitorLoggerFactory()
2828
builder.AddOpenTelemetry(options =>
2929
{
3030
options.AddAzureMonitorLogExporter(o => o.ConnectionString = appInsightsConnection);
31+
if (GenerateOtelLogsToConsole())
32+
options.AddConsoleExporter();
3133
}).SetMinimumLevel(loglevel);
3234
});
3335
}

0 commit comments

Comments
 (0)