dotnet / dotnet/docs

Logging output of the LogWithCustomEventName example fails to demonstrate the feature

Open
#26,886 0 comments 0 reactions 0 assignees View on GitHub
dotnet-fundamentals/svc okr-quality
Dominant language
No language data
Stars
4.8k
Forks
6.1k
Avg merge
15h 21m
Merged PRs (30d)
370

Description

Under [Additional logging examples](https://docs.microsoft.com/en-us/dotnet/core/extensions/logger-message-generator#additional-logging-examples) there is a code example where a logger message with a custom `EventName` is defined (the method name in the example code is `LogWithCustomEventName`, it is the second method declared). The example logging outputs below that both fail to demonstrate the result of setting `EventName` (the log message that should demonstrate it is the first log message in both outputs).

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 6fc4ecf0-19e4-54d3-c34e-b6eadb80262b
* Version Independent ID: decc74aa-a2d5-8727-f22b-3862bacde737
* Content: [Compile-time logging source generation](https://docs.microsoft.com/en-us/dotnet/core/extensions/logger-message-generator)
* Content Source: [docs/core/extensions/logger-message-generator.md](https://github.com/dotnet/docs/blob/main/docs/core/extensions/logger-message-generator.md)
* Product: **dotnet-fundamentals**
* GitHub Login: @maryamariyan
* Microsoft Alias: **maariyan**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.