assistant.net.logging
0.4.144
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package assistant.net.logging --version 0.4.144
NuGet\Install-Package assistant.net.logging -Version 0.4.144
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="assistant.net.logging" Version="0.4.144" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add assistant.net.logging --version 0.4.144
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: assistant.net.logging, 0.4.144"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install assistant.net.logging as a Cake Addin #addin nuget:?package=assistant.net.logging&version=0.4.144 // Install assistant.net.logging as a Cake Tool #tool nuget:?package=assistant.net.logging&version=0.4.144
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
assistant.net.logging
Common .net logging extension.
YAML console logging
YAML formatter logging is an extension to .net regular console logger.
using var provider = new ServiceCollection()
.AddLogging(b => b
.AddYamlConsole()
.AddPropertyScope("Thread", () => Thread.CurrentThread.ManagedThreadId))
.BuildServiceProvider();
var logger = provider.GetRequiredService<ILogger<SomeService>>();
using var _ logger.BeginPropertyScope("RequestId", id);
Formatting sample
See the YAML formatter written log sample.
Time: 2022-01-01 10:13:59.0192003
Level: Error
EventId: 0
Category: Assistant.Net.Internal.SomeService
Message: Querying timers: found arranged 1 timer(s).
State:
MessageTemplate: Querying timers: found arranged {TimerCount} timer(s).
TimerCount: 1
Exception:
Message: Invalid operation.
StackTrace: |
at ConsoleApplication1.SomeObject.OtherMethod() in C:\ConsoleApplication1\SomeObject.cs:line 10
at ConsoleApplication1.SomeObject..ctor() in C:\ConsoleApplication1\SomeObject.cs:line 20
InnerException:
Message: Invalid operation.
StackTrace: |
at ConsoleApplication1.SomeObject.OtherMethod() in C:\ConsoleApplication1\SomeObject.cs:line 10
at ConsoleApplication1.SomeObject..ctor() in C:\ConsoleApplication1\SomeObject.cs:line 20
Scopes:
- Name: ApplicationName
Value: event-handler-1
- Name: Thread
Value: 24
- Name: CorrelationId
Value: 5793e715-6e50-4f84-9c9e-85be62de689c
- Name: User
Value: user@gmail.com
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- assistant.net.core (>= 0.4.144)
- Microsoft.Extensions.Logging.Console (>= 6.0.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on assistant.net.logging:
Package | Downloads |
---|---|
assistant.net.messaging
Local (in-memory) message handling implementation. |
|
assistant.net.messaging.generic.client
Storage based message handling client. |
|
assistant.net.messaging.generic.server
storage based message handling server. |
GitHub repositories
This package is not used by any popular GitHub repositories.