VOOZH about

URL: https://www.nuget.org/packages/Blip.Starter.Common.Logs/

⇱ NuGet Gallery | Blip.Starter.Common.Logs 0.0.27




Blip.Starter.Common.Logs 0.0.27

dotnet add package Blip.Starter.Common.Logs --version 0.0.27
 
 
NuGet\Install-Package Blip.Starter.Common.Logs -Version 0.0.27
 
 
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="Blip.Starter.Common.Logs" Version="0.0.27" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Blip.Starter.Common.Logs" Version="0.0.27" />
 
Directory.Packages.props
<PackageReference Include="Blip.Starter.Common.Logs" />
 
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 Blip.Starter.Common.Logs --version 0.0.27
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Blip.Starter.Common.Logs, 0.0.27"
 
 
#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 Blip.Starter.Common.Logs@0.0.27
 
 
#: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=Blip.Starter.Common.Logs&version=0.0.27
 
Install as a Cake Addin
#tool nuget:?package=Blip.Starter.Common.Logs&version=0.0.27
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Blip.Starter.Common.Logs

First of all, please read all pages of our Logging documentation.

You must configure your application to be able to have its logs collected correctly.

Configuring your application

.NET

Add Blip.Starter.Common.Traces NuGet package to your project to configure your application.

The NuGet package is published in our private NuGet repository: https://dev.azure.com/curupira/BLiP/_artifacts/feed/BlipNuget/NuGet/Blip.Starter.Common.Traces/overview/0.0.9

To access it locally you will need to install Azure Artifacts credential provider.

ASP.NET Core

Then, in your Startup.cs file or anywhere you configure the framework, add the following code:

// You can change the configuration if needed
ILogConfiguration configuration = DefaultLogConfiguration();
 
// Create the environment with correct values (read it from your configuration or environment variables)
Env.Environment environment = new Env.Environment("your-app-deploy-name", "your-app-deploy-version", "the-cluster-your-app-is-deployed");

// Integrate the Serilog log sink with the IServiceCollection using the extension from LogSinkExtension
services.AddLogSink(configuration, environment);

You can also use the .NET IConfiguration interface having the fields LogSink for the ILogConfiguration and $Metadata for the Env.Environment to configure your application as following:

// This is an example of how to get the configuration from the builder, but this code will already be in your application
var builder = WebApplication.CreateBuilder(args);
IConfiguration config = builder.Configuration;

builder.Services.AddLogSink(config);

Manual configuration

If you must configure Serilog sink manually because you do not use ASP.NET Core, you can do it like this:

// You can change the configuration if needed
ILogConfiguration configuration = DefaultLogConfiguration();

// Create the environment with correct values (read it from your configuration or environment variables)
Env.Environment environment = new Env.Environment("your-app-deploy-name", "your-app-deploy-version", "the-cluster-your-app-is-deployed");

Log.Logger = LoggerSimpleStarter.Create(loggerConfiguration, environment).CreateLogger();

Sending logs to Grafana Loki

After configuring the instrumentation, there is a few things you must ensure to have your logs sent to Grafana Loki.

Please read the documentation to know what to do.

Please make sure your cluster already have a Promtail configured by asking to SRE team.

Product Versions Compatible and additional computed target framework versions.
.NET net6.0 net6.0 is compatible.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows 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

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
0.0.27 1,862 3/6/2025
0.0.26 248 3/6/2025
0.0.23 976 7/25/2024
0.0.20 2,874 2/27/2024
0.0.19 168 2/22/2024
0.0.18 893 1/31/2024
0.0.17 496 12/28/2023
0.0.16 638 11/6/2023
0.0.15 7,660 10/19/2023
0.0.14 664 10/10/2023
0.0.12 309 9/26/2023