You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core/extensions/logging.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Logging
3
3
author: IEvangelist
4
4
description: Learn how to use the logging framework provided by the Microsoft.Extensions.Logging NuGet package.
5
5
ms.author: dapine
6
-
ms.date: 06/27/2022
6
+
ms.date: 08/29/2022
7
7
---
8
8
9
9
# Logging in .NET
@@ -36,10 +36,11 @@ Logging configuration is commonly provided by the `Logging` section of *appsetti
36
36
37
37
In the preceding JSON:
38
38
39
-
- The `"Default"`, `"Microsoft"`, and `"Microsoft.Hosting.Lifetime"` categories are specified.
39
+
- The `"Default"`, `"Microsoft"`, and `"Microsoft.Hosting.Lifetime"` log level categories are specified.
40
+
- The `"Default"` value is applied to all categories that aren't otherwise specified, effectively making all default values for all categories `"Information"`. You can override this behavior by specifying a value for a category.
40
41
- The `"Microsoft"` category applies to all categories that start with `"Microsoft"`.
41
-
- The `"Microsoft"` category logs at log level `Warning` and higher.
42
-
- The `"Microsoft.Hosting.Lifetime"` category is more specific than the `"Microsoft"` category, so the `"Microsoft.Hosting.Lifetime"` category logs at log level "Information" and higher.
42
+
- The `"Microsoft"` category logs at a log level of`Warning` and higher.
43
+
- The `"Microsoft.Hosting.Lifetime"` category is more specific than the `"Microsoft"` category, so the `"Microsoft.Hosting.Lifetime"` category logs at log level `"Information"` and higher.
43
44
- A specific log provider is not specified, so `LogLevel` applies to all the enabled logging providers except for the [Windows EventLog](logging-providers.md#windows-eventlog).
44
45
45
46
The `Logging` property can have <xref:Microsoft.Extensions.Logging.LogLevel> and log provider properties. The `LogLevel` specifies the minimum [level](#log-level) to log for selected categories. In the preceding JSON, `Information` and `Warning` log levels are specified. `LogLevel` indicates the severity of the log and ranges from 0 to 6:
0 commit comments