Astor.Logging 2024.103.107.15

dotnet add package Astor.Logging --version 2024.103.107.15
NuGet\Install-Package Astor.Logging -Version 2024.103.107.15
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.15" />
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.15
#r "nuget: Astor.Logging, 2024.103.107.15"
#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.15

// Install Astor.Logging as a Cake Tool
#tool nuget:?package=Astor.Logging&version=2024.103.107.15

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 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.

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.103.107.15 85 3/7/2024
2024.103.107.14-better-read... 57 3/7/2024
2024.103.107.13-better-read... 59 3/7/2024
2024.103.107.12 76 3/7/2024
2024.103.107.11-documenting... 70 3/7/2024
2024.103.107.10-documenting... 58 3/7/2024
2024.103.107.9 79 3/7/2024
2024.103.107.8 70 3/7/2024
2024.103.107.7-master 53 3/7/2024
2024.103.107.6 73 3/7/2024
2024.103.107.5-external-wor... 62 3/7/2024
2024.103.107.4-external-wor... 56 3/7/2024
2.2.2 615 2/10/2023
2.1.0 477 8/20/2022
2.0.0 395 8/20/2022
1.0.0.1 611 5/20/2021
1.0.0 1,221 8/31/2020