Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve LoggerFactory and Logger debugging #88313

Merged
merged 5 commits into from
Jul 4, 2023

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Jul 3, 2023

LoggerFactory

The changes to LoggerFactory make it easy to discover the common configuration for logging:

  • What log providers are configured (e.g. event source, console, etc)
  • What level filters are configured. This includes the global minimum log level, and rules for customizing logging for individual providers and categories

Before

image

After

image

Logger

Logger changes denormalize information back to an understandable form. It's now easy to see what providers are enabled for this logger and the min log level for each provider.

Before

image

After

image

@ghost
Copy link

ghost commented Jul 3, 2023

Tagging subscribers to this area: @dotnet/area-extensions-logging
See info in area-owners.md if you want to be subscribed.

Issue Details

LoggerFactory

Before

image

After

image

Logger

Before

image

After

image

Author: JamesNK
Assignees: -
Labels:

area-Extensions-Logging

Milestone: -

@JamesNK JamesNK changed the title Improve LoggerFactory debugging Improve LoggerFactory and Logger debugging Jul 3, 2023
@@ -19,7 +19,7 @@ public MessageLogger(ILogger logger, string? category, string? providerTypeFullN

public ILogger Logger { get; }

public string? Category { get; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public string? Category { get; }

are we sure the category never be null?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nullable analysis says it can't. I changed it because I didn't see any code paths that allowed null.

@tarekgh tarekgh added this to the 8.0.0 milestone Jul 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants