RSoft.Logs 1.0.0-rc1.1

This is a prerelease version of RSoft.Logs.
There is a newer version of this package available.
See the version list below for details.
Install-Package RSoft.Logs -Version 1.0.0-rc1.1
dotnet add package RSoft.Logs --version 1.0.0-rc1.1
<PackageReference Include="RSoft.Logs" Version="1.0.0-rc1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RSoft.Logs --version 1.0.0-rc1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: RSoft.Logs, 1.0.0-rc1.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install RSoft.Logs as a Cake Addin
#addin nuget:?package=RSoft.Logs&version=1.0.0-rc1.1&prerelease

// Install RSoft.Logs as a Cake Tool
#tool nuget:?package=RSoft.Logs&version=1.0.0-rc1.1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.


Logging mechanism for elastic (direct mode) and terminal console

RSoft.Logs is a provider of logging mechanisms based on the standard .Net Core ILogger interface. The available resources are:

  • Elastic logger provider
  • Console logger provider
  • Middlware API Request/Response logger

Release Notes

Version 1.0.0-rc1.1

  • Fix field name 'TradeId' ⇒ 'TraceId' in GenericExceptionResponse.

RSoft.Logs uses release candidate version of the System.Text.Json package. This version is not yet stable and therefore the RSoft.Logs package will maintain the same condition until the final version of this version is released.


  • PackageManage: Install-Package RSoft.Logs -Version 1.0.0-preview200904.1
  • .NET Cli: dotnet add package RSoft.Logs --version 1.0.0-preview200904.1
  • Package Reference: <PackageReference Include="RSoft.Logs" Version="1.0.0-preview200904.1" />
  • Paket Cli: paket add RSoft.Logs --version 1.0.0-preview200904.1


The configuration of all the mechanisms of this package are done through the appsettings.json of the application, in the section Logging as complete complete below

"Logging": {
    "LogLevel": {
      [--- LogLevel default microsoft configuration ---]
    "Elastic": {
      "Uri": "http://localhost:9200",
      "DefaultIndexName": "my-index-name",
      "IgnoreCategories": [
    "RequestResponseMiddleware": {
      "LogRequest": true,
      "LogResponse": true,
      "SecurityActions": [
          "Method": "POST",
          "Path": "/api/auth"
Elastic Section configuration
  • Uri ⇒ Elastic Service url running
  • DefaultIndxName ⇒ Name of the document index to save the logs
  • IgnoreCategoris ⇒ List of categories to ignore in the log record.
RequestResponseMiddleware Section configuration
  • LogRequest ⇒ Enables or disables request logging (disabled by default)
  • LogReponse ⇒ Enables or disables response logging (disabled by default)
  • SecurityActions → List of keys Method + Action that will have the request body hidden in the log recording. Use this section to indicate points where sensitive information, such as a password for example, is being trafficked.

Implementation in your application

In the program.cs file, add the calls to the desired modules to the ConfigureLogging section, according to the model below::

using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using RSoft.Logs.Extensions;

namespace MyApplication.Web.Api
	public class Program
		public static void Main(string[] args)
		public static IHostBuilder CreateHostBuilder(string[] args) =>
                .ConfigureLogging(logging =>
                .ConfigureWebHostDefaults(webBuilder =>

In the Startup.cs file add the following codes: .

Import the namespaces:

using RSoft.Logs.Extensions;
using RSoft.Logs.Middleware;

In ConfigureServices method add the line:


In Configure method add the line:


That's all you need.


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
1.2.2 66 9/8/2021
1.2.1 59 9/8/2021
1.2.0 68 9/8/2021
1.1.0 63 8/26/2021
1.1.0-rc1.7 56 8/6/2021
1.1.0-rc1.6 66 5/31/2021
1.1.0-rc1.5 55 5/30/2021
1.1.0-rc1.4 52 5/27/2021
1.1.0-rc1.3 64 4/22/2021
1.1.0-rc1.2 51 4/21/2021
1.1.0-rc1.1 59 4/20/2021
1.1.0-rc1.0 49 4/19/2021
1.0.0 147 11/18/2020
1.0.0-rc1.7 233 10/18/2020
1.0.0-rc1.6 115 10/15/2020
1.0.0-rc1.4 152 10/10/2020
1.0.0-rc1.3 229 9/26/2020
1.0.0-rc1.2 156 9/23/2020
1.0.0-rc1.1 173 9/22/2020
1.0.0-rc1.0 178 9/16/2020
1.0.0-preview200914.2 160 9/14/2020
1.0.0-preview200904.1 240 9/4/2020
1.0.0-preview200831.1 156 8/31/2020