Formitable.BetterStack.Logger 0.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Formitable.BetterStack.Logger --version 0.1.1
                    
NuGet\Install-Package Formitable.BetterStack.Logger -Version 0.1.1
                    
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="Formitable.BetterStack.Logger" Version="0.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Formitable.BetterStack.Logger" Version="0.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Formitable.BetterStack.Logger" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Formitable.BetterStack.Logger --version 0.1.1
                    
#r "nuget: Formitable.BetterStack.Logger, 0.1.1"
                    
#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.
#:package Formitable.BetterStack.Logger@0.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Formitable.BetterStack.Logger&version=0.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Formitable.BetterStack.Logger&version=0.1.1
                    
Install as a Cake Tool

.Net package for BetterStack logging

This repo contains packages for easier logging to BetterStack for C#.

Currently you will find:

  • Formitable.BetterStack.Logger: contains a client to serialize and upload logs
  • Formitable.BetterStack.Logger.Microsoft: contains extensions to add the client to the Microsoft ILogger pipeline

Usage through ILogger<>

Install the package from NuGet:

dotnet add package Formitable.BetterStack.Logger.Microsoft

Then add to your logging pipeline:

builder.Services.AddLogging(logBuilder =>
{
    logBuilder.AddBetterStackLogger(conf =>
    {
        conf.SourceToken = builder.Configuration["BetterStack:SourceToken"];
    });
});

A sample implementation can be found in the /samples directory.

At the very least, you need to specify a source token, and this can be done in code or in configuration. To enrich all logs being uploaded with relevant context, add data to the Context dictionary of the configuration.

By default, the logger is configured to batch and upload batches every second, in batches of 1000. If you require higher throughput, this can be adjusted in the configuration.

Product 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.  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.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Formitable.BetterStack.Logger:

Package Downloads
Formitable.BetterStack.Logger.Microsoft

Extensions for the Microsoft ILogger for shipping logs to BetterStack Logs

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.2 4,025 6/19/2023
0.1.1 328 6/14/2023
0.1.0 315 6/14/2023