Skip to content

Commit 8a9271f

Browse files
committed
full edit dynamic logging topics
1 parent 214f54e commit 8a9271f

File tree

3 files changed

+22
-18
lines changed

3 files changed

+22
-18
lines changed

api/v4/logging/dynamic-console-logging.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,34 @@
11
# Dynamic Console Logging
22

3-
This logging provider is a wrapper around the [Microsoft Console Logger](https://learn.microsoft.com/dotnet/core/extensions/logging-providers#console). It allows for querying the active loggers and their minimum levels, as well as then modifying the levels dynamically at runtime via the [loggers actuator](../management/loggers.md).
3+
This logging provider is a wrapper around the [Microsoft Console Logger](https://learn.microsoft.com/dotnet/core/extensions/logging-providers#console). It allows you to:
4+
5+
* Query the active loggers and their minimum levels
6+
* Modify the levels dynamically at runtime using the [loggers actuator](../management/loggers.md)
47

58
> [!CAUTION]
69
> External tool integration involves sending the fully-qualified logger name over HTTP. Avoid using colons in the name of a logger to prevent invalid HTTP requests.
710
811
## Usage
912

10-
Before starting to use Steeltoe provider, you should know how [Logging in .NET](https://learn.microsoft.com/aspnet/core/fundamentals/logging) works, as Steeltoe provides nothing more than a wrapper around the existing Microsoft console logger.
13+
Before starting to use Steeltoe provider, you should know how [Logging in .NET](https://learn.microsoft.com/aspnet/core/fundamentals/logging) works; Steeltoe provides nothing more than a wrapper around the existing Microsoft console logger.
1114

12-
To use the Steeltoe logging provider, you need to:
15+
To use the Steeltoe logging provider:
1316

1417
1. Add the appropriate NuGet package reference to your project.
15-
1. Configure logging settings.
16-
1. Add the dynamic logging provider to the logging builder.
18+
2. Configure logging settings.
19+
3. Add the dynamic logging provider to the logging builder.
1720

1821
### Add NuGet References
1922

20-
To use the logging provider, you need to add a reference to the `Steeltoe.Logging.DynamicConsole` NuGet package.
23+
To use the logging provider, add a reference to the `Steeltoe.Logging.DynamicConsole` NuGet package.
2124

2225
### Configure Settings
2326

24-
As mentioned earlier, the Steeltoe Logging provider is a wrapper around the Microsoft Console logging provider. Consequently, you can configure it the same way you would the Microsoft provider. For more details on how this is done, see [Configure logging](https://learn.microsoft.com/aspnet/core/fundamentals/logging#configure-logging).
27+
The Steeltoe Logging provider is a wrapper around the Microsoft Console logging provider, so you can configure it the same way you would the Microsoft provider. For more details about how to do this, see [Configure logging](https://learn.microsoft.com/aspnet/core/fundamentals/logging#configure-logging).
2528

2629
### Add the Logging Provider
2730

28-
To use the provider, you need to add it to the logging builder by using the `AddDynamicConsole()` extension method:
31+
To use the provider, add it to the logging builder by using the `AddDynamicConsole()` extension method:
2932

3033
```csharp
3134
using Steeltoe.Logging.DynamicConsole;

api/v4/logging/dynamic-serilog-logging.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# Dynamic Serilog Logging
22

3-
This logging provider integrates with [Serilog](https://serilog.net/). It enables logger minimum levels configured via Serilog to be queried and modified at runtime via the [loggers actuator](../management/loggers.md).
3+
This logging provider integrates with [Serilog](https://serilog.net/). It enables logger minimum levels configured through Serilog to be queried and modified at runtime using the [loggers actuator](../management/loggers.md).
44

55
## Usage
66

7-
To use the Serilog Dynamic Logger, you need to do the following:
7+
To use the Serilog Dynamic Logger, do the following:
88

99
1. Add the appropriate NuGet package reference to your project.
10-
1. Configure Logging settings.
11-
1. Add the Serilog Dynamic Logger to the logging builder.
10+
2. Configure Logging settings.
11+
3. Add the Serilog Dynamic Logger to the logging builder.
1212

1313
### Add NuGet References
1414

15-
To use the logging provider, you need to add a reference to the `Steeltoe.Logging.DynamicSerilog` NuGet package.
15+
To use the logging provider, add a reference to the `Steeltoe.Logging.DynamicSerilog` NuGet package.
1616

1717
### Configure Settings
1818

19-
As mentioned earlier, the Serilog Dynamic Logger provider extends Serilog. Consequently, you can configure it the same way you would Serilog. For more details on how this is done, see [Serilog-Settings-Configuration](https://github.com/serilog/serilog-settings-configuration).
19+
The Serilog Dynamic Logger provider extends Serilog, so you can configure it the same way you would Serilog. For more information, see [Serilog-Settings-Configuration](https://github.com/serilog/serilog-settings-configuration).
2020

2121
```json
2222
{
@@ -60,7 +60,7 @@ var serilogConfiguration = new LoggerConfiguration()
6060

6161
### Add Serilog Dynamic Logger
6262

63-
To use this logging provider, you need to add it to the logging builder by using the `AddDynamicSerilog()` extension method:
63+
To use this logging provider, add it to the logging builder by using the `AddDynamicSerilog()` extension method:
6464

6565
```csharp
6666
using Steeltoe.Logging.DynamicSerilog;
@@ -70,13 +70,14 @@ builder.Logging.AddDynamicSerilog();
7070
```
7171

7272
If you built the Serilog configuration from code, use the appropriate overload instead:
73+
7374
```csharp
7475
builder.Logging.AddDynamicSerilog(serilogConfiguration);
7576
```
7677

7778
### Serilog API usage
7879

79-
Because dynamic logging is built on the `Microsoft.Extensions.Logging` abstractions, changing log levels dynamically **won't work** if you're using Serilog's static `Log` class directly.
80+
Because dynamic logging is built on the `Microsoft.Extensions.Logging` abstractions, changing log levels dynamically **doesn't work** if you're using Serilog's static `Log` class directly.
8081

8182
```csharp
8283
using Serilog;
@@ -103,7 +104,7 @@ var exampleLogger = loggerFactory.CreateLogger("Example");
103104
exampleLogger.LogInformation("Hello from Example.");
104105
```
105106

106-
The Serilog dynamic logger supports the use of logger scopes, as well as Serilog's enrichers and destructuring.
107+
The Serilog dynamic logger supports the use of logger scopes, and also Serilog's enrichers and destructuring.
107108

108109
```csharp
109110
using Serilog.Context;

api/v4/logging/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
Steeltoe includes two logging providers that enhance existing logger libraries with support for managing minimum log levels at runtime through the [Steeltoe Management logger endpoint](../management/loggers.md) and [recording distributed trace information](../tracing/index.md#log-correlation).
44

5-
* [Dynamic Console Logging](./dynamic-console-logging.md) works with `Microsoft.Extensions.Logging.Console`.
5+
* [Dynamic Console Logging](./dynamic-console-logging.md) works with `Microsoft.Extensions.Logging.Console`
66
* [Dynamic Serilog Logging](./dynamic-serilog-logging.md) works with `Serilog`

0 commit comments

Comments
 (0)