dotnet / dotnet/docs

State processing unclear, fragments left in document

Open
#41,327 2 comments 0 reactions 1 assignee Claimed by @gewarren View on GitHub
:pushpin: seQUESTered dotnet-fundamentals/svc
Dominant language
No language data
Stars
4.8k
Forks
6.1k
Avg merge
15h 21m
Merged PRs (30d)
370

Description

### Type of issue

Missing information

### Description

In the article there's a code block that just contains:

```
TState state,
Exception? exception,
```

It is not referenced or explained by the surrounding text. It looks like this article is an editor's draft and not meant to be published.

Also, exactly this state handling is unclear. I want to use the structured logging in my custom logger and therefore I need to access 1. the original log message and 2. the log values with name and value. I can have the values list by casting the internal type `FormattedLogValues` to the list type it implements (and that I only know from digging into the Microsoft source code or doing some runtime type reverse engineering). Feels like a hack but it's not documented. But the original message with the placeholders is inaccessible. Everything is internal, sealed and locked down. As if Microsoft doesn't want me to implement a custom logger. Then why does this article even exist if that shouldn't be possible?

### Page URL

https://learn.microsoft.com/en-us/dotnet/core/extensions/custom-logging-provider

### Content source URL

https://github.com/dotnet/docs/blob/main/docs/core/extensions/custom-logging-provider.md

### Document Version Independent Id

e111baf5-04b7-c497-ce86-eb687e121751

### Article author

@IEvangelist

### Metadata

* ID: b609eb80-71e8-7a3c-4c4c-60cf9a315cfb
* Service: **dotnet-fundamentals**

---
[Associated WorkItem - 550636](https://dev.azure.com/msft-skilling/Content/_workitems/edit/550636)

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.