Skip to content

Commit 1042b3f

Browse files
committed
fixing code blocks
1 parent 68d667c commit 1042b3f

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

docs/core/enrichment/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ To use log enrichment in your application, you need to:
3333

3434
Here's a simple example showing how to set up log enrichment with process information:
3535

36-
:::code language="csharp" source="snippets/enrichment/Program.cs" highlight="15,16":::
36+
:::code language="csharp" source="snippets/enrichment/Program.cs" range="3-34" highlight="15,16":::
3737

3838
This configuration:
3939

docs/core/enrichment/process-log-enricher.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dotnet package add Microsoft.Extensions.Telemetry
3030

3131
To be able to use the process log enricher, first you need to enable enrichment. Then you can add the <xref:Microsoft.Extensions.DependencyInjection.ProcessEnricherServiceCollectionExtensions.AddProcessLogEnricher*> with default properties, like this:
3232

33-
:::code language="csharp" source="snippets/enrichment/Program.cs" highlight="14,15":::
33+
:::code language="csharp" source="snippets/enrichment/Program.cs" range="3-34" highlight="15,16":::
3434

3535
Given this code sample, the output should be like this:
3636

docs/core/enrichment/snippets/enrichment/Program.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ public static async Task Main()
1313
{
1414
var builder = Host.CreateApplicationBuilder();
1515
builder.Logging.EnableEnrichment();
16+
builder.Services.AddProcessLogEnricher();
1617
builder.Logging.AddJsonConsole(op =>
1718
{
1819
op.JsonWriterOptions = new JsonWriterOptions
1920
{
2021
Indented = true
2122
};
2223
});
23-
builder.Services.AddProcessLogEnricher();
2424
var hostBuilder = builder.Build();
2525
var logger =
2626
hostBuilder.Services.GetRequiredService<ILoggerFactory>().CreateLogger<Program>();
@@ -33,4 +33,3 @@ public static async Task Main()
3333
}
3434
}
3535
#endif
36-

0 commit comments

Comments
 (0)