diff --git a/README.md b/README.md index 999c55c..6952753 100644 --- a/README.md +++ b/README.md @@ -24,11 +24,21 @@ NLog DiagnosticListenerTarget for [Microsoft DiagnosticSource](https://github.co ``` + Alternative register from code using fluent configuration API: + ```csharp + LogManager.Setup().SetupExtensions(ext => { + ext.RegisterTarget(); + ext.RegisterLayoutRenderer(); + }); + ``` + ### How to use ActivityTraceLayoutRenderer The `System.Diagnostics.Activity.Current` from Microsoft allows one to create OpenTelemetry spans. -NLog can capture the span details together with the LogEvent by using `${activity}` like this: + +Example of `NLog.config` file that outputs span-details together with LogEvent by using `${activity}`: ```xml + @@ -38,6 +48,7 @@ NLog can capture the span details together with the LogEvent by using `${activit + ``` **Property Enum Values** @@ -97,9 +108,10 @@ If creating a custom HostBuilder, then one have to manually setup the ActivityTr ### How to use DiagnosticListenerTarget -Use the target "diagnosticListener" in your nlog.config +Example of `NLog.config` file that uses the `diagnosticListener` target: ```xml + @@ -109,4 +121,5 @@ Use the target "diagnosticListener" in your nlog.config + ``` diff --git a/appveyor.yml b/appveyor.yml index 744ad58..4fb51f1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,6 +12,6 @@ artifacts: deploy: - provider: NuGet api_key: - secure: 5tuxbM+Ujp0ZtaDCGYET23qKr6bJWo/Vzxlf7uTbspaf8R1R7sIe1JqSDHZoK1gV + secure: ACKSV1ixxNpO+2k8KvNDy6hd9QmR8lkQmKn773ZIIeVpG0ywYUhY4j8LcyykVR1a on: branch: master diff --git a/src/NLog.DiagnosticSource/NLog.DiagnosticSource.csproj b/src/NLog.DiagnosticSource/NLog.DiagnosticSource.csproj index 55a29cc..c30d630 100644 --- a/src/NLog.DiagnosticSource/NLog.DiagnosticSource.csproj +++ b/src/NLog.DiagnosticSource/NLog.DiagnosticSource.csproj @@ -3,7 +3,7 @@ net60;net461;netstandard2.0 NLog - 5.0.0 + 5.2.0 5.0.0.0 @@ -23,10 +23,10 @@ N.png https://github.com/NLog/NLog.DiagnosticSource BSD-3-Clause + README.md -Removed target platform NET5 and replaced with NET6 -Updated to System.Diagnostics.DiagnosticSource v6 -Updated to NLog v5 +- Updated to NLog v5.2.2 +- Updated nuget-package with README.md See https://github.com/NLog/NLog.DiagnosticSource for documentation of ${activity} and DiagnosticListenerTarget @@ -39,16 +39,8 @@ See https://github.com/NLog/NLog.DiagnosticSource for documentation of ${activit false - - - - - - - - - + @@ -56,4 +48,12 @@ See https://github.com/NLog/NLog.DiagnosticSource for documentation of ${activit + + + + + + + + \ No newline at end of file