VOOZH about

URL: https://www.nuget.org/packages/OLT.Logging.Serilog.Abstractions/

⇱ NuGet Gallery | OLT.Logging.Serilog.Abstractions 10.0.0




👁 Image
OLT.Logging.Serilog.Abstractions 10.0.0

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

👁 CI
👁 Quality Gate Status

OLT.Logging.Serilog.Abstractions

Core abstractions, constants, and models for OLT Serilog extensions. This library provides shared types and constants used across the OLT Serilog ecosystem.

Features

  • Serilog Constants - Standardized property names, templates, and format strings
  • NGX Logger Support - Models and extensions for handling Angular ngx-logger messages

Components

OltSerilogConstants

A set of partial static classes containing constants for Serilog configuration and usage.

Properties

Standard property names for Serilog enrichment:

OltSerilogConstants.Properties.Username // "Username"
OltSerilogConstants.Properties.DbUsername // "DbUsername"
OltSerilogConstants.Properties.EventType // "OltEventType"
OltSerilogConstants.Properties.Environment // "Environment"
OltSerilogConstants.Properties.Application // "Application"

ASP.NET Core specific properties:

OltSerilogConstants.Properties.AspNetCore.AppRequestUid // "AppRequestUid"
OltSerilogConstants.Properties.AspNetCore.RequestHeaders // "RequestHeaders"
OltSerilogConstants.Properties.AspNetCore.ResponseHeaders // "ResponseHeaders"
OltSerilogConstants.Properties.AspNetCore.RequestBody // "RequestBody"
OltSerilogConstants.Properties.AspNetCore.ResponseBody // "ResponseBody"
OltSerilogConstants.Properties.AspNetCore.RequestUri // "RequestUri"

NGX Logger properties:

OltSerilogConstants.Properties.NgxMessage.NgxDetail // "NgxDetail"
Templates

Pre-defined output templates for Serilog:

// Default console output template
OltSerilogConstants.Templates.DefaultOutput
// "[{Timestamp:HH:mm:ss} {Level:u3}] {OltEventType:x8} {Message:lj}{NewLine}{Exception}"

// ASP.NET Core templates
OltSerilogConstants.Templates.AspNetCore.ServerError
OltSerilogConstants.Templates.AspNetCore.Payload

// Email templates
OltSerilogConstants.Templates.Email.DefaultEmail
OltSerilogConstants.Templates.Email.DefaultSubject

// NGX Logger template
OltSerilogConstants.Templates.NgxMessage.Template
Format Strings

Standard date/time format strings:

OltSerilogConstants.FormatString.ISO8601 // "yyyy-MM-ddTHH:mm:ss.fffZ"

NGX Logger Support

Models and extensions for handling logs from ngx-logger, an Angular logging library.

OltNgxLoggerLevel

Enum matching ngx-logger log levels:

public enum OltNgxLoggerLevel
{
 Trace = 0,
 Debug,
 Information,
 Log,
 Warning,
 Error,
 Fatal,
 Off
}
OltNgxLoggerMessageJson

Main log message model for deserializing ngx-logger payloads:

public class OltNgxLoggerMessageJson
{
 public string? Message { get; set; }
 public List<List<OltNgxLoggerDetailJson>> Additional { get; set; }
 public OltNgxLoggerLevel? Level { get; set; }
 public DateTimeOffset? Timestamp { get; set; }
 public string? FileName { get; set; }
 public int? LineNumber { get; set; }
 public int? ColumnNumber { get; set; }
 public bool IsError { get; } // True if Level is Fatal or Error

 public string GetUsername();
 public string? FormatMessage();
 public Exception ToException();
}
OltNgxLoggerDetailJson

Additional detail information from ngx-logger:

public class OltNgxLoggerDetailJson
{
 public string? Name { get; set; }
 public string? AppId { get; set; }
 public string? User { get; set; }
 public long? Time { get; set; }
 public string? Id { get; set; }
 public string? Url { get; set; }
 public int? Status { get; set; }
 public string? Message { get; set; }
 public List<OltNgxLoggerStackJson>? Stack { get; set; }

 public ApplicationException ToException();
}
OltNgxLoggerStackJson

Stack trace information from ngx-logger JavaScript errors:

public class OltNgxLoggerStackJson
{
 public string? FileName { get; set; }
 public string? FunctionName { get; set; }
 public int? LineNumber { get; set; }
 public int? ColumnNumber { get; set; }
 public string? Source { get; set; }
}
OltNgxLoggerStackExtensions

Extension methods for formatting stack traces:

public static class OltNgxLoggerStackExtensions
{
 public static string FormatStack(this OltNgxLoggerStackJson value);
 public static string FormatStack(this List<OltNgxLoggerStackJson> stack);
}

Usage

Reference this package from other OLT Serilog libraries or use the constants and models directly in your application:

using OLT.Logging.Serilog;

// Use standardized property names
Log.ForContext(OltSerilogConstants.Properties.Username, "john.doe")
 .Information("User action performed");

// Parse ngx-logger messages
var ngxMessage = JsonSerializer.Deserialize<OltNgxLoggerMessageJson>(jsonPayload);
if (ngxMessage.IsError)
{
 var exception = ngxMessage.ToException();
 Log.Error(exception, ngxMessage.FormatMessage());
}

Related Packages

  • OLT.Logging.Serilog - Core Serilog extensions and enrichers
  • OLT.AspNetCore.Serilog - ASP.NET Core middleware and extensions
  • OLT.Logging.Serilog.Hosting - Hosting configuration helpers
  • OLT.Logging.Serilog.MSSqlServer - SQL Server sink configuration
Product Versions Compatible and additional computed target framework versions.
.NET net8.0 net8.0 is compatible.  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 is compatible.  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 is compatible.  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.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on OLT.Logging.Serilog.Abstractions:

Package Downloads
OLT.Logging.Serilog

Adds EventType Enricher, NGX Logger

OLT.Logging.Serilog.MSSqlServer

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.0 404 2/25/2026
10.0.0-beta-0002 194 12/26/2025
10.0.0-beta-0001 191 12/26/2025
9.0.0 627 8/25/2025
9.0.0-beta-0013 388 1/30/2025
9.0.0-beta-0011 223 1/30/2025
9.0.0-beta-0009 233 12/30/2024
9.0.0-beta-0007 213 12/9/2024
9.0.0-beta-0005 217 12/2/2024
8.4.0-beta-0010 280 11/7/2024
8.4.0-beta-0005 279 10/9/2024