51 lines
1.4 KiB
C#
51 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace ZB.MOM.WW.CDBBC.E2E.Benchmark.Tests;
|
|
|
|
/// <summary>
|
|
/// Represents a typical Serilog log entry.
|
|
/// </summary>
|
|
public sealed class SerilogLogEntry
|
|
{
|
|
/// <summary>
|
|
/// Timestamp when the log event was written.
|
|
/// </summary>
|
|
public DateTimeOffset Timestamp { get; set; }
|
|
|
|
/// <summary>
|
|
/// Log level (for example: Information, Warning, Error).
|
|
/// </summary>
|
|
public string Level { get; set; } = "Information";
|
|
|
|
/// <summary>
|
|
/// Name of the logger/category (typically the class name).
|
|
/// </summary>
|
|
public string? LoggerName { get; set; }
|
|
|
|
/// <summary>
|
|
/// Correlation context identifier used to tie log entries to a request.
|
|
/// </summary>
|
|
public string? ContextId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Original message template used by Serilog.
|
|
/// </summary>
|
|
public string MessageTemplate { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Fully rendered message text.
|
|
/// </summary>
|
|
public string? RenderedMessage { get; set; }
|
|
|
|
/// <summary>
|
|
/// Exception details if one was logged.
|
|
/// </summary>
|
|
public string? Exception { get; set; }
|
|
|
|
/// <summary>
|
|
/// Structured context values captured from Serilog context.
|
|
/// </summary>
|
|
public Dictionary<string, object?> ContextProperties { get; set; } = new(StringComparer.Ordinal);
|
|
}
|