Astor.Logging
2024.103.107.12
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 Astor.Logging --version 2024.103.107.12
NuGet\Install-Package Astor.Logging -Version 2024.103.107.12
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="Astor.Logging" Version="2024.103.107.12" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Astor.Logging --version 2024.103.107.12
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Astor.Logging, 2024.103.107.12"
#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 Astor.Logging as a Cake Addin #addin nuget:?package=Astor.Logging&version=2024.103.107.12 // Install Astor.Logging as a Cake Tool #tool nuget:?package=Astor.Logging&version=2024.103.107.12
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Astor.Logging
Home for a minimalistic alternative to the JsonConsole
logger.
logging.AddMiniJsonConsole();
logger.LogWarning("{name} {age} {hobby}", "Egor", 27, new { Category = "board games", Favorite = "resistance"});
// Output: {"name":"Egor","age":27,"hobby":{"category":"board games","favorite":"resistance"}}
Installation
dotnet add package Astor.Logging
Comparison
Here's what you get with Microsoft's JsonConsole
logger:
{
"EventId": 0, // omitted by default in MiniJsonConsole
"LogLevel": "Warning", // omitted by default in MiniJsonConsole
"Category": "Astor.Logging.Tests.MiniJsonConsoleLoggerShould", // omitted by default in MiniJsonConsole
"Message": "Egor 27 { Category = board games, Favorite = resistance }", // Redundant calculated value #1
"State": {
"Message": "Egor 27 { Category = board games, Favorite = resistance }", // Redundant calculated value #2
"name": "Egor",
"age": 27,
"hobby": "{ Category = board games, Favorite = resistance }", // Inner data treated as string
"{OriginalFormat}": "{name} {age} {hobby}" // <- Do you need this?
}
}
And this is what you get by default with MiniJsonConsole
{
"name": "Egor",
"age": 27,
"hobby": {
"category": "board games",
"favorite": "resistance"
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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.
-
net8.0
- Microsoft.Extensions.Logging (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2024.106.109.27 | 402 | 6/9/2024 |
2024.106.109.26-comparison-... | 80 | 6/9/2024 |
2024.106.109.25-comparison-... | 90 | 6/9/2024 |
2024.106.106.24 | 105 | 6/6/2024 |
2024.106.106.23-reference-l... | 93 | 6/6/2024 |
2024.106.106.22 | 89 | 6/6/2024 |
2024.106.106.21 | 111 | 6/6/2024 |
2024.106.106.20-fixed-versy... | 67 | 6/6/2024 |
2024.103.107.15 | 122 | 3/7/2024 |
2024.103.107.14-better-read... | 87 | 3/7/2024 |
2024.103.107.13-better-read... | 75 | 3/7/2024 |
2024.103.107.12 | 106 | 3/7/2024 |
2024.103.107.11-documenting... | 97 | 3/7/2024 |
2024.103.107.10-documenting... | 76 | 3/7/2024 |
2024.103.107.9 | 112 | 3/7/2024 |
2024.103.107.8 | 103 | 3/7/2024 |
2024.103.107.7-master | 84 | 3/7/2024 |
2024.103.107.6 | 104 | 3/7/2024 |
2024.103.107.5-external-wor... | 82 | 3/7/2024 |
2024.103.107.4-external-wor... | 80 | 3/7/2024 |
2.2.2 | 716 | 2/10/2023 |
2.1.0 | 519 | 8/20/2022 |
2.0.0 | 407 | 8/20/2022 |
1.0.0.1 | 653 | 5/20/2021 |
1.0.0 | 1,250 | 8/31/2020 |