Astor.Logging
2024.106.106.24
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.106.106.24
NuGet\Install-Package Astor.Logging -Version 2024.106.106.24
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.106.106.24" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Astor.Logging --version 2024.106.106.24
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Astor.Logging, 2024.106.106.24"
#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.106.106.24 // Install Astor.Logging as a Cake Tool #tool nuget:?package=Astor.Logging&version=2024.106.106.24
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.LogInformation("We have a guest {name} {age}", "Egor", 27);
// Output: {"name":"Egor","age":27}
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"
}
}
Note that you can also set up MiniJsonConsole
to include LogLevel
, LogEventId
, and LogCategoryName
.
Check out MiniJsonConsoleLoggerShould for more examples.
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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.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)
- Newtonsoft.Json (>= 13.0.3)
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 | 693 | 6/9/2024 |
2024.106.109.26-comparison-... | 88 | 6/9/2024 |
2024.106.109.25-comparison-... | 94 | 6/9/2024 |
2024.106.106.24 | 115 | 6/6/2024 |
2024.106.106.23-reference-l... | 99 | 6/6/2024 |
2024.106.106.22 | 97 | 6/6/2024 |
2024.106.106.21 | 119 | 6/6/2024 |
2024.106.106.20-fixed-versy... | 71 | 6/6/2024 |
2024.103.107.15 | 127 | 3/7/2024 |
2024.103.107.14-better-read... | 90 | 3/7/2024 |
2024.103.107.13-better-read... | 78 | 3/7/2024 |
2024.103.107.12 | 111 | 3/7/2024 |
2024.103.107.11-documenting... | 100 | 3/7/2024 |
2024.103.107.10-documenting... | 79 | 3/7/2024 |
2024.103.107.9 | 117 | 3/7/2024 |
2024.103.107.8 | 109 | 3/7/2024 |
2024.103.107.7-master | 89 | 3/7/2024 |
2024.103.107.6 | 109 | 3/7/2024 |
2024.103.107.5-external-wor... | 85 | 3/7/2024 |
2024.103.107.4-external-wor... | 85 | 3/7/2024 |
2.2.2 | 722 | 2/10/2023 |
2.1.0 | 529 | 8/20/2022 |
2.0.0 | 415 | 8/20/2022 |
1.0.0.1 | 663 | 5/20/2021 |
1.0.0 | 1,258 | 8/31/2020 |