diff --git a/.changeset/ten-games-teach.md b/.changeset/ten-games-teach.md new file mode 100644 index 0000000..857eec1 --- /dev/null +++ b/.changeset/ten-games-teach.md @@ -0,0 +1,7 @@ +--- +"alexaka1.serilog.extensions.formatting": minor +--- + +Added .Net 9 support + +Bump Serilog to 4.1.0 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 6e09b4c..dc60ae2 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -54,6 +54,9 @@ jobs: crl3.digicert.com:80 crl4.digicert.com:80 dc.services.visualstudio.com:443 + aka.ms:443 + dotnetbuilds.azureedge.net:443 + dotnetcli.azureedge.net:443 github.com:443 objects.githubusercontent.com:443 s.symcb.com:80 @@ -64,7 +67,13 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: false - + - name: Setup Dotnet + id: dotnet-setup + uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0 + with: + dotnet-version: | + 9.0.x + 6.0.x # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # v3.27.4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 76595bd..8f7f2f2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,8 +6,8 @@ on: concurrency: ${{ github.workflow }}-${{ github.ref }} permissions: { } env: - dotnet: 8.0.x - node: 20.x + dotnet: 9.0.x + node: 22.x Project: src/Serilog.Extensions.Formatting PackageJson: src/Serilog.Extensions.Formatting/package.json Csproj: src/Serilog.Extensions.Formatting/Serilog.Extensions.Formatting.csproj diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5548538..e025125 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -61,7 +61,7 @@ jobs: uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0 with: dotnet-version: | - 8.0.x + 9.0.x 6.0.x - name: Dotnet restore run: dotnet restore diff --git a/Directory.Build.props b/Directory.Build.props index aedb937..e13d14d 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - net8.0;net6.0;netstandard2.0 - 7.3 + net9.0;net8.0;net6.0;netstandard2.0 + 12 latest disable disable @@ -30,7 +30,7 @@ $(DefineConstants);FEATURE_SPAN;FEATURE_DATE_AND_TIME_ONLY;FEATURE_ISPANFORMATTABLE; - + $(DefineConstants);FEATURE_SPAN;FEATURE_DATE_AND_TIME_ONLY;FEATURE_ISPANFORMATTABLE;FEATURE_JSON_NAMING_POLICY;FEATURE_IUTF8SPANFORMATTABLE; diff --git a/Directory.Packages.props b/Directory.Packages.props index 99a60ef..d2c75f6 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -4,30 +4,29 @@ true - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Serilog.Extensions.Formatting/DefaultNamingPolicy.cs b/src/Serilog.Extensions.Formatting/DefaultNamingPolicy.cs index 9de791c..579a6ed 100644 --- a/src/Serilog.Extensions.Formatting/DefaultNamingPolicy.cs +++ b/src/Serilog.Extensions.Formatting/DefaultNamingPolicy.cs @@ -1,12 +1,11 @@ using System.Text.Json; -namespace Serilog.Extensions.Formatting +namespace Serilog.Extensions.Formatting; + +internal class DefaultNamingPolicy : JsonNamingPolicy { - internal class DefaultNamingPolicy : JsonNamingPolicy + public override string ConvertName(string name) { - public override string ConvertName(string name) - { - return name; - } + return name; } } diff --git a/src/Serilog.Extensions.Formatting/JsonLogPropertyNames.cs b/src/Serilog.Extensions.Formatting/JsonLogPropertyNames.cs index 99c3544..c1e5203 100644 --- a/src/Serilog.Extensions.Formatting/JsonLogPropertyNames.cs +++ b/src/Serilog.Extensions.Formatting/JsonLogPropertyNames.cs @@ -1,52 +1,44 @@ using System.Text.Json; -namespace Serilog.Extensions.Formatting +namespace Serilog.Extensions.Formatting; + +internal readonly struct JsonLogPropertyNames(JsonNamingPolicy namingPolicy) { - internal readonly struct JsonLogPropertyNames - { - public JsonLogPropertyNames(JsonNamingPolicy namingPolicy) - { - Timestamp = JsonEncodedText.Encode(namingPolicy.ConvertName(TimestampPropertyName)); - Level = JsonEncodedText.Encode(namingPolicy.ConvertName(LevelPropertyName)); - MessageTemplate = JsonEncodedText.Encode(namingPolicy.ConvertName(MessageTemplatePropertyName)); - RenderedMessage = JsonEncodedText.Encode(namingPolicy.ConvertName(RenderedMessagePropertyName)); - TraceId = JsonEncodedText.Encode(namingPolicy.ConvertName(TraceIdPropertyName)); - SpanId = JsonEncodedText.Encode(namingPolicy.ConvertName(SpanIdPropertyName)); - Exception = JsonEncodedText.Encode(namingPolicy.ConvertName(ExceptionPropertyName)); - Properties = JsonEncodedText.Encode(namingPolicy.ConvertName(PropertiesPropertyName)); - Renderings = JsonEncodedText.Encode(namingPolicy.ConvertName(RenderingsPropertyName)); - Null = JsonEncodedText.Encode(namingPolicy.ConvertName(NullPropertyName)); - TypeTag = JsonEncodedText.Encode(namingPolicy.ConvertName(TypeTagPropertyName)); - Format = JsonEncodedText.Encode(namingPolicy.ConvertName(FormatPropertyName)); - Rendering = JsonEncodedText.Encode(namingPolicy.ConvertName(RenderingPropertyName)); - } - - private const string TimestampPropertyName = "Timestamp"; - private const string LevelPropertyName = "Level"; - private const string MessageTemplatePropertyName = "MessageTemplate"; - private const string RenderedMessagePropertyName = "RenderedMessage"; - private const string TraceIdPropertyName = "TraceId"; - private const string SpanIdPropertyName = "SpanId"; - private const string ExceptionPropertyName = "Exception"; - private const string PropertiesPropertyName = "Properties"; - private const string RenderingsPropertyName = "Renderings"; - private const string NullPropertyName = "null"; - private const string TypeTagPropertyName = "_typeTag"; - private const string FormatPropertyName = "Format"; - private const string RenderingPropertyName = "Rendering"; - - public JsonEncodedText Timestamp { get; } - public JsonEncodedText Level { get; } - public JsonEncodedText MessageTemplate { get; } - public JsonEncodedText RenderedMessage { get; } - public JsonEncodedText TraceId { get; } - public JsonEncodedText SpanId { get; } - public JsonEncodedText Exception { get; } - public JsonEncodedText Properties { get; } - public JsonEncodedText Renderings { get; } - public JsonEncodedText Null { get; } - public JsonEncodedText TypeTag { get; } - public JsonEncodedText Format { get; } - public JsonEncodedText Rendering { get; } - } + private const string TimestampPropertyName = "Timestamp"; + private const string LevelPropertyName = "Level"; + private const string MessageTemplatePropertyName = "MessageTemplate"; + private const string RenderedMessagePropertyName = "RenderedMessage"; + private const string TraceIdPropertyName = "TraceId"; + private const string SpanIdPropertyName = "SpanId"; + private const string ExceptionPropertyName = "Exception"; + private const string PropertiesPropertyName = "Properties"; + private const string RenderingsPropertyName = "Renderings"; + private const string NullPropertyName = "null"; + private const string TypeTagPropertyName = "_typeTag"; + private const string FormatPropertyName = "Format"; + private const string RenderingPropertyName = "Rendering"; + + public JsonEncodedText Timestamp { get; } = JsonEncodedText.Encode(namingPolicy.ConvertName(TimestampPropertyName)); + public JsonEncodedText Level { get; } = JsonEncodedText.Encode(namingPolicy.ConvertName(LevelPropertyName)); + + public JsonEncodedText MessageTemplate { get; } = + JsonEncodedText.Encode(namingPolicy.ConvertName(MessageTemplatePropertyName)); + + public JsonEncodedText RenderedMessage { get; } = + JsonEncodedText.Encode(namingPolicy.ConvertName(RenderedMessagePropertyName)); + + public JsonEncodedText TraceId { get; } = JsonEncodedText.Encode(namingPolicy.ConvertName(TraceIdPropertyName)); + public JsonEncodedText SpanId { get; } = JsonEncodedText.Encode(namingPolicy.ConvertName(SpanIdPropertyName)); + public JsonEncodedText Exception { get; } = JsonEncodedText.Encode(namingPolicy.ConvertName(ExceptionPropertyName)); + + public JsonEncodedText Properties { get; } = + JsonEncodedText.Encode(namingPolicy.ConvertName(PropertiesPropertyName)); + + public JsonEncodedText Renderings { get; } = + JsonEncodedText.Encode(namingPolicy.ConvertName(RenderingsPropertyName)); + + public JsonEncodedText Null { get; } = JsonEncodedText.Encode(namingPolicy.ConvertName(NullPropertyName)); + public JsonEncodedText TypeTag { get; } = JsonEncodedText.Encode(namingPolicy.ConvertName(TypeTagPropertyName)); + public JsonEncodedText Format { get; } = JsonEncodedText.Encode(namingPolicy.ConvertName(FormatPropertyName)); + public JsonEncodedText Rendering { get; } = JsonEncodedText.Encode(namingPolicy.ConvertName(RenderingPropertyName)); } diff --git a/src/Serilog.Extensions.Formatting/Serilog.Extensions.Formatting.csproj b/src/Serilog.Extensions.Formatting/Serilog.Extensions.Formatting.csproj index 3835eb2..46c63d1 100644 --- a/src/Serilog.Extensions.Formatting/Serilog.Extensions.Formatting.csproj +++ b/src/Serilog.Extensions.Formatting/Serilog.Extensions.Formatting.csproj @@ -18,7 +18,7 @@ true - true + true true @@ -28,6 +28,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/Serilog.Extensions.Formatting/Utf8JsonFormatter.cs b/src/Serilog.Extensions.Formatting/Utf8JsonFormatter.cs index 94e6d4d..6e241fa 100644 --- a/src/Serilog.Extensions.Formatting/Utf8JsonFormatter.cs +++ b/src/Serilog.Extensions.Formatting/Utf8JsonFormatter.cs @@ -11,94 +11,95 @@ using Serilog.Formatting; using Serilog.Parsing; -namespace Serilog.Extensions.Formatting +namespace Serilog.Extensions.Formatting; + +/// +/// Formats log events in a simple JSON structure using . +/// +public sealed class Utf8JsonFormatter : ITextFormatter, IDisposable { - /// - /// Formats log events in a simple JSON structure using . - /// - public sealed class Utf8JsonFormatter : ITextFormatter, IDisposable - { - private readonly string _closingDelimiter; - private readonly CultureInfo _formatProvider; - private readonly JsonLogPropertyNames _names; - private readonly JsonNamingPolicy _namingPolicy; - private readonly bool _renderMessage; - private readonly ThreadLocal _sb; - - // ReSharper disable once NotAccessedField.Local - private readonly int _spanBufferSize; - private readonly ThreadLocal _sw; - private readonly ThreadLocal _writer; - private Utf8JsonWriter Writer => _writer.Value; - private const string TimeFormat = "O"; - private const string TimeSpanFormat = "c"; + private readonly string _closingDelimiter; + private readonly CultureInfo _formatProvider; + private readonly JsonLogPropertyNames _names; + private readonly JsonNamingPolicy _namingPolicy; + private readonly bool _renderMessage; + private readonly ThreadLocal _sb; + + // ReSharper disable once NotAccessedField.Local + private readonly int _spanBufferSize; + private readonly ThreadLocal _sw; + private readonly ThreadLocal _writer; + private Utf8JsonWriter Writer => _writer.Value; + private const string TimeFormat = "O"; + private const string TimeSpanFormat = "c"; #if FEATURE_DATE_AND_TIME_ONLY - private const string DateOnlyFormat = "O"; + private const string DateOnlyFormat = "O"; #endif #pragma warning disable CS1574, CS1584, CS1581, CS1580 - /// - /// Formats log events in a simple JSON structure using . - /// - /// - /// A string that will be written after each log event is formatted. - /// If null, will be used. - /// - /// - /// If , the message will be rendered and written to the output as a - /// property named RenderedMessage. - /// - /// Supplies culture-specific formatting information, or null. - /// - /// Buffer size for the property values that are not already - /// handled by Utf8JsonWriter. - /// - /// - /// Set to to enable validation of the JSON output by the underlying - /// . - /// - /// Naming policy to use for the JSON output. - /// - /// Use for escaping - /// characters. See more: - /// https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/character-encoding - /// + /// + /// Formats log events in a simple JSON structure using . + /// + /// + /// A string that will be written after each log event is formatted. + /// If null, will be used. + /// + /// + /// If , the message will be rendered and written to the output as a + /// property named RenderedMessage. + /// + /// Supplies culture-specific formatting information, or null. + /// + /// Buffer size for the property values that are not already + /// handled by Utf8JsonWriter. + /// + /// + /// Set to to enable validation of the JSON output by the underlying + /// . + /// + /// Naming policy to use for the JSON output. + /// + /// Use for escaping + /// characters. See more: + /// https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/character-encoding + /// #pragma warning restore CS1574, CS1584, CS1581, CS1580 - public Utf8JsonFormatter(string closingDelimiter = null, - bool renderMessage = false, - IFormatProvider formatProvider = null, - int spanBufferSize = 64, - bool skipValidation = true, - JsonNamingPolicy namingPolicy = null, - JavaScriptEncoder jsonWriterEncoder = null) + public Utf8JsonFormatter(string closingDelimiter = null, + bool renderMessage = false, + IFormatProvider formatProvider = null, + int spanBufferSize = 64, + bool skipValidation = true, + JsonNamingPolicy namingPolicy = null, + JavaScriptEncoder jsonWriterEncoder = null) + { + _namingPolicy = namingPolicy ?? new DefaultNamingPolicy(); + _names = new JsonLogPropertyNames(_namingPolicy); + _renderMessage = renderMessage; + _spanBufferSize = spanBufferSize; + _closingDelimiter = closingDelimiter ?? Environment.NewLine; + _formatProvider = formatProvider as CultureInfo ?? CultureInfo.InvariantCulture; + var jsonWriterOptions = new JsonWriterOptions { - _namingPolicy = namingPolicy ?? new DefaultNamingPolicy(); - _names = new JsonLogPropertyNames(_namingPolicy); - _renderMessage = renderMessage; - _spanBufferSize = spanBufferSize; - _closingDelimiter = closingDelimiter ?? Environment.NewLine; - _formatProvider = formatProvider as CultureInfo ?? CultureInfo.InvariantCulture; - var jsonWriterOptions = new JsonWriterOptions - { - SkipValidation = skipValidation, - Encoder = jsonWriterEncoder, - }; - _writer = new ThreadLocal(() => new Utf8JsonWriter(Stream.Null, jsonWriterOptions)); - _sb = new ThreadLocal(() => new StringBuilder()); - _sw = new ThreadLocal(() => new StringWriter(_sb.Value)); - } + SkipValidation = skipValidation, + Encoder = jsonWriterEncoder, + }; + _writer = new ThreadLocal(() => new Utf8JsonWriter(Stream.Null, jsonWriterOptions)); + _sb = new ThreadLocal(() => new StringBuilder()); + _sw = new ThreadLocal(() => new StringWriter(_sb.Value)); + } - /// - public void Dispose() - { - Dispose(true); - } + /// + public void Dispose() + { + Dispose(true); + } - /// - /// When is null - /// When is null - public void Format(LogEvent logEvent, TextWriter output) - { + /// + /// When is null + /// When is null + public void Format(LogEvent logEvent, TextWriter output) + { +#if NETSTANDARD2_0 if (logEvent == null) { throw new ArgumentNullException(nameof(logEvent)); @@ -108,415 +109,413 @@ public void Format(LogEvent logEvent, TextWriter output) { throw new ArgumentNullException(nameof(output)); } +#else + ArgumentNullException.ThrowIfNull(logEvent); + ArgumentNullException.ThrowIfNull(output); +#endif - Stream str; - if (output is StreamWriter streamWriter) - { - str = streamWriter.BaseStream; - } - else - { - str = new MemoryStream(); - } + Stream str; + if (output is StreamWriter streamWriter) + { + str = streamWriter.BaseStream; + } + else + { + str = new MemoryStream(); + } - var writer = GetWriter(str); + var writer = GetWriter(str); - writer.WriteStartObject(); - writer.WriteString(_names.Timestamp, logEvent.Timestamp.ToString(TimeFormat, _formatProvider)); - writer.WriteString(_names.Level, Enum.GetName(typeof(LogEventLevel), logEvent.Level)); - writer.WriteString(_names.MessageTemplate, logEvent.MessageTemplate.Text); - if (_renderMessage) - { - writer.WriteString(_names.RenderedMessage, - logEvent.MessageTemplate.Render(logEvent.Properties, _formatProvider)); - } + writer.WriteStartObject(); + writer.WriteString(_names.Timestamp, logEvent.Timestamp.ToString(TimeFormat, _formatProvider)); + writer.WriteString(_names.Level, Enum.GetName(typeof(LogEventLevel), logEvent.Level)); + writer.WriteString(_names.MessageTemplate, logEvent.MessageTemplate.Text); + if (_renderMessage) + { + writer.WriteString(_names.RenderedMessage, + logEvent.MessageTemplate.Render(logEvent.Properties, _formatProvider)); + } - if (logEvent.TraceId.HasValue) - { - writer.WriteString(_names.TraceId, logEvent.TraceId.Value.ToString()); - } + if (logEvent.TraceId.HasValue) + { + writer.WriteString(_names.TraceId, logEvent.TraceId.Value.ToString()); + } - if (logEvent.SpanId.HasValue) - { - writer.WriteString(_names.SpanId, logEvent.SpanId.Value.ToString()); - } + if (logEvent.SpanId.HasValue) + { + writer.WriteString(_names.SpanId, logEvent.SpanId.Value.ToString()); + } - if (logEvent.Exception != null) - { - writer.WriteString(_names.Exception, logEvent.Exception.ToString()); - } + if (logEvent.Exception != null) + { + writer.WriteString(_names.Exception, logEvent.Exception.ToString()); + } - if (logEvent.Properties.Count != 0) + if (logEvent.Properties.Count != 0) + { + writer.WriteStartObject(_names.Properties); + foreach (var property in logEvent.Properties) { - writer.WriteStartObject(_names.Properties); - foreach (var property in logEvent.Properties) - { - writer.WritePropertyName(_namingPolicy.ConvertName(property.Key)); - Format(property.Value, writer); - } - - writer.WriteEndObject(); + writer.WritePropertyName(_namingPolicy.ConvertName(property.Key)); + Format(property.Value, writer); } + writer.WriteEndObject(); + } - var tokensWithFormat = logEvent.MessageTemplate.Tokens - .OfType() - .Where(pt => pt.Format != null) - .GroupBy(pt => pt.PropertyName) - .ToArray(); - if (tokensWithFormat.Length != 0) - { - writer.WriteStartObject(_names.Renderings); - WriteRenderingsObject(tokensWithFormat, logEvent.Properties, writer); - writer.WriteEndObject(); - } + var tokensWithFormat = logEvent.MessageTemplate.Tokens + .OfType() + .Where(pt => pt.Format != null) + .GroupBy(pt => pt.PropertyName) + .ToArray(); + if (tokensWithFormat.Length != 0) + { + writer.WriteStartObject(_names.Renderings); + WriteRenderingsObject(tokensWithFormat, logEvent.Properties, writer); writer.WriteEndObject(); - writer.Flush(); - if (!(output is StreamWriter) && str is MemoryStream mem) + } + + writer.WriteEndObject(); + writer.Flush(); + if (output is not StreamWriter && str is MemoryStream mem) + { + // if we used memory stream, we wrote to the memory stream, so we need to write to the output manually + using (mem) { - // if we used memory stream, we wrote to the memory stream, so we need to write to the output manually - using (mem) - { -#if NET6_0_OR_GREATER - output.Write(Encoding.UTF8.GetString(mem.ToArray()).AsSpan()); +#if FEATURE_SPAN + output.Write(Encoding.UTF8.GetString(mem.ToArray()).AsSpan()); #else output.Write(Encoding.UTF8.GetString(mem.ToArray())); #endif - } } + } - output.Write(_closingDelimiter); + output.Write(_closingDelimiter); + } + + /// + /// Sets the stream of the instance. + /// + /// The stream to write to. + /// The instance. + private Utf8JsonWriter GetWriter(Stream stream) + { + Writer.Reset(stream); + return Writer; + } + + private void Format(TState value, Utf8JsonWriter writer) where TState : class + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); } - /// - /// Sets the stream of the instance. - /// - /// The stream to write to. - /// The instance. - private Utf8JsonWriter GetWriter(Stream stream) + switch (value) { - Writer.Reset(stream); - return Writer; + case ScalarValue scalarValue: + VisitScalarValue(scalarValue, writer); + return; + case SequenceValue sequenceValue: + VisitSequenceValue(sequenceValue, writer); + return; + case StructureValue structureValue: + VisitStructureValue(structureValue, writer); + return; + case DictionaryValue dictionaryValue: + VisitDictionaryValue(dictionaryValue, writer); + return; + default: + throw new NotSupportedException($"The value {value} is not of a type supported by this visitor."); } + } - private void Format(TState value, Utf8JsonWriter writer) where TState : class + private void VisitDictionaryValue(DictionaryValue dictionary, Utf8JsonWriter writer) + { + writer.WriteStartObject(); + foreach (var element in dictionary.Elements) { - if (value == null) + string key = element.Key.Value?.ToString(); + if (key != null) { - throw new ArgumentNullException(nameof(value)); + writer.WritePropertyName(_namingPolicy.ConvertName(key)); } - - switch (value) + else { - case ScalarValue scalarValue: - VisitScalarValue(scalarValue, writer); - return; - case SequenceValue sequenceValue: - VisitSequenceValue(sequenceValue, writer); - return; - case StructureValue structureValue: - VisitStructureValue(structureValue, writer); - return; - case DictionaryValue dictionaryValue: - VisitDictionaryValue(dictionaryValue, writer); - return; - default: - throw new NotSupportedException($"The value {value} is not of a type supported by this visitor."); + writer.WritePropertyName(_names.Null); } - } - private void VisitDictionaryValue(DictionaryValue dictionary, Utf8JsonWriter writer) - { - writer.WriteStartObject(); - foreach (var element in dictionary.Elements) - { - string key = element.Key.Value?.ToString(); - if (key != null) - { - writer.WritePropertyName(_namingPolicy.ConvertName(key)); - } - else - { - writer.WritePropertyName(_names.Null); - } + Format(element.Value, writer); + } - Format(element.Value, writer); - } + writer.WriteEndObject(); + } - writer.WriteEndObject(); + private void VisitStructureValue(StructureValue structure, Utf8JsonWriter writer) + { + writer.WriteStartObject(); + foreach (var property in structure.Properties) + { + writer.WritePropertyName(_namingPolicy.ConvertName(property.Name)); + Format(property.Value, writer); } - private void VisitStructureValue(StructureValue structure, Utf8JsonWriter writer) + if (structure.TypeTag != null) { - writer.WriteStartObject(); - foreach (var property in structure.Properties) - { - writer.WritePropertyName(_namingPolicy.ConvertName(property.Name)); - Format(property.Value, writer); - } - - if (structure.TypeTag != null) - { - writer.WriteString(_names.TypeTag, structure.TypeTag); - } - - writer.WriteEndObject(); + writer.WriteString(_names.TypeTag, structure.TypeTag); } - private void VisitSequenceValue(SequenceValue sequence, Utf8JsonWriter writer) - { - writer.WriteStartArray(); - foreach (var element in sequence.Elements) - { - Format(element, writer); - } + writer.WriteEndObject(); + } - writer.WriteEndArray(); + private void VisitSequenceValue(SequenceValue sequence, Utf8JsonWriter writer) + { + writer.WriteStartArray(); + foreach (var element in sequence.Elements) + { + Format(element, writer); } - private void VisitScalarValue(ScalarValue value, Utf8JsonWriter writer) + writer.WriteEndArray(); + } + + private void VisitScalarValue(ScalarValue value, Utf8JsonWriter writer) + { + switch (value.Value) { - switch (value.Value) - { - case null: - writer.WriteNullValue(); - break; - case string str: - writer.WriteStringValue(str); - break; - case ValueType vt: - switch (vt) + case null: + writer.WriteNullValue(); + break; + case string str: + writer.WriteStringValue(str); + break; + case ValueType vt: + switch (vt) + { + case int i: + writer.WriteNumberValue(i); + break; + case uint ui: + writer.WriteNumberValue(ui); + break; + case long l: + writer.WriteNumberValue(l); + break; + case ulong ul: + writer.WriteNumberValue(ul); + break; + case decimal dc: + writer.WriteNumberValue(dc); + break; + case byte bt: + writer.WriteNumberValue(bt); + break; + case sbyte sb: + writer.WriteNumberValue(sb); + break; + case short s: + writer.WriteNumberValue(s); + break; + case ushort us: + writer.WriteNumberValue(us); + break; + case double d: + writer.WriteNumberValue(d); + break; + case float f: + writer.WriteNumberValue(f); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case char c: + writer.WriteStringValue([c]); + break; + case DateTime dt: + writer.WriteStringValue(dt); + break; + case DateTimeOffset dto: + writer.WriteStringValue(dto); + break; + case TimeSpan timeSpan: { - case int i: - writer.WriteNumberValue(i); - break; - case uint ui: - writer.WriteNumberValue(ui); - break; - case long l: - writer.WriteNumberValue(l); - break; - case ulong ul: - writer.WriteNumberValue(ul); - break; - case decimal dc: - writer.WriteNumberValue(dc); - break; - case byte bt: - writer.WriteNumberValue(bt); - break; - case sbyte sb: - writer.WriteNumberValue(sb); - break; - case short s: - writer.WriteNumberValue(s); - break; - case ushort us: - writer.WriteNumberValue(us); - break; - case double d: - writer.WriteNumberValue(d); - break; - case float f: - writer.WriteNumberValue(f); - break; - case bool b: - writer.WriteBooleanValue(b); - break; - case char c: -// #if NET8_0_OR_GREATER -// _writer.WriteStringValue([c]); -// #else -// _writer.WriteStringValue(new[] { c }); -// #endif - writer.WriteStringValue(new[] { c }); - break; - case DateTime dt: - writer.WriteStringValue(dt); - break; - case DateTimeOffset dto: - writer.WriteStringValue(dto); - break; - case TimeSpan timeSpan: - { #if FEATURE_IUTF8SPANFORMATTABLE - Span buffer = stackalloc byte[_spanBufferSize]; - if (timeSpan.TryFormat(buffer, out int written, formatProvider: _formatProvider, - format: TimeSpanFormat)) - { - // fallback to string - writer.WriteStringValue(buffer.Slice(0, written)); - } + Span buffer = stackalloc byte[_spanBufferSize]; + if (timeSpan.TryFormat(buffer, out int written, formatProvider: _formatProvider, + format: TimeSpanFormat)) + { + // fallback to string + writer.WriteStringValue(buffer[..written]); + } #elif FEATURE_ISPANFORMATTABLE Span buffer = stackalloc char[_spanBufferSize]; if (timeSpan.TryFormat(buffer, out int written, formatProvider: _formatProvider, format: TimeSpanFormat)) { - writer.WriteStringValue(buffer.Slice(0, written)); + writer.WriteStringValue(buffer[..written]); } #else writer.WriteStringValue(timeSpan.ToString(TimeSpanFormat, _formatProvider)); #endif - break; - } + break; + } #if FEATURE_DATE_AND_TIME_ONLY - case DateOnly dateOnly: + case DateOnly dateOnly: + { + Span buffer = stackalloc char[_spanBufferSize]; + if (dateOnly.TryFormat(buffer, out int written, provider: _formatProvider, + format: DateOnlyFormat)) { - Span buffer = stackalloc char[_spanBufferSize]; - if (dateOnly.TryFormat(buffer, out int written, provider: _formatProvider, - format: DateOnlyFormat)) - { - writer.WriteStringValue(buffer.Slice(0, written)); - } - - break; + writer.WriteStringValue(buffer.Slice(0, written)); } - case TimeOnly timeOnly: - { - Span buffer = stackalloc char[_spanBufferSize]; - if (timeOnly.TryFormat(buffer, out int written, provider: _formatProvider, - format: TimeFormat)) - { - writer.WriteStringValue(buffer.Slice(0, written)); - } - break; + break; + } + case TimeOnly timeOnly: + { + Span buffer = stackalloc char[_spanBufferSize]; + if (timeOnly.TryFormat(buffer, out int written, provider: _formatProvider, + format: TimeFormat)) + { + writer.WriteStringValue(buffer.Slice(0, written)); } + + break; + } #endif - case Guid guid: + case Guid guid: + { + writer.WriteStringValue(guid); + break; + } + default: + { + if (vt.GetType().IsEnum) { - writer.WriteStringValue(guid); - break; + writer.WriteStringValue(vt.ToString()); } - default: - { - if (vt.GetType().IsEnum) - { - writer.WriteStringValue(vt.ToString()); - } #if FEATURE_IUTF8SPANFORMATTABLE - else if (vt is IUtf8SpanFormattable utf8Span) + else if (vt is IUtf8SpanFormattable utf8Span) + { + Span buffer = stackalloc byte[_spanBufferSize * 2]; + if (utf8Span.TryFormat(buffer, out int written, provider: _formatProvider, + format: default)) { - Span buffer = stackalloc byte[_spanBufferSize * 2]; - if (utf8Span.TryFormat(buffer, out int written, provider: _formatProvider, - format: default)) - { - // fallback to string - writer.WriteStringValue(buffer.Slice(0, written)); - } + // fallback to string + writer.WriteStringValue(buffer.Slice(0, written)); } + } #endif #if FEATURE_ISPANFORMATTABLE - else if (vt is ISpanFormattable span) + else if (vt is ISpanFormattable span) + { + Span buffer = stackalloc char[_spanBufferSize]; + if (span.TryFormat(buffer, out int written, provider: _formatProvider, format: default)) { - Span buffer = stackalloc char[_spanBufferSize]; - if (span.TryFormat(buffer, out int written, provider: _formatProvider, format: default)) - { - // fallback to string - writer.WriteStringValue(buffer.Slice(0, written)); - } + // fallback to string + writer.WriteStringValue(buffer.Slice(0, written)); } + } #endif - break; - } + break; } + } - break; + break; #if FEATURE_IUTF8SPANFORMATTABLE - case IUtf8SpanFormattable span: + case IUtf8SpanFormattable span: + { + Span buffer = stackalloc byte[_spanBufferSize * 4]; + if (span.TryFormat(buffer, out int written, provider: _formatProvider, format: default)) { - Span buffer = stackalloc byte[_spanBufferSize * 4]; - if (span.TryFormat(buffer, out int written, provider: _formatProvider, format: default)) - { - // fallback to string - writer.WriteStringValue(buffer.Slice(0, written)); - } - - break; + // fallback to string + writer.WriteStringValue(buffer.Slice(0, written)); } -#endif -#if FEATURE_ISPANFORMATTABLE - case ISpanFormattable span: - { - Span buffer = stackalloc char[_spanBufferSize * 2]; - if (span.TryFormat(buffer, out int written, provider: _formatProvider, format: default)) - { - // fallback to string - writer.WriteStringValue(buffer.Slice(0, written)); - } - break; - } -#endif - default: - writer.WriteStringValue(value.Value?.ToString()); - break; + break; } - } - - private void WriteRenderingsObject(ReadOnlySpan> tokensWithFormat, - IReadOnlyDictionary properties, Utf8JsonWriter writer) - { - foreach (var propertyFormats in tokensWithFormat) +#endif +#if FEATURE_ISPANFORMATTABLE + case ISpanFormattable span: { - writer.WriteStartArray(propertyFormats.Key); - foreach (var format in propertyFormats) + Span buffer = stackalloc char[_spanBufferSize * 2]; + if (span.TryFormat(buffer, out int written, provider: _formatProvider, format: default)) { - writer.WriteStartObject(); - writer.WriteString(_names.Format, format.Format); - writer.WritePropertyName(_names.Rendering); - RenderPropertyToken(format, properties, writer); - writer.WriteEndObject(); + // fallback to string + writer.WriteStringValue(buffer.Slice(0, written)); } - writer.WriteEndArray(); + break; } +#endif + default: + writer.WriteStringValue(value.Value?.ToString()); + break; } + } - private void RenderPropertyToken(PropertyToken pt, - IReadOnlyDictionary properties, Utf8JsonWriter writer) + private void WriteRenderingsObject(ReadOnlySpan> tokensWithFormat, + IReadOnlyDictionary properties, Utf8JsonWriter writer) + { + foreach (var propertyFormats in tokensWithFormat) { - if (!properties.TryGetValue(pt.PropertyName, out var propertyValue)) + writer.WriteStartArray(propertyFormats.Key); + foreach (var format in propertyFormats) { - writer.WriteStringValue(pt.ToString()); - return; + writer.WriteStartObject(); + writer.WriteString(_names.Format, format.Format); + writer.WritePropertyName(_names.Rendering); + RenderPropertyToken(format, properties, writer); + writer.WriteEndObject(); } - RenderValue(propertyValue, pt.Format, writer); + writer.WriteEndArray(); } + } - private void RenderValue(LogEventPropertyValue propertyValue, - string format, Utf8JsonWriter writer) + private void RenderPropertyToken(PropertyToken pt, + IReadOnlyDictionary properties, Utf8JsonWriter writer) + { + if (!properties.TryGetValue(pt.PropertyName, out var propertyValue)) { - var value = propertyValue as ScalarValue; - if (value?.Value is string str) - { - writer.WriteStringValue(str); - return; - } - - propertyValue.Render(_sw.Value, format, _formatProvider); - writer.WriteStringValue(_sw.Value.ToString()); - _sb.Value.Clear(); + writer.WriteStringValue(pt.ToString()); + return; } - private void Dispose(bool disposing) + RenderValue(propertyValue, pt.Format, writer); + } + + private void RenderValue(LogEventPropertyValue propertyValue, + string format, Utf8JsonWriter writer) + { + var value = propertyValue as ScalarValue; + if (value?.Value is string str) { - if (!disposing) - { - return; - } + writer.WriteStringValue(str); + return; + } - _writer.Value.Dispose(); - _writer.Dispose(); + propertyValue.Render(_sw.Value, format, _formatProvider); + writer.WriteStringValue(_sw.Value.ToString()); + _sb.Value.Clear(); + } - _sw.Value.Dispose(); - _sw.Dispose(); - _sb.Dispose(); + private void Dispose(bool disposing) + { + if (!disposing) + { + return; } + + _writer.Value.Dispose(); + _writer.Dispose(); + + _sw.Value.Dispose(); + _sw.Dispose(); + _sb.Dispose(); } } diff --git a/src/Serilog.Extensions.Formatting/packages.lock.json b/src/Serilog.Extensions.Formatting/packages.lock.json index 4686b68..f521f69 100644 --- a/src/Serilog.Extensions.Formatting/packages.lock.json +++ b/src/Serilog.Extensions.Formatting/packages.lock.json @@ -21,11 +21,17 @@ "Microsoft.NETCore.Platforms": "1.1.0" } }, + "PolySharp": { + "type": "Direct", + "requested": "[1.14.1, )", + "resolved": "1.14.1", + "contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ==" + }, "Serilog": { "type": "Direct", - "requested": "[4.0.2, )", - "resolved": "4.0.2", - "contentHash": "Vehq4uNYtURe/OnHEpWGvMgrvr5Vou7oZLdn3BuEH5FSCeHXDpNJtpzWoqywXsSvCTuiv0I65mZDRnJSeUvisA==", + "requested": "[4.1.0, )", + "resolved": "4.1.0", + "contentHash": "u1aZI8HZ62LWlq5dZLFwm6jMax/sUwnWZSw5lkPsCt518cJBxFKoNmc7oSxe5aA5BgSkzy9rzwFGR/i/acnSPw==", "dependencies": { "System.Diagnostics.DiagnosticSource": "8.0.1", "System.Threading.Channels": "8.0.0" @@ -33,22 +39,23 @@ }, "System.Text.Json": { "type": "Direct", - "requested": "[8.0.5, )", - "resolved": "8.0.5", - "contentHash": "0f1B50Ss7rqxXiaBJyzUu9bWFOO2/zSlifZ/UNMdiIpDYe4cY4LQQicP4nirK1OS31I43rn062UIJ1Q9bpmHpg==", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "js7+qAu/9mQvnhA4EfGMZNEzXtJCDxgkgj8ohuxq/Qxv+R56G+ljefhiJHOxTNiw54q8vmABCWUwkMulNdlZ4A==", "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", + "Microsoft.Bcl.AsyncInterfaces": "9.0.0", "System.Buffers": "4.5.1", + "System.IO.Pipelines": "9.0.0", "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "8.0.0", + "System.Text.Encodings.Web": "9.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==", + "resolved": "9.0.0", + "contentHash": "owmu2Cr3IQ8yQiBleBHlGk8dSQ12oaF2e7TpzwJKEl4m84kkZJjEY1n33L67Y3zM5jPOjmmbdHjbfiL0RqcMRQ==", "dependencies": { "System.Threading.Tasks.Extensions": "4.5.4" } @@ -82,6 +89,16 @@ "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, + "System.IO.Pipelines": { + "type": "Transitive", + "resolved": "9.0.0", + "contentHash": "eA3cinogwaNB4jdjQHOP3Z3EuyiDII7MT35jgtnsA4vkn0LUrrSHsU0nzHTzFzmaFYeKV7MYyMxOocFzsBHpTw==", + "dependencies": { + "System.Buffers": "4.5.1", + "System.Memory": "4.5.5", + "System.Threading.Tasks.Extensions": "4.5.4" + } + }, "System.Memory": { "type": "Transitive", "resolved": "4.5.5", @@ -104,8 +121,8 @@ }, "System.Text.Encodings.Web": { "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", + "resolved": "9.0.0", + "contentHash": "e2hMgAErLbKyUUwt18qSBf9T5Y+SFAL3ZedM8fLupkVj8Rj2PZ9oxQ37XX2LF8fTO1wNIxvKpihD7Of7D/NxZw==", "dependencies": { "System.Buffers": "4.5.1", "System.Memory": "4.5.5", @@ -132,15 +149,15 @@ "net6.0": { "Microsoft.NET.ILLink.Analyzers": { "type": "Direct", - "requested": "[7.0.100-1.23401.1, )", - "resolved": "7.0.100-1.23401.1", - "contentHash": "XirkjOLc5Vc3HsXRc2Z6ZbQv6l0RvWgJa/31w7XqZ914MoSi3H3OCNRMWFw7H2EYfsnKbokFfhCcysAmUcEOgw==" + "requested": "[7.0.100-1.23211.1, )", + "resolved": "7.0.100-1.23211.1", + "contentHash": "0GvbEgDGcUQA9KuWcQU1WwYHXt1tBzNr1Nls/M57rM7NA/AndFwCaCEoJpJkmxRY7xLlPDBnmGp8h5+FNqUngg==" }, "Microsoft.NET.ILLink.Tasks": { "type": "Direct", - "requested": "[7.0.100-1.23401.1, )", - "resolved": "7.0.100-1.23401.1", - "contentHash": "mI6vCdPEhluLtMn/GV0texEWg5oAPQWCCE4LWspM+Bmy75Nd4EQsziQXrdOFqNeSBQMrxDX9C/O5Xi3kpKSMIw==" + "requested": "[7.0.100-1.23211.1, )", + "resolved": "7.0.100-1.23211.1", + "contentHash": "tvG8XZYLjT0o3WicCyKBZysVWo1jC9HdCFmNRmddx3WbAz0UCsd0qKZqpiEo99VLA8Re+FzWK51OcRldQPbt2Q==" }, "Microsoft.SourceLink.GitHub": { "type": "Direct", @@ -152,11 +169,17 @@ "Microsoft.SourceLink.Common": "8.0.0" } }, + "PolySharp": { + "type": "Direct", + "requested": "[1.14.1, )", + "resolved": "1.14.1", + "contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ==" + }, "Serilog": { "type": "Direct", - "requested": "[4.0.2, )", - "resolved": "4.0.2", - "contentHash": "Vehq4uNYtURe/OnHEpWGvMgrvr5Vou7oZLdn3BuEH5FSCeHXDpNJtpzWoqywXsSvCTuiv0I65mZDRnJSeUvisA==" + "requested": "[4.1.0, )", + "resolved": "4.1.0", + "contentHash": "u1aZI8HZ62LWlq5dZLFwm6jMax/sUwnWZSw5lkPsCt518cJBxFKoNmc7oSxe5aA5BgSkzy9rzwFGR/i/acnSPw==" }, "Microsoft.Build.Tasks.Git": { "type": "Transitive", @@ -172,9 +195,49 @@ "net8.0": { "Microsoft.NET.ILLink.Tasks": { "type": "Direct", - "requested": "[8.0.10, )", - "resolved": "8.0.10", - "contentHash": "xT8jYjlroY7SLbGtoV9vUTVW/TPgodL4Egc31a444Xe0TMytLZ3UlKQ0kxMZsy/CrWsFB6wtKnSG1SsXcWreew==" + "requested": "[8.0.11, )", + "resolved": "8.0.11", + "contentHash": "zk5lnZrYJgtuJG8L4v17Ej8rZ3PUcR2iweNV08BaO5LbYHIi2wNaVNcJoLxvqgQdnjLlKnCCfVGLDr6QHeAarQ==" + }, + "Microsoft.SourceLink.GitHub": { + "type": "Direct", + "requested": "[8.0.0, )", + "resolved": "8.0.0", + "contentHash": "G5q7OqtwIyGTkeIOAc3u2ZuV/kicQaec5EaRnc0pIeSnh9LUjj+PYQrJYBURvDt7twGl2PKA7nSN0kz1Zw5bnQ==", + "dependencies": { + "Microsoft.Build.Tasks.Git": "8.0.0", + "Microsoft.SourceLink.Common": "8.0.0" + } + }, + "PolySharp": { + "type": "Direct", + "requested": "[1.14.1, )", + "resolved": "1.14.1", + "contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ==" + }, + "Serilog": { + "type": "Direct", + "requested": "[4.1.0, )", + "resolved": "4.1.0", + "contentHash": "u1aZI8HZ62LWlq5dZLFwm6jMax/sUwnWZSw5lkPsCt518cJBxFKoNmc7oSxe5aA5BgSkzy9rzwFGR/i/acnSPw==" + }, + "Microsoft.Build.Tasks.Git": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ==" + }, + "Microsoft.SourceLink.Common": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw==" + } + }, + "net9.0": { + "Microsoft.NET.ILLink.Tasks": { + "type": "Direct", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "zAwp213evC3UkimtVXRb+Dlgc/40QG145nmZDtp2LO9zJJMfrp+i/87BnXN7tRXEA4liyzdFkjqG1HE8/RPb4A==" }, "Microsoft.SourceLink.GitHub": { "type": "Direct", @@ -186,11 +249,17 @@ "Microsoft.SourceLink.Common": "8.0.0" } }, + "PolySharp": { + "type": "Direct", + "requested": "[1.14.1, )", + "resolved": "1.14.1", + "contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ==" + }, "Serilog": { "type": "Direct", - "requested": "[4.0.2, )", - "resolved": "4.0.2", - "contentHash": "Vehq4uNYtURe/OnHEpWGvMgrvr5Vou7oZLdn3BuEH5FSCeHXDpNJtpzWoqywXsSvCTuiv0I65mZDRnJSeUvisA==" + "requested": "[4.1.0, )", + "resolved": "4.1.0", + "contentHash": "u1aZI8HZ62LWlq5dZLFwm6jMax/sUwnWZSw5lkPsCt518cJBxFKoNmc7oSxe5aA5BgSkzy9rzwFGR/i/acnSPw==" }, "Microsoft.Build.Tasks.Git": { "type": "Transitive", diff --git a/test/Serilog.Extensions.Formatting.Benchmark/JsonFormatterBenchmark.cs b/test/Serilog.Extensions.Formatting.Benchmark/JsonFormatterBenchmark.cs index d04dccb..3766ff2 100644 --- a/test/Serilog.Extensions.Formatting.Benchmark/JsonFormatterBenchmark.cs +++ b/test/Serilog.Extensions.Formatting.Benchmark/JsonFormatterBenchmark.cs @@ -8,74 +8,73 @@ using Serilog.Formatting.Json; using Serilog.Templates; -namespace Serilog.Extensions.Formatting.Benchmark +namespace Serilog.Extensions.Formatting.Benchmark; + +[SimpleJob] +[MemoryDiagnoser] +[GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByMethod)] +public class JsonFormatterBenchmark { - [SimpleJob] - [MemoryDiagnoser] - [GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByMethod)] - public class JsonFormatterBenchmark - { - private Exception _exception; - private Logger _jsonLog; + private Exception _exception; + private Logger _jsonLog; - [ParamsAllValues] - public Formatters Formatter { get; set; } + [ParamsAllValues] + public Formatters Formatter { get; set; } - private static readonly DateTime s_propertyValue0 = new DateTime(1970, 1, 1); - private static readonly dynamic s_propertyValue1 = new { B = new DateTime(2000, 1, 1), C = new[] { 1, 2, 3 } }; + private static readonly DateTime s_propertyValue0 = new(1970, 1, 1); + private static readonly dynamic s_propertyValue1 = new { B = new DateTime(2000, 1, 1), C = new[] { 1, 2, 3 } }; - private static readonly Dictionary s_propertyValue2 = new Dictionary - { - { "D", new DateTime(2000, 1, 1) }, - { "E", new DateTime(2000, 1, 1) }, - { "F", new DateTime(2000, 1, 1) }, - }; + private static readonly Dictionary s_propertyValue2 = new() + { + { "D", new DateTime(2000, 1, 1) }, + { "E", new DateTime(2000, 1, 1) }, + { "F", new DateTime(2000, 1, 1) }, + }; - [GlobalSetup] - public void Setup() - { - _exception = new Exception("An Error"); - _jsonLog = new LoggerConfiguration().MinimumLevel.Verbose() - .WriteTo.Sink(new NullSink( - Formatter == Formatters.Json ? new JsonFormatter() : - Formatter == Formatters.Utf8Json ? new Utf8JsonFormatter(skipValidation: true) : - Formatter == Formatters.Expression ? (ITextFormatter)new ExpressionTemplate( - "{ {Timestamp:@t,Level:@l,MessageTemplate:@mt,RenderedMessage:@m,TraceId:@tr,SpanId:@sp,Exception:@x,Properties:@p,Renderings:@r} }\n") : - throw new ArgumentOutOfRangeException(nameof(Formatter), Formatter, null), - new StreamWriter(Stream.Null))) - .CreateLogger(); - } + [GlobalSetup] + public void Setup() + { + _exception = new Exception("An Error"); + _jsonLog = new LoggerConfiguration().MinimumLevel.Verbose() + .WriteTo.Sink(new NullSink( + Formatter == Formatters.Json ? new JsonFormatter() : + Formatter == Formatters.Utf8Json ? new Utf8JsonFormatter(skipValidation: true) : + Formatter == Formatters.Expression ? (ITextFormatter)new ExpressionTemplate( + "{ {Timestamp:@t,Level:@l,MessageTemplate:@mt,RenderedMessage:@m,TraceId:@tr,SpanId:@sp,Exception:@x,Properties:@p,Renderings:@r} }\n") : + throw new ArgumentOutOfRangeException(nameof(Formatter), Formatter, null), + new StreamWriter(Stream.Null))) + .CreateLogger(); + } - [Benchmark] - public void EmitLogEvent() - { - _jsonLog.Error(_exception, "Hello, {Name}!", "World"); - _jsonLog.Information("Hello, {Name}!", "Alex"); - _jsonLog.Debug("This is a debug message"); - } + [Benchmark] + public void EmitLogEvent() + { + _jsonLog.Error(_exception, "Hello, {Name}!", "World"); + _jsonLog.Information("Hello, {Name}!", "Alex"); + _jsonLog.Debug("This is a debug message"); + } - [Benchmark] - public void IntProperties() - { - _jsonLog.Error(_exception, "Hello, {A:0000} {B:0000} {C:0000}!", 1, 2, 3); - _jsonLog.Information("The current time is, {Time}!", int.MaxValue); - _jsonLog.Debug("Hello there!"); - } + [Benchmark] + public void IntProperties() + { + _jsonLog.Error(_exception, "Hello, {A:0000} {B:0000} {C:0000}!", 1, 2, 3); + _jsonLog.Information("The current time is, {Time}!", int.MaxValue); + _jsonLog.Debug("Hello there!"); + } - [Benchmark] - public void ComplexProperties() - { - _jsonLog.Error(_exception, "Hello, {A:D} {@B} {C}!", s_propertyValue0, s_propertyValue1, - s_propertyValue2); - _jsonLog.Information("The current time is, {Time:c}!", TimeSpan.MaxValue); - _jsonLog.Debug("Hello there!"); - } + [Benchmark] + public void ComplexProperties() + { + _jsonLog.Error(_exception, "Hello, {A:D} {@B} {C}!", s_propertyValue0, s_propertyValue1, + s_propertyValue2); + _jsonLog.Information("The current time is, {Time:c}!", TimeSpan.MaxValue); + _jsonLog.Debug("Hello there!"); + } - public enum Formatters - { - Json, - Utf8Json, - Expression, - } + public enum Formatters + { + Json, + Utf8Json, + Expression, } } diff --git a/test/Serilog.Extensions.Formatting.Benchmark/JsonFormatterEnrichBenchmark.cs b/test/Serilog.Extensions.Formatting.Benchmark/JsonFormatterEnrichBenchmark.cs index 462cab8..a9ed27a 100644 --- a/test/Serilog.Extensions.Formatting.Benchmark/JsonFormatterEnrichBenchmark.cs +++ b/test/Serilog.Extensions.Formatting.Benchmark/JsonFormatterEnrichBenchmark.cs @@ -12,107 +12,106 @@ using Serilog.Formatting.Json; using Serilog.Templates; -namespace Serilog.Extensions.Formatting.Benchmark +namespace Serilog.Extensions.Formatting.Benchmark; + +[SimpleJob] +[MemoryDiagnoser] +[GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByMethod)] +public class JsonFormatterEnrichBenchmark { - [SimpleJob] - [MemoryDiagnoser] - [GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByMethod)] - public class JsonFormatterEnrichBenchmark - { - private IEnumerable _contexts; - private Exception _exception; - private Logger _jsonLog; + private IEnumerable _contexts; + private Exception _exception; + private Logger _jsonLog; - [ParamsAllValues] - public Formatters Formatter { get; set; } + [ParamsAllValues] + public Formatters Formatter { get; set; } - private static readonly DateTime s_propertyValue0 = new DateTime(1970, 1, 1); - private static readonly dynamic s_propertyValue1 = new { B = new DateTime(2000, 1, 1), C = new[] { 1, 2, 3 } }; + private static readonly DateTime s_propertyValue0 = new(1970, 1, 1); + private static readonly dynamic s_propertyValue1 = new { B = new DateTime(2000, 1, 1), C = new[] { 1, 2, 3 } }; - private static readonly Dictionary s_propertyValue2 = new Dictionary - { - { "D", new DateTime(2000, 1, 1) }, - { "E", new DateTime(2000, 1, 1) }, - { "F", new DateTime(2000, 1, 1) }, - }; + private static readonly Dictionary s_propertyValue2 = new() + { + { "D", new DateTime(2000, 1, 1) }, + { "E", new DateTime(2000, 1, 1) }, + { "F", new DateTime(2000, 1, 1) }, + }; - private static LoggerConfiguration LoggerConfiguration() - { - return new LoggerConfiguration().MinimumLevel.Verbose() - .Enrich.WithEnvironmentName() - .Enrich.WithMemoryUsage() - .Enrich.WithProcessId() - .Enrich.WithThreadId() - .Enrich.WithExceptionDetails() - .Enrich.WithSensitiveDataMasking(new SensitiveDataEnricherOptions()) - .Enrich.WithEnvironmentUserName() - .Enrich.WithProperty("HelloWorld", int.MaxValue); - } + private static LoggerConfiguration LoggerConfiguration() + { + return new LoggerConfiguration().MinimumLevel.Verbose() + .Enrich.WithEnvironmentName() + .Enrich.WithMemoryUsage() + .Enrich.WithProcessId() + .Enrich.WithThreadId() + .Enrich.WithExceptionDetails() + .Enrich.WithSensitiveDataMasking(new SensitiveDataEnricherOptions()) + .Enrich.WithEnvironmentUserName() + .Enrich.WithProperty("HelloWorld", int.MaxValue); + } - [GlobalSetup] - public void Setup() - { - _exception = new Exception("An Error"); - _jsonLog = LoggerConfiguration() - .WriteTo.Sink(new NullSink(Formatter == Formatters.Json ? new JsonFormatter() : - Formatter == Formatters.Utf8Json ? new Utf8JsonFormatter(skipValidation: true) : - Formatter == Formatters.Expression ? (ITextFormatter)new ExpressionTemplate( - "{ {Timestamp:@t,Level:@l,MessageTemplate:@mt,RenderedMessage:@m,TraceId:@tr,SpanId:@sp,Exception:@x,Properties:@p,Renderings:@r} }\n") : - throw new ArgumentOutOfRangeException(nameof(Formatter), Formatter, null), - new StreamWriter(Stream.Null))) - .CreateLogger(); - _contexts = - new List - { - LogContext.PushProperty("HelloWorld", _exception, true), + [GlobalSetup] + public void Setup() + { + _exception = new Exception("An Error"); + _jsonLog = LoggerConfiguration() + .WriteTo.Sink(new NullSink(Formatter == Formatters.Json ? new JsonFormatter() : + Formatter == Formatters.Utf8Json ? new Utf8JsonFormatter(skipValidation: true) : + Formatter == Formatters.Expression ? (ITextFormatter)new ExpressionTemplate( + "{ {Timestamp:@t,Level:@l,MessageTemplate:@mt,RenderedMessage:@m,TraceId:@tr,SpanId:@sp,Exception:@x,Properties:@p,Renderings:@r} }\n") : + throw new ArgumentOutOfRangeException(nameof(Formatter), Formatter, null), + new StreamWriter(Stream.Null))) + .CreateLogger(); + _contexts = + new List + { + LogContext.PushProperty("HelloWorld", _exception, true), #if FEATURE_DATE_AND_TIME_ONLY LogContext.PushProperty("CurrentDate", DateOnly.FromDateTime(DateTime.Now)), LogContext.PushProperty("CurrentTime", TimeOnly.FromDateTime(DateTime.Now)), #endif - LogContext.PushProperty("CurrentDateTime", DateTime.Now), - LogContext.PushProperty("EnumValue", LogEventLevel.Fatal), - }.AsReadOnly(); - } + LogContext.PushProperty("CurrentDateTime", DateTime.Now), + LogContext.PushProperty("EnumValue", LogEventLevel.Fatal), + }.AsReadOnly(); + } - [GlobalCleanup] - public void Dispose() + [GlobalCleanup] + public void Dispose() + { + foreach (var ctx in _contexts) { - foreach (var ctx in _contexts) - { - ctx.Dispose(); - } + ctx.Dispose(); } + } - [Benchmark] - public void EmitLogEvent() - { - _jsonLog.Error(_exception, "Hello, {Name}!", "World"); - _jsonLog.Information("Hello, {Name}!", "Alex"); - _jsonLog.Debug("This is a debug message"); - } + [Benchmark] + public void EmitLogEvent() + { + _jsonLog.Error(_exception, "Hello, {Name}!", "World"); + _jsonLog.Information("Hello, {Name}!", "Alex"); + _jsonLog.Debug("This is a debug message"); + } - [Benchmark] - public void ComplexProperties() - { - _jsonLog.Error(_exception, "Hello, {A:D} {@B} {C}!", s_propertyValue0, s_propertyValue1, - s_propertyValue2); - _jsonLog.Information("The current time is, {Time:c}!", TimeSpan.MaxValue); - _jsonLog.Debug("Hello there!"); - } + [Benchmark] + public void ComplexProperties() + { + _jsonLog.Error(_exception, "Hello, {A:D} {@B} {C}!", s_propertyValue0, s_propertyValue1, + s_propertyValue2); + _jsonLog.Information("The current time is, {Time:c}!", TimeSpan.MaxValue); + _jsonLog.Debug("Hello there!"); + } - [Benchmark] - public void IntProperties() - { - _jsonLog.Error(_exception, "Hello, {A:0000} {B:0000} {C:0000}!", 1, 2, 3); - _jsonLog.Information("The current time is, {Time}!", int.MaxValue); - _jsonLog.Debug("Hello there!"); - } + [Benchmark] + public void IntProperties() + { + _jsonLog.Error(_exception, "Hello, {A:0000} {B:0000} {C:0000}!", 1, 2, 3); + _jsonLog.Information("The current time is, {Time}!", int.MaxValue); + _jsonLog.Debug("Hello there!"); + } - public enum Formatters - { - Json, - Utf8Json, - Expression, - } + public enum Formatters + { + Json, + Utf8Json, + Expression, } } diff --git a/test/Serilog.Extensions.Formatting.Benchmark/JsonFormatterNamingBenchmark.cs b/test/Serilog.Extensions.Formatting.Benchmark/JsonFormatterNamingBenchmark.cs index a9a6d9a..4a16fe0 100644 --- a/test/Serilog.Extensions.Formatting.Benchmark/JsonFormatterNamingBenchmark.cs +++ b/test/Serilog.Extensions.Formatting.Benchmark/JsonFormatterNamingBenchmark.cs @@ -9,106 +9,105 @@ using Serilog.Enrichers.Sensitive; using Serilog.Exceptions; -namespace Serilog.Extensions.Formatting.Benchmark +namespace Serilog.Extensions.Formatting.Benchmark; + +[SimpleJob] +[MemoryDiagnoser] +[GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByMethod)] +public class JsonFormatterNamingBenchmark { - [SimpleJob] - [MemoryDiagnoser] - [GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByMethod)] - public class JsonFormatterNamingBenchmark - { - private Exception _exception; - private Logger _jsonLog; + private Exception _exception; + private Logger _jsonLog; - [ParamsAllValues] - public Namings Naming { get; set; } + [ParamsAllValues] + public Namings Naming { get; set; } - private static readonly DateTime s_propertyValue0 = new DateTime(1970, 1, 1); - private static readonly dynamic s_propertyValue1 = new { B = new DateTime(2000, 1, 1), C = new[] { 1, 2, 3 } }; + private static readonly DateTime s_propertyValue0 = new(1970, 1, 1); + private static readonly dynamic s_propertyValue1 = new { B = new DateTime(2000, 1, 1), C = new[] { 1, 2, 3 } }; - private static readonly Dictionary s_propertyValue2 = new Dictionary - { - { "D", new DateTime(2000, 1, 1) }, - { "E", new DateTime(2000, 1, 1) }, - { "F", new DateTime(2000, 1, 1) }, - }; + private static readonly Dictionary s_propertyValue2 = new() + { + { "D", new DateTime(2000, 1, 1) }, + { "E", new DateTime(2000, 1, 1) }, + { "F", new DateTime(2000, 1, 1) }, + }; - private static LoggerConfiguration LoggerConfiguration() - { - return new LoggerConfiguration().MinimumLevel.Verbose() - .Enrich.WithEnvironmentName() - .Enrich.WithMemoryUsage() - .Enrich.WithProcessId() - .Enrich.WithThreadId() - .Enrich.WithExceptionDetails() - .Enrich.WithSensitiveDataMasking(new SensitiveDataEnricherOptions()) - .Enrich.WithEnvironmentUserName() - .Enrich.WithProperty("HelloWorld", int.MaxValue); - } + private static LoggerConfiguration LoggerConfiguration() + { + return new LoggerConfiguration().MinimumLevel.Verbose() + .Enrich.WithEnvironmentName() + .Enrich.WithMemoryUsage() + .Enrich.WithProcessId() + .Enrich.WithThreadId() + .Enrich.WithExceptionDetails() + .Enrich.WithSensitiveDataMasking(new SensitiveDataEnricherOptions()) + .Enrich.WithEnvironmentUserName() + .Enrich.WithProperty("HelloWorld", int.MaxValue); + } - private static JsonNamingPolicy GetNamingPolicy(Namings naming) + private static JsonNamingPolicy GetNamingPolicy(Namings naming) + { + switch (naming) { - switch (naming) - { - case Namings.CamelCase: - return JsonNamingPolicy.CamelCase; + case Namings.CamelCase: + return JsonNamingPolicy.CamelCase; #if FEATURE_JSON_NAMING_POLICY case Namings.SnakeCase: return JsonNamingPolicy.SnakeCaseLower; case Namings.KebabCase: return JsonNamingPolicy.KebabCaseLower; #endif - case Namings.None: - return null; - default: - throw new ArgumentOutOfRangeException(nameof(naming), naming, null); - } + case Namings.None: + return null; + default: + throw new ArgumentOutOfRangeException(nameof(naming), naming, null); } + } - [GlobalSetup] - public void Setup() - { - _exception = new Exception("An Error"); - _jsonLog = LoggerConfiguration() - .WriteTo.Sink(new NullSink( - new Utf8JsonFormatter(renderMessage: true, namingPolicy: GetNamingPolicy(Naming), - formatProvider: new CultureInfo("en-GB")), - new StreamWriter(Stream.Null))) - .CreateLogger(); - } + [GlobalSetup] + public void Setup() + { + _exception = new Exception("An Error"); + _jsonLog = LoggerConfiguration() + .WriteTo.Sink(new NullSink( + new Utf8JsonFormatter(renderMessage: true, namingPolicy: GetNamingPolicy(Naming), + formatProvider: new CultureInfo("en-GB")), + new StreamWriter(Stream.Null))) + .CreateLogger(); + } - [Benchmark] - public void EmitLogEvent() - { - _jsonLog.Error(_exception, "Hello, {Name}!", "World"); - _jsonLog.Information("Hello, {Name}!", "Alex"); - _jsonLog.Debug("This is a debug message"); - } + [Benchmark] + public void EmitLogEvent() + { + _jsonLog.Error(_exception, "Hello, {Name}!", "World"); + _jsonLog.Information("Hello, {Name}!", "Alex"); + _jsonLog.Debug("This is a debug message"); + } - [Benchmark] - public void IntProperties() - { - _jsonLog.Error(_exception, "Hello, {A:0000} {B:0000} {C:0000}!", 1, 2, 3); - _jsonLog.Information("The current time is, {Time}!", int.MaxValue); - _jsonLog.Debug("Hello there!"); - } + [Benchmark] + public void IntProperties() + { + _jsonLog.Error(_exception, "Hello, {A:0000} {B:0000} {C:0000}!", 1, 2, 3); + _jsonLog.Information("The current time is, {Time}!", int.MaxValue); + _jsonLog.Debug("Hello there!"); + } - [Benchmark] - public void ComplexProperties() - { - _jsonLog.Error(_exception, "Hello, {A:D} {@B} {C}!", s_propertyValue0, s_propertyValue1, - s_propertyValue2); - _jsonLog.Information("The current time is, {Time:c}!", TimeSpan.MaxValue); - _jsonLog.Debug("Hello there!"); - } + [Benchmark] + public void ComplexProperties() + { + _jsonLog.Error(_exception, "Hello, {A:D} {@B} {C}!", s_propertyValue0, s_propertyValue1, + s_propertyValue2); + _jsonLog.Information("The current time is, {Time:c}!", TimeSpan.MaxValue); + _jsonLog.Debug("Hello there!"); + } - public enum Namings - { - CamelCase, + public enum Namings + { + CamelCase, #if FEATURE_JSON_NAMING_POLICY SnakeCase, KebabCase, #endif - None, - } + None, } } diff --git a/test/Serilog.Extensions.Formatting.Benchmark/NullSink.cs b/test/Serilog.Extensions.Formatting.Benchmark/NullSink.cs index c535f60..c38e14d 100644 --- a/test/Serilog.Extensions.Formatting.Benchmark/NullSink.cs +++ b/test/Serilog.Extensions.Formatting.Benchmark/NullSink.cs @@ -3,22 +3,21 @@ using Serilog.Events; using Serilog.Formatting; -namespace Serilog.Extensions.Formatting.Benchmark +namespace Serilog.Extensions.Formatting.Benchmark; + +public class NullSink : ILogEventSink { - public class NullSink : ILogEventSink - { - private readonly ITextFormatter _formatter; - private readonly TextWriter _textWriter; + private readonly ITextFormatter _formatter; + private readonly TextWriter _textWriter; - public NullSink(ITextFormatter formatter, TextWriter textWriter) - { - _formatter = formatter; - _textWriter = textWriter; - } + public NullSink(ITextFormatter formatter, TextWriter textWriter) + { + _formatter = formatter; + _textWriter = textWriter; + } - public void Emit(LogEvent logEvent) - { - _formatter.Format(logEvent, _textWriter); - } + public void Emit(LogEvent logEvent) + { + _formatter.Format(logEvent, _textWriter); } } diff --git a/test/Serilog.Extensions.Formatting.Benchmark/Program.cs b/test/Serilog.Extensions.Formatting.Benchmark/Program.cs index 5a76147..25511db 100644 --- a/test/Serilog.Extensions.Formatting.Benchmark/Program.cs +++ b/test/Serilog.Extensions.Formatting.Benchmark/Program.cs @@ -1,12 +1,11 @@ using BenchmarkDotNet.Running; -namespace Serilog.Extensions.Formatting.Benchmark +namespace Serilog.Extensions.Formatting.Benchmark; + +public class Program { - public class Program + public static void Main(string[] args) { - public static void Main(string[] args) - { - BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args); - } + BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args); } } diff --git a/test/Serilog.Extensions.Formatting.Benchmark/Serilog.Extensions.Formatting.Benchmark.csproj b/test/Serilog.Extensions.Formatting.Benchmark/Serilog.Extensions.Formatting.Benchmark.csproj index 90cea88..b71b704 100644 --- a/test/Serilog.Extensions.Formatting.Benchmark/Serilog.Extensions.Formatting.Benchmark.csproj +++ b/test/Serilog.Extensions.Formatting.Benchmark/Serilog.Extensions.Formatting.Benchmark.csproj @@ -1,7 +1,7 @@  - net8.0;net6.0;net481;net472 + net9.0;net8.0;net6.0;net481;net472 Exe false false @@ -9,7 +9,10 @@ - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + @@ -18,7 +21,7 @@ - + diff --git a/test/Serilog.Extensions.Formatting.Benchmark/packages.lock.json b/test/Serilog.Extensions.Formatting.Benchmark/packages.lock.json index 022f328..13b0cdf 100644 --- a/test/Serilog.Extensions.Formatting.Benchmark/packages.lock.json +++ b/test/Serilog.Extensions.Formatting.Benchmark/packages.lock.json @@ -25,19 +25,11 @@ "System.Threading.Tasks.Extensions": "4.5.4" } }, - "Microsoft.Extensions.Logging": { + "PolySharp": { "type": "Direct", - "requested": "[8.0.1, )", - "resolved": "8.0.1", - "contentHash": "4x+pzsQEbqxhNf1QYRr5TDkLP9UsLT3A6MdRKDDEgrW7h1ljiEPgTNhKYUhNCCAaVpQECVQ+onA91PTPnIp6Lw==", - "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "Microsoft.Extensions.DependencyInjection": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2", - "System.Diagnostics.DiagnosticSource": "8.0.1", - "System.ValueTuple": "4.5.0" - } + "requested": "[1.14.1, )", + "resolved": "1.14.1", + "contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ==" }, "Serilog.Enrichers.Environment": { "type": "Direct", @@ -110,11 +102,11 @@ }, "System.Reflection.Metadata": { "type": "Direct", - "requested": "[8.0.1, )", - "resolved": "8.0.1", - "contentHash": "+4sz5vGHPlo+5NpAxf2IlABnqVvOHOxv17b4dONv4hVwyNeFAeBevT14DIn7X3YWQ+eQFYO3YeTBNCleAblOKA==", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "ANiqLu3DxW9kol/hMmTWbt3414t9ftdIuiIU7j80okq2YzAueo120M442xk1kDJWtmZTqWQn7wHDvMRipVOEOQ==", "dependencies": { - "System.Collections.Immutable": "8.0.0", + "System.Collections.Immutable": "9.0.0", "System.Memory": "4.5.5" } }, @@ -140,8 +132,8 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==", + "resolved": "9.0.0", + "contentHash": "owmu2Cr3IQ8yQiBleBHlGk8dSQ12oaF2e7TpzwJKEl4m84kkZJjEY1n33L67Y3zM5jPOjmmbdHjbfiL0RqcMRQ==", "dependencies": { "System.Threading.Tasks.Extensions": "4.5.4" } @@ -209,53 +201,67 @@ "System.Runtime.InteropServices.RuntimeInformation": "4.0.0" } }, - "Microsoft.Extensions.DependencyInjection": { + "Microsoft.Extensions.Configuration": { "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "BmANAnR5Xd4Oqw7yQ75xOAYODybZQRzdeNucg7kS5wWKd2PNnMdYtJ2Vciy0QLylRmv42DGl5+AFL9izA6F1Rw==", + "resolved": "2.1.1", + "contentHash": "LjVKO6P2y52c5ZhTLX/w8zc5H4Y3J/LJsgqTBj49TtFq/hAtVNue/WA0F6/7GMY90xhD7K0MDZ4qpOeWXbLvzg==", "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "System.Threading.Tasks.Extensions": "4.5.4" + "Microsoft.Extensions.Configuration.Abstractions": "2.1.1" } }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { + "Microsoft.Extensions.Configuration.Abstractions": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "3iE7UF7MQkCv1cxzCahz+Y/guQbTqieyxyaWKhrRO91itI9cOKO76OHeQDahqG4MmW5umr3CcCvGmK92lWNlbg==", + "resolved": "2.1.1", + "contentHash": "VfuZJNa0WUshZ/+8BFZAhwFKiKuu/qOUCFntfdLpHj7vcRnsGHqd3G2Hse78DM+pgozczGM63lGPRLmy+uhUOA==", "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "System.Threading.Tasks.Extensions": "4.5.4" + "Microsoft.Extensions.Primitives": "2.1.1" } }, - "Microsoft.Extensions.Logging.Abstractions": { + "Microsoft.Extensions.Configuration.Binder": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "nroMDjS7hNBPtkZqVBbSiQaQjWRDxITI8Y7XnDs97rqG3EbzVTNLZQf7bIeUJcaHOV8bca47s1Uxq94+2oGdxA==", + "resolved": "2.1.1", + "contentHash": "fcLCTS03poWE4v9tSNBr3pWn0QwGgAn1vzqHXlXgvqZeOc7LvQNzaWcKRQZTdEc3+YhQKwMsOtm3VKSA2aWQ8w==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "System.Buffers": "4.5.1", - "System.Diagnostics.DiagnosticSource": "8.0.1", - "System.Memory": "4.5.5" + "Microsoft.Extensions.Configuration": "2.1.1" } }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "Transitive", + "resolved": "2.1.1", + "contentHash": "MgYpU5cwZohUMKKg3sbPhvGG+eAZ/59E9UwPwlrUkyXU+PGzqwZg9yyQNjhxuAWmoNoFReoemeCku50prYSGzA==" + }, + "Microsoft.Extensions.Logging": { + "type": "Transitive", + "resolved": "2.1.1", + "contentHash": "hh+mkOAQDTp6XH80xJt3+wwYVzkbwYQl9XZRCz4Um0JjP/o7N9vHM3rZ6wwwtr+BBe/L6iBO2sz0px6OWBzqZQ==", + "dependencies": { + "Microsoft.Extensions.Configuration.Binder": "2.1.1", + "Microsoft.Extensions.DependencyInjection.Abstractions": "2.1.1", + "Microsoft.Extensions.Logging.Abstractions": "2.1.1", + "Microsoft.Extensions.Options": "2.1.1" + } + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "Transitive", + "resolved": "2.1.1", + "contentHash": "XRzK7ZF+O6FzdfWrlFTi1Rgj2080ZDsd46vzOjadHUB0Cz5kOvDG8vI7caa5YFrsHQpcfn0DxtjS4E46N4FZsA==" + }, "Microsoft.Extensions.Options": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "dWGKvhFybsaZpGmzkGCbNNwBD1rVlWzrZKANLW/CcbFJpCEceMCGzT7zZwHOGBCbwM0SzBuceMj5HN1LKV1QqA==", + "resolved": "2.1.1", + "contentHash": "V7lXCU78lAbzaulCGFKojcCyG8RTJicEbiBkPJjFqiqXwndEBBIehdXRMWEVU3UtzQ1yDvphiWUL9th6/4gJ7w==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0", - "System.ValueTuple": "4.5.0" + "Microsoft.Extensions.DependencyInjection.Abstractions": "2.1.1", + "Microsoft.Extensions.Primitives": "2.1.1" } }, "Microsoft.Extensions.Primitives": { "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g==", + "resolved": "2.1.1", + "contentHash": "scJ1GZNIxMmjpENh0UZ8XCQ6vzr/LzeF9WvEA51Ix2OQGAs9WPgPu8ABVUdvpKPLuor/t05gm6menJK3PwqOXg==", "dependencies": { - "System.Memory": "4.5.5", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" + "System.Memory": "4.5.1", + "System.Runtime.CompilerServices.Unsafe": "4.5.1" } }, "Microsoft.Win32.Registry": { @@ -289,6 +295,16 @@ "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, + "System.IO.Pipelines": { + "type": "Transitive", + "resolved": "9.0.0", + "contentHash": "eA3cinogwaNB4jdjQHOP3Z3EuyiDII7MT35jgtnsA4vkn0LUrrSHsU0nzHTzFzmaFYeKV7MYyMxOocFzsBHpTw==", + "dependencies": { + "System.Buffers": "4.5.1", + "System.Memory": "4.5.5", + "System.Threading.Tasks.Extensions": "4.5.4" + } + }, "System.Management": { "type": "Transitive", "resolved": "5.0.0", @@ -352,8 +368,8 @@ }, "System.Text.Encodings.Web": { "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", + "resolved": "9.0.0", + "contentHash": "e2hMgAErLbKyUUwt18qSBf9T5Y+SFAL3ZedM8fLupkVj8Rj2PZ9oxQ37XX2LF8fTO1wNIxvKpihD7Of7D/NxZw==", "dependencies": { "System.Buffers": "4.5.1", "System.Memory": "4.5.5", @@ -384,15 +400,15 @@ "Alexaka1.Serilog.Extensions.Formatting": { "type": "Project", "dependencies": { - "Serilog": "[4.0.2, )", - "System.Text.Json": "[8.0.5, )" + "Serilog": "[4.1.0, )", + "System.Text.Json": "[9.0.0, )" } }, "Serilog": { "type": "CentralTransitive", - "requested": "[4.0.2, )", - "resolved": "4.0.2", - "contentHash": "Vehq4uNYtURe/OnHEpWGvMgrvr5Vou7oZLdn3BuEH5FSCeHXDpNJtpzWoqywXsSvCTuiv0I65mZDRnJSeUvisA==", + "requested": "[4.1.0, )", + "resolved": "4.1.0", + "contentHash": "u1aZI8HZ62LWlq5dZLFwm6jMax/sUwnWZSw5lkPsCt518cJBxFKoNmc7oSxe5aA5BgSkzy9rzwFGR/i/acnSPw==", "dependencies": { "System.Diagnostics.DiagnosticSource": "8.0.1", "System.Threading.Channels": "8.0.0" @@ -400,9 +416,9 @@ }, "System.Collections.Immutable": { "type": "CentralTransitive", - "requested": "[8.0.0, )", - "resolved": "8.0.0", - "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w==", "dependencies": { "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" @@ -410,21 +426,22 @@ }, "System.Text.Json": { "type": "CentralTransitive", - "requested": "[8.0.5, )", - "resolved": "8.0.5", - "contentHash": "0f1B50Ss7rqxXiaBJyzUu9bWFOO2/zSlifZ/UNMdiIpDYe4cY4LQQicP4nirK1OS31I43rn062UIJ1Q9bpmHpg==", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "js7+qAu/9mQvnhA4EfGMZNEzXtJCDxgkgj8ohuxq/Qxv+R56G+ljefhiJHOxTNiw54q8vmABCWUwkMulNdlZ4A==", "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", + "Microsoft.Bcl.AsyncInterfaces": "9.0.0", "System.Buffers": "4.5.1", + "System.IO.Pipelines": "9.0.0", "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "8.0.0", + "System.Text.Encodings.Web": "9.0.0", "System.Threading.Tasks.Extensions": "4.5.4", "System.ValueTuple": "4.5.0" } } }, - ".NETFramework,Version=v4.7.2/win7-x86": { + ".NETFramework,Version=v4.7.2/win-x86": { "Gee.External.Capstone": { "type": "Transitive", "resolved": "2.3.0", @@ -495,19 +512,11 @@ "System.Threading.Tasks.Extensions": "4.5.4" } }, - "Microsoft.Extensions.Logging": { + "PolySharp": { "type": "Direct", - "requested": "[8.0.1, )", - "resolved": "8.0.1", - "contentHash": "4x+pzsQEbqxhNf1QYRr5TDkLP9UsLT3A6MdRKDDEgrW7h1ljiEPgTNhKYUhNCCAaVpQECVQ+onA91PTPnIp6Lw==", - "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "Microsoft.Extensions.DependencyInjection": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2", - "System.Diagnostics.DiagnosticSource": "8.0.1", - "System.ValueTuple": "4.5.0" - } + "requested": "[1.14.1, )", + "resolved": "1.14.1", + "contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ==" }, "Serilog.Enrichers.Environment": { "type": "Direct", @@ -580,11 +589,11 @@ }, "System.Reflection.Metadata": { "type": "Direct", - "requested": "[8.0.1, )", - "resolved": "8.0.1", - "contentHash": "+4sz5vGHPlo+5NpAxf2IlABnqVvOHOxv17b4dONv4hVwyNeFAeBevT14DIn7X3YWQ+eQFYO3YeTBNCleAblOKA==", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "ANiqLu3DxW9kol/hMmTWbt3414t9ftdIuiIU7j80okq2YzAueo120M442xk1kDJWtmZTqWQn7wHDvMRipVOEOQ==", "dependencies": { - "System.Collections.Immutable": "8.0.0", + "System.Collections.Immutable": "9.0.0", "System.Memory": "4.5.5" } }, @@ -610,8 +619,8 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==", + "resolved": "9.0.0", + "contentHash": "owmu2Cr3IQ8yQiBleBHlGk8dSQ12oaF2e7TpzwJKEl4m84kkZJjEY1n33L67Y3zM5jPOjmmbdHjbfiL0RqcMRQ==", "dependencies": { "System.Threading.Tasks.Extensions": "4.5.4" } @@ -679,53 +688,67 @@ "System.Runtime.InteropServices.RuntimeInformation": "4.0.0" } }, - "Microsoft.Extensions.DependencyInjection": { + "Microsoft.Extensions.Configuration": { "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "BmANAnR5Xd4Oqw7yQ75xOAYODybZQRzdeNucg7kS5wWKd2PNnMdYtJ2Vciy0QLylRmv42DGl5+AFL9izA6F1Rw==", + "resolved": "2.1.1", + "contentHash": "LjVKO6P2y52c5ZhTLX/w8zc5H4Y3J/LJsgqTBj49TtFq/hAtVNue/WA0F6/7GMY90xhD7K0MDZ4qpOeWXbLvzg==", "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "System.Threading.Tasks.Extensions": "4.5.4" + "Microsoft.Extensions.Configuration.Abstractions": "2.1.1" } }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { + "Microsoft.Extensions.Configuration.Abstractions": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "3iE7UF7MQkCv1cxzCahz+Y/guQbTqieyxyaWKhrRO91itI9cOKO76OHeQDahqG4MmW5umr3CcCvGmK92lWNlbg==", + "resolved": "2.1.1", + "contentHash": "VfuZJNa0WUshZ/+8BFZAhwFKiKuu/qOUCFntfdLpHj7vcRnsGHqd3G2Hse78DM+pgozczGM63lGPRLmy+uhUOA==", "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "System.Threading.Tasks.Extensions": "4.5.4" + "Microsoft.Extensions.Primitives": "2.1.1" } }, - "Microsoft.Extensions.Logging.Abstractions": { + "Microsoft.Extensions.Configuration.Binder": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "nroMDjS7hNBPtkZqVBbSiQaQjWRDxITI8Y7XnDs97rqG3EbzVTNLZQf7bIeUJcaHOV8bca47s1Uxq94+2oGdxA==", + "resolved": "2.1.1", + "contentHash": "fcLCTS03poWE4v9tSNBr3pWn0QwGgAn1vzqHXlXgvqZeOc7LvQNzaWcKRQZTdEc3+YhQKwMsOtm3VKSA2aWQ8w==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "System.Buffers": "4.5.1", - "System.Diagnostics.DiagnosticSource": "8.0.1", - "System.Memory": "4.5.5" + "Microsoft.Extensions.Configuration": "2.1.1" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "Transitive", + "resolved": "2.1.1", + "contentHash": "MgYpU5cwZohUMKKg3sbPhvGG+eAZ/59E9UwPwlrUkyXU+PGzqwZg9yyQNjhxuAWmoNoFReoemeCku50prYSGzA==" + }, + "Microsoft.Extensions.Logging": { + "type": "Transitive", + "resolved": "2.1.1", + "contentHash": "hh+mkOAQDTp6XH80xJt3+wwYVzkbwYQl9XZRCz4Um0JjP/o7N9vHM3rZ6wwwtr+BBe/L6iBO2sz0px6OWBzqZQ==", + "dependencies": { + "Microsoft.Extensions.Configuration.Binder": "2.1.1", + "Microsoft.Extensions.DependencyInjection.Abstractions": "2.1.1", + "Microsoft.Extensions.Logging.Abstractions": "2.1.1", + "Microsoft.Extensions.Options": "2.1.1" } }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "Transitive", + "resolved": "2.1.1", + "contentHash": "XRzK7ZF+O6FzdfWrlFTi1Rgj2080ZDsd46vzOjadHUB0Cz5kOvDG8vI7caa5YFrsHQpcfn0DxtjS4E46N4FZsA==" + }, "Microsoft.Extensions.Options": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "dWGKvhFybsaZpGmzkGCbNNwBD1rVlWzrZKANLW/CcbFJpCEceMCGzT7zZwHOGBCbwM0SzBuceMj5HN1LKV1QqA==", + "resolved": "2.1.1", + "contentHash": "V7lXCU78lAbzaulCGFKojcCyG8RTJicEbiBkPJjFqiqXwndEBBIehdXRMWEVU3UtzQ1yDvphiWUL9th6/4gJ7w==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0", - "System.ValueTuple": "4.5.0" + "Microsoft.Extensions.DependencyInjection.Abstractions": "2.1.1", + "Microsoft.Extensions.Primitives": "2.1.1" } }, "Microsoft.Extensions.Primitives": { "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g==", + "resolved": "2.1.1", + "contentHash": "scJ1GZNIxMmjpENh0UZ8XCQ6vzr/LzeF9WvEA51Ix2OQGAs9WPgPu8ABVUdvpKPLuor/t05gm6menJK3PwqOXg==", "dependencies": { - "System.Memory": "4.5.5", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" + "System.Memory": "4.5.1", + "System.Runtime.CompilerServices.Unsafe": "4.5.1" } }, "Microsoft.Win32.Registry": { @@ -759,6 +782,16 @@ "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, + "System.IO.Pipelines": { + "type": "Transitive", + "resolved": "9.0.0", + "contentHash": "eA3cinogwaNB4jdjQHOP3Z3EuyiDII7MT35jgtnsA4vkn0LUrrSHsU0nzHTzFzmaFYeKV7MYyMxOocFzsBHpTw==", + "dependencies": { + "System.Buffers": "4.5.1", + "System.Memory": "4.5.5", + "System.Threading.Tasks.Extensions": "4.5.4" + } + }, "System.Management": { "type": "Transitive", "resolved": "5.0.0", @@ -822,8 +855,8 @@ }, "System.Text.Encodings.Web": { "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", + "resolved": "9.0.0", + "contentHash": "e2hMgAErLbKyUUwt18qSBf9T5Y+SFAL3ZedM8fLupkVj8Rj2PZ9oxQ37XX2LF8fTO1wNIxvKpihD7Of7D/NxZw==", "dependencies": { "System.Buffers": "4.5.1", "System.Memory": "4.5.5", @@ -854,15 +887,15 @@ "Alexaka1.Serilog.Extensions.Formatting": { "type": "Project", "dependencies": { - "Serilog": "[4.0.2, )", - "System.Text.Json": "[8.0.5, )" + "Serilog": "[4.1.0, )", + "System.Text.Json": "[9.0.0, )" } }, "Serilog": { "type": "CentralTransitive", - "requested": "[4.0.2, )", - "resolved": "4.0.2", - "contentHash": "Vehq4uNYtURe/OnHEpWGvMgrvr5Vou7oZLdn3BuEH5FSCeHXDpNJtpzWoqywXsSvCTuiv0I65mZDRnJSeUvisA==", + "requested": "[4.1.0, )", + "resolved": "4.1.0", + "contentHash": "u1aZI8HZ62LWlq5dZLFwm6jMax/sUwnWZSw5lkPsCt518cJBxFKoNmc7oSxe5aA5BgSkzy9rzwFGR/i/acnSPw==", "dependencies": { "System.Diagnostics.DiagnosticSource": "8.0.1", "System.Threading.Channels": "8.0.0" @@ -870,9 +903,9 @@ }, "System.Collections.Immutable": { "type": "CentralTransitive", - "requested": "[8.0.0, )", - "resolved": "8.0.0", - "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w==", "dependencies": { "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" @@ -880,21 +913,22 @@ }, "System.Text.Json": { "type": "CentralTransitive", - "requested": "[8.0.5, )", - "resolved": "8.0.5", - "contentHash": "0f1B50Ss7rqxXiaBJyzUu9bWFOO2/zSlifZ/UNMdiIpDYe4cY4LQQicP4nirK1OS31I43rn062UIJ1Q9bpmHpg==", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "js7+qAu/9mQvnhA4EfGMZNEzXtJCDxgkgj8ohuxq/Qxv+R56G+ljefhiJHOxTNiw54q8vmABCWUwkMulNdlZ4A==", "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", + "Microsoft.Bcl.AsyncInterfaces": "9.0.0", "System.Buffers": "4.5.1", + "System.IO.Pipelines": "9.0.0", "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "8.0.0", + "System.Text.Encodings.Web": "9.0.0", "System.Threading.Tasks.Extensions": "4.5.4", "System.ValueTuple": "4.5.0" } } }, - ".NETFramework,Version=v4.8.1/win7-x86": { + ".NETFramework,Version=v4.8.1/win-x86": { "Gee.External.Capstone": { "type": "Transitive", "resolved": "2.3.0", @@ -960,16 +994,11 @@ "System.Management": "5.0.0" } }, - "Microsoft.Extensions.Logging": { + "PolySharp": { "type": "Direct", - "requested": "[8.0.1, )", - "resolved": "8.0.1", - "contentHash": "4x+pzsQEbqxhNf1QYRr5TDkLP9UsLT3A6MdRKDDEgrW7h1ljiEPgTNhKYUhNCCAaVpQECVQ+onA91PTPnIp6Lw==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2" - } + "requested": "[1.14.1, )", + "resolved": "1.14.1", + "contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ==" }, "Serilog.Enrichers.Environment": { "type": "Direct", @@ -1041,15 +1070,6 @@ "Serilog": "4.0.0" } }, - "System.Reflection.Metadata": { - "type": "Direct", - "requested": "[8.0.1, )", - "resolved": "8.0.1", - "contentHash": "+4sz5vGHPlo+5NpAxf2IlABnqVvOHOxv17b4dONv4hVwyNeFAeBevT14DIn7X3YWQ+eQFYO3YeTBNCleAblOKA==", - "dependencies": { - "System.Collections.Immutable": "8.0.0" - } - }, "BenchmarkDotNet.Annotations": { "type": "Transitive", "resolved": "0.14.0", @@ -1135,43 +1155,67 @@ "resolved": "3.1.6", "contentHash": "jek4XYaQ/PGUwDKKhwR8K47Uh1189PFzMeLqO83mXrXQVIpARZCcfuDedH50YDTepBkfijCZN5U/vZi++erxtg==" }, - "Microsoft.Extensions.DependencyInjection": { + "Microsoft.Extensions.Configuration": { "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "BmANAnR5Xd4Oqw7yQ75xOAYODybZQRzdeNucg7kS5wWKd2PNnMdYtJ2Vciy0QLylRmv42DGl5+AFL9izA6F1Rw==", + "resolved": "2.1.1", + "contentHash": "LjVKO6P2y52c5ZhTLX/w8zc5H4Y3J/LJsgqTBj49TtFq/hAtVNue/WA0F6/7GMY90xhD7K0MDZ4qpOeWXbLvzg==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2" + "Microsoft.Extensions.Configuration.Abstractions": "2.1.1" + } + }, + "Microsoft.Extensions.Configuration.Abstractions": { + "type": "Transitive", + "resolved": "2.1.1", + "contentHash": "VfuZJNa0WUshZ/+8BFZAhwFKiKuu/qOUCFntfdLpHj7vcRnsGHqd3G2Hse78DM+pgozczGM63lGPRLmy+uhUOA==", + "dependencies": { + "Microsoft.Extensions.Primitives": "2.1.1" + } + }, + "Microsoft.Extensions.Configuration.Binder": { + "type": "Transitive", + "resolved": "2.1.1", + "contentHash": "fcLCTS03poWE4v9tSNBr3pWn0QwGgAn1vzqHXlXgvqZeOc7LvQNzaWcKRQZTdEc3+YhQKwMsOtm3VKSA2aWQ8w==", + "dependencies": { + "Microsoft.Extensions.Configuration": "2.1.1" } }, "Microsoft.Extensions.DependencyInjection.Abstractions": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "3iE7UF7MQkCv1cxzCahz+Y/guQbTqieyxyaWKhrRO91itI9cOKO76OHeQDahqG4MmW5umr3CcCvGmK92lWNlbg==" + "resolved": "2.1.1", + "contentHash": "MgYpU5cwZohUMKKg3sbPhvGG+eAZ/59E9UwPwlrUkyXU+PGzqwZg9yyQNjhxuAWmoNoFReoemeCku50prYSGzA==" }, - "Microsoft.Extensions.Logging.Abstractions": { + "Microsoft.Extensions.Logging": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "nroMDjS7hNBPtkZqVBbSiQaQjWRDxITI8Y7XnDs97rqG3EbzVTNLZQf7bIeUJcaHOV8bca47s1Uxq94+2oGdxA==", + "resolved": "2.1.1", + "contentHash": "hh+mkOAQDTp6XH80xJt3+wwYVzkbwYQl9XZRCz4Um0JjP/o7N9vHM3rZ6wwwtr+BBe/L6iBO2sz0px6OWBzqZQ==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "System.Diagnostics.DiagnosticSource": "8.0.1" + "Microsoft.Extensions.Configuration.Binder": "2.1.1", + "Microsoft.Extensions.DependencyInjection.Abstractions": "2.1.1", + "Microsoft.Extensions.Logging.Abstractions": "2.1.1", + "Microsoft.Extensions.Options": "2.1.1" } }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "Transitive", + "resolved": "2.1.1", + "contentHash": "XRzK7ZF+O6FzdfWrlFTi1Rgj2080ZDsd46vzOjadHUB0Cz5kOvDG8vI7caa5YFrsHQpcfn0DxtjS4E46N4FZsA==" + }, "Microsoft.Extensions.Options": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "dWGKvhFybsaZpGmzkGCbNNwBD1rVlWzrZKANLW/CcbFJpCEceMCGzT7zZwHOGBCbwM0SzBuceMj5HN1LKV1QqA==", + "resolved": "2.1.1", + "contentHash": "V7lXCU78lAbzaulCGFKojcCyG8RTJicEbiBkPJjFqiqXwndEBBIehdXRMWEVU3UtzQ1yDvphiWUL9th6/4gJ7w==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" + "Microsoft.Extensions.DependencyInjection.Abstractions": "2.1.1", + "Microsoft.Extensions.Primitives": "2.1.1" } }, "Microsoft.Extensions.Primitives": { "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g==", + "resolved": "2.1.1", + "contentHash": "scJ1GZNIxMmjpENh0UZ8XCQ6vzr/LzeF9WvEA51Ix2OQGAs9WPgPu8ABVUdvpKPLuor/t05gm6menJK3PwqOXg==", "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" + "System.Memory": "4.5.1", + "System.Runtime.CompilerServices.Unsafe": "4.5.1" } }, "Microsoft.NETCore.Platforms": { @@ -1198,14 +1242,6 @@ "resolved": "5.0.0", "contentHash": "JPJArwA1kdj8qDAkY2XGjSWoYnqiM7q/3yRNkt6n28Mnn95MuEGkZXUbPBf7qc3IjwrGY5ttQon7yqHZyQJmOQ==" }, - "System.Diagnostics.DiagnosticSource": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "vaoWjvkG1aenR2XdjaVivlCV9fADfgyhW5bZtXT23qaEea0lWiUljdQuze4E31vKM7ZWJaSUsbYIKE3rnzfZUg==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, "System.Management": { "type": "Transitive", "resolved": "5.0.0", @@ -1218,8 +1254,8 @@ }, "System.Memory": { "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==" + "resolved": "4.5.5", + "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==" }, "System.Reflection.TypeExtensions": { "type": "Transitive", @@ -1262,26 +1298,37 @@ "Alexaka1.Serilog.Extensions.Formatting": { "type": "Project", "dependencies": { - "Serilog": "[4.0.2, )" + "Serilog": "[4.1.0, )" } }, "Serilog": { "type": "CentralTransitive", - "requested": "[4.0.2, )", - "resolved": "4.0.2", - "contentHash": "Vehq4uNYtURe/OnHEpWGvMgrvr5Vou7oZLdn3BuEH5FSCeHXDpNJtpzWoqywXsSvCTuiv0I65mZDRnJSeUvisA==" + "requested": "[4.1.0, )", + "resolved": "4.1.0", + "contentHash": "u1aZI8HZ62LWlq5dZLFwm6jMax/sUwnWZSw5lkPsCt518cJBxFKoNmc7oSxe5aA5BgSkzy9rzwFGR/i/acnSPw==" }, "System.Collections.Immutable": { "type": "CentralTransitive", - "requested": "[8.0.0, )", - "resolved": "8.0.0", - "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w==", "dependencies": { + "System.Memory": "4.5.5", "System.Runtime.CompilerServices.Unsafe": "6.0.0" } + }, + "System.Reflection.Metadata": { + "type": "CentralTransitive", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "ANiqLu3DxW9kol/hMmTWbt3414t9ftdIuiIU7j80okq2YzAueo120M442xk1kDJWtmZTqWQn7wHDvMRipVOEOQ==", + "dependencies": { + "System.Collections.Immutable": "9.0.0", + "System.Memory": "4.5.5" + } } }, - "net6.0/win7-x86": { + "net6.0/win-x86": { "Gee.External.Capstone": { "type": "Transitive", "resolved": "2.3.0", @@ -1349,16 +1396,11 @@ "System.Management": "5.0.0" } }, - "Microsoft.Extensions.Logging": { + "PolySharp": { "type": "Direct", - "requested": "[8.0.1, )", - "resolved": "8.0.1", - "contentHash": "4x+pzsQEbqxhNf1QYRr5TDkLP9UsLT3A6MdRKDDEgrW7h1ljiEPgTNhKYUhNCCAaVpQECVQ+onA91PTPnIp6Lw==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2" - } + "requested": "[1.14.1, )", + "resolved": "1.14.1", + "contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ==" }, "Serilog.Enrichers.Environment": { "type": "Direct", @@ -1430,11 +1472,402 @@ "Serilog": "4.0.0" } }, + "BenchmarkDotNet.Annotations": { + "type": "Transitive", + "resolved": "0.14.0", + "contentHash": "CUDCg6bgHrDzhjnA+IOBl5gAo8Y5hZ2YSs7MBXrYMlMKpBZqrD5ez0537uDveOkcf+YWAoK+S4sMcuWPbIz8bw==" + }, + "CommandLineParser": { + "type": "Transitive", + "resolved": "2.9.1", + "contentHash": "OE0sl1/sQ37bjVsPKKtwQlWDgqaxWgtme3xZz7JssWUzg5JpMIyHgCTY9MVMxOg48fJ1AgGT3tgdH5m/kQ5xhA==" + }, + "Gee.External.Capstone": { + "type": "Transitive", + "resolved": "2.3.0", + "contentHash": "2ap/rYmjtzCOT8hxrnEW/QeiOt+paD8iRrIcdKX0cxVwWLFa1e+JDBNeECakmccXrSFeBQuu5AV8SNkipFMMMw==" + }, + "Iced": { + "type": "Transitive", + "resolved": "1.17.0", + "contentHash": "8x+HCVTl/HHTGpscH3vMBhV8sknN/muZFw9s3TsI8SA6+c43cOTCi2+jE4KsU8pNLbJ++iF2ZFcpcXHXtDglnw==" + }, + "Microsoft.Bcl.AsyncInterfaces": { + "type": "Transitive", + "resolved": "1.1.0", + "contentHash": "1Am6l4Vpn3/K32daEqZI+FFr96OlZkgwK2LcT3pZ2zWubR5zTPW3/FkO1Rat9kb7oQOa4rxgl9LJHc5tspCWfg==" + }, + "Microsoft.CodeAnalysis.Analyzers": { + "type": "Transitive", + "resolved": "3.3.3", + "contentHash": "j/rOZtLMVJjrfLRlAMckJLPW/1rze9MT1yfWqSIbUPGRu1m1P0fuo9PmqapwsmePfGB5PJrudQLvmUOAMF0DqQ==" + }, + "Microsoft.CodeAnalysis.Common": { + "type": "Transitive", + "resolved": "4.1.0", + "contentHash": "bNzTyxP3iD5FPFHfVDl15Y6/wSoI7e3MeV0lOaj9igbIKTjgrmuw6LoVJ06jUNFA7+KaDC/OIsStWl/FQJz6sQ==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "3.3.3", + "System.Collections.Immutable": "5.0.0", + "System.Memory": "4.5.4", + "System.Reflection.Metadata": "5.0.0", + "System.Runtime.CompilerServices.Unsafe": "5.0.0", + "System.Text.Encoding.CodePages": "4.5.1", + "System.Threading.Tasks.Extensions": "4.5.4" + } + }, + "Microsoft.CodeAnalysis.CSharp": { + "type": "Transitive", + "resolved": "4.1.0", + "contentHash": "sbu6kDGzo9bfQxuqWpeEE7I9P30bSuZEnpDz9/qz20OU6pm79Z63+/BsAzO2e/R/Q97kBrpj647wokZnEVr97w==", + "dependencies": { + "Microsoft.CodeAnalysis.Common": "[4.1.0]" + } + }, + "Microsoft.Diagnostics.NETCore.Client": { + "type": "Transitive", + "resolved": "0.2.251802", + "contentHash": "bqnYl6AdSeboeN4v25hSukK6Odm6/54E3Y2B8rBvgqvAW0mF8fo7XNRVE2DMOG7Rk0fiuA079QIH28+V+W1Zdg==", + "dependencies": { + "Microsoft.Bcl.AsyncInterfaces": "1.1.0", + "Microsoft.Extensions.Logging": "2.1.1" + } + }, + "Microsoft.Diagnostics.Runtime": { + "type": "Transitive", + "resolved": "2.2.332302", + "contentHash": "Hp84ivxSKIMTBzYSATxmUsm3YSXHWivcwiRRbsydGmqujMUK8BAueLN0ssAVEOkOBmh0vjUBhrq7YcroT7VCug==", + "dependencies": { + "Microsoft.Diagnostics.NETCore.Client": "0.2.251802", + "System.Collections.Immutable": "5.0.0", + "System.Runtime.CompilerServices.Unsafe": "5.0.0" + } + }, + "Microsoft.Diagnostics.Tracing.TraceEvent": { + "type": "Transitive", + "resolved": "3.1.8", + "contentHash": "kl3UMrZKSeSEYZ8rt/GjLUQToREjgQABqfg6PzQBmSlYHTZOKE9ePEOS2xptROQ9SVvngg3QGX51TIT11iZ0wA==", + "dependencies": { + "Microsoft.Win32.Registry": "4.4.0", + "System.Runtime.CompilerServices.Unsafe": "5.0.0" + } + }, + "Microsoft.DotNet.PlatformAbstractions": { + "type": "Transitive", + "resolved": "3.1.6", + "contentHash": "jek4XYaQ/PGUwDKKhwR8K47Uh1189PFzMeLqO83mXrXQVIpARZCcfuDedH50YDTepBkfijCZN5U/vZi++erxtg==" + }, + "Microsoft.Extensions.Configuration": { + "type": "Transitive", + "resolved": "2.1.1", + "contentHash": "LjVKO6P2y52c5ZhTLX/w8zc5H4Y3J/LJsgqTBj49TtFq/hAtVNue/WA0F6/7GMY90xhD7K0MDZ4qpOeWXbLvzg==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "2.1.1" + } + }, + "Microsoft.Extensions.Configuration.Abstractions": { + "type": "Transitive", + "resolved": "2.1.1", + "contentHash": "VfuZJNa0WUshZ/+8BFZAhwFKiKuu/qOUCFntfdLpHj7vcRnsGHqd3G2Hse78DM+pgozczGM63lGPRLmy+uhUOA==", + "dependencies": { + "Microsoft.Extensions.Primitives": "2.1.1" + } + }, + "Microsoft.Extensions.Configuration.Binder": { + "type": "Transitive", + "resolved": "2.1.1", + "contentHash": "fcLCTS03poWE4v9tSNBr3pWn0QwGgAn1vzqHXlXgvqZeOc7LvQNzaWcKRQZTdEc3+YhQKwMsOtm3VKSA2aWQ8w==", + "dependencies": { + "Microsoft.Extensions.Configuration": "2.1.1" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "Transitive", + "resolved": "2.1.1", + "contentHash": "MgYpU5cwZohUMKKg3sbPhvGG+eAZ/59E9UwPwlrUkyXU+PGzqwZg9yyQNjhxuAWmoNoFReoemeCku50prYSGzA==" + }, + "Microsoft.Extensions.Logging": { + "type": "Transitive", + "resolved": "2.1.1", + "contentHash": "hh+mkOAQDTp6XH80xJt3+wwYVzkbwYQl9XZRCz4Um0JjP/o7N9vHM3rZ6wwwtr+BBe/L6iBO2sz0px6OWBzqZQ==", + "dependencies": { + "Microsoft.Extensions.Configuration.Binder": "2.1.1", + "Microsoft.Extensions.DependencyInjection.Abstractions": "2.1.1", + "Microsoft.Extensions.Logging.Abstractions": "2.1.1", + "Microsoft.Extensions.Options": "2.1.1" + } + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "Transitive", + "resolved": "2.1.1", + "contentHash": "XRzK7ZF+O6FzdfWrlFTi1Rgj2080ZDsd46vzOjadHUB0Cz5kOvDG8vI7caa5YFrsHQpcfn0DxtjS4E46N4FZsA==" + }, + "Microsoft.Extensions.Options": { + "type": "Transitive", + "resolved": "2.1.1", + "contentHash": "V7lXCU78lAbzaulCGFKojcCyG8RTJicEbiBkPJjFqiqXwndEBBIehdXRMWEVU3UtzQ1yDvphiWUL9th6/4gJ7w==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "2.1.1", + "Microsoft.Extensions.Primitives": "2.1.1" + } + }, + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "2.1.1", + "contentHash": "scJ1GZNIxMmjpENh0UZ8XCQ6vzr/LzeF9WvEA51Ix2OQGAs9WPgPu8ABVUdvpKPLuor/t05gm6menJK3PwqOXg==", + "dependencies": { + "System.Memory": "4.5.1", + "System.Runtime.CompilerServices.Unsafe": "4.5.1" + } + }, + "Microsoft.NETCore.Platforms": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "VyPlqzH2wavqquTcYpkIIAQ6WdenuKoFN0BdYBbCWsclXacSOHNQn66Gt4z5NBqEYW0FAPm5rlvki9ZiCij5xQ==" + }, + "Microsoft.Win32.Registry": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==", + "dependencies": { + "System.Security.AccessControl": "5.0.0", + "System.Security.Principal.Windows": "5.0.0" + } + }, + "Perfolizer": { + "type": "Transitive", + "resolved": "0.3.17", + "contentHash": "FQgtCoF2HFwvzKWulAwBS5BGLlh8pgbrJtOp47jyBwh2CW16juVtacN1azOA2BqdrJXkXTNLNRMo7ZlHHiuAnA==" + }, + "System.CodeDom": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "JPJArwA1kdj8qDAkY2XGjSWoYnqiM7q/3yRNkt6n28Mnn95MuEGkZXUbPBf7qc3IjwrGY5ttQon7yqHZyQJmOQ==" + }, + "System.Management": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "MF1CHaRcC+MLFdnDthv4/bKWBZnlnSpkGqa87pKukQefgEdwtb9zFW6zs0GjPp73qtpYYg4q6PEKbzJbxCpKfw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "5.0.0", + "Microsoft.Win32.Registry": "5.0.0", + "System.CodeDom": "5.0.0" + } + }, + "System.Memory": { + "type": "Transitive", + "resolved": "4.5.4", + "contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==" + }, + "System.Reflection.TypeExtensions": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "VybpaOQQhqE6siHppMktjfGBw1GCwvCqiufqmP8F1nj7fTUNtW35LOEt3UZTEsECfo+ELAl/9o9nJx3U91i7vA==" + }, + "System.Runtime.CompilerServices.Unsafe": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "ZD9TMpsmYJLrxbbmdvhwt9YEgG5WntEnZ/d1eH8JBX9LBp+Ju8BSBhUGbZMNVHHomWo2KVImJhTDl2hIgw/6MA==" + }, + "System.Security.AccessControl": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "5.0.0", + "System.Security.Principal.Windows": "5.0.0" + } + }, + "System.Security.Principal.Windows": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA==" + }, + "System.Text.Encoding.CodePages": { + "type": "Transitive", + "resolved": "4.5.1", + "contentHash": "4J2JQXbftjPMppIHJ7IC+VXQ9XfEagN92vZZNoG12i+zReYlim5dMoXFC1Zzg7tsnKDM7JPo5bYfFK4Jheq44w==", + "dependencies": { + "Microsoft.NETCore.Platforms": "2.1.2", + "System.Runtime.CompilerServices.Unsafe": "4.5.2" + } + }, + "System.Threading.Tasks.Extensions": { + "type": "Transitive", + "resolved": "4.5.4", + "contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==" + }, + "Alexaka1.Serilog.Extensions.Formatting": { + "type": "Project", + "dependencies": { + "Serilog": "[4.1.0, )" + } + }, + "Serilog": { + "type": "CentralTransitive", + "requested": "[4.1.0, )", + "resolved": "4.1.0", + "contentHash": "u1aZI8HZ62LWlq5dZLFwm6jMax/sUwnWZSw5lkPsCt518cJBxFKoNmc7oSxe5aA5BgSkzy9rzwFGR/i/acnSPw==" + }, + "System.Collections.Immutable": { + "type": "CentralTransitive", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w==" + }, "System.Reflection.Metadata": { + "type": "CentralTransitive", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "ANiqLu3DxW9kol/hMmTWbt3414t9ftdIuiIU7j80okq2YzAueo120M442xk1kDJWtmZTqWQn7wHDvMRipVOEOQ==", + "dependencies": { + "System.Collections.Immutable": "9.0.0" + } + } + }, + "net8.0/win-x86": { + "Gee.External.Capstone": { + "type": "Transitive", + "resolved": "2.3.0", + "contentHash": "2ap/rYmjtzCOT8hxrnEW/QeiOt+paD8iRrIcdKX0cxVwWLFa1e+JDBNeECakmccXrSFeBQuu5AV8SNkipFMMMw==" + }, + "Microsoft.Win32.Registry": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==", + "dependencies": { + "System.Security.AccessControl": "5.0.0", + "System.Security.Principal.Windows": "5.0.0" + } + }, + "System.Management": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "MF1CHaRcC+MLFdnDthv4/bKWBZnlnSpkGqa87pKukQefgEdwtb9zFW6zs0GjPp73qtpYYg4q6PEKbzJbxCpKfw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "5.0.0", + "Microsoft.Win32.Registry": "5.0.0", + "System.CodeDom": "5.0.0" + } + }, + "System.Security.AccessControl": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "5.0.0", + "System.Security.Principal.Windows": "5.0.0" + } + }, + "System.Security.Principal.Windows": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA==" + }, + "System.Text.Encoding.CodePages": { + "type": "Transitive", + "resolved": "4.5.1", + "contentHash": "4J2JQXbftjPMppIHJ7IC+VXQ9XfEagN92vZZNoG12i+zReYlim5dMoXFC1Zzg7tsnKDM7JPo5bYfFK4Jheq44w==", + "dependencies": { + "Microsoft.NETCore.Platforms": "2.1.2", + "System.Runtime.CompilerServices.Unsafe": "4.5.2" + } + } + }, + "net9.0": { + "BenchmarkDotNet": { "type": "Direct", - "requested": "[8.0.1, )", - "resolved": "8.0.1", - "contentHash": "+4sz5vGHPlo+5NpAxf2IlABnqVvOHOxv17b4dONv4hVwyNeFAeBevT14DIn7X3YWQ+eQFYO3YeTBNCleAblOKA==" + "requested": "[0.14.0, )", + "resolved": "0.14.0", + "contentHash": "eIPSDKi3oni734M1rt/XJAwGQQOIf9gLjRRKKJ0HuVy3vYd7gnmAIX1bTjzI9ZbAY/nPddgqqgM/TeBYitMCIg==", + "dependencies": { + "BenchmarkDotNet.Annotations": "0.14.0", + "CommandLineParser": "2.9.1", + "Gee.External.Capstone": "2.3.0", + "Iced": "1.17.0", + "Microsoft.CodeAnalysis.CSharp": "4.1.0", + "Microsoft.Diagnostics.Runtime": "2.2.332302", + "Microsoft.Diagnostics.Tracing.TraceEvent": "3.1.8", + "Microsoft.DotNet.PlatformAbstractions": "3.1.6", + "Perfolizer": "[0.3.17]", + "System.Management": "5.0.0" + } + }, + "PolySharp": { + "type": "Direct", + "requested": "[1.14.1, )", + "resolved": "1.14.1", + "contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ==" + }, + "Serilog.Enrichers.Environment": { + "type": "Direct", + "requested": "[3.0.1, )", + "resolved": "3.0.1", + "contentHash": "9BqCE4C9FF+/rJb/CsQwe7oVf44xqkOvMwX//CUxvUR25lFL4tSS6iuxE5eW07quby1BAyAEP+vM6TWsnT3iqw==", + "dependencies": { + "Serilog": "4.0.0" + } + }, + "Serilog.Enrichers.Memory": { + "type": "Direct", + "requested": "[1.0.4, )", + "resolved": "1.0.4", + "contentHash": "yq9QtHw41EnYbFVwLV/0wmi+GEfJFyD/HDA49/Y6GvbYNLh83MSo8VlAO3C9C8VC+w93zOSma8QxJApqOjdHng==", + "dependencies": { + "Serilog": "2.0.0" + } + }, + "Serilog.Enrichers.Process": { + "type": "Direct", + "requested": "[3.0.0, )", + "resolved": "3.0.0", + "contentHash": "/wPYz2PDCJGSHNI+Z0PAacZvrgZgrGduWqLXeC2wvW6pgGM/Bi45JrKy887MRcRPHIZVU0LAlkmJ7TkByC0boQ==", + "dependencies": { + "Serilog": "4.0.0" + } + }, + "Serilog.Enrichers.Sensitive": { + "type": "Direct", + "requested": "[1.7.3, )", + "resolved": "1.7.3", + "contentHash": "U/38ICup0xDMDL8TjprLDCWI16MkQTPEJfWgPROFxtGjsBf+SW1W2fMfEhdiAYLGCTSFWNXmVGdVjU58Gyr0eQ==" + }, + "Serilog.Enrichers.Thread": { + "type": "Direct", + "requested": "[4.0.0, )", + "resolved": "4.0.0", + "contentHash": "C7BK25a1rhUyr+Tp+1BYcVlBJq7M2VCHlIgnwoIUVJcicM9jYcvQK18+OeHiXw7uLPSjqWxJIp1EfaZ/RGmEwA==", + "dependencies": { + "Serilog": "4.0.0" + } + }, + "Serilog.Exceptions": { + "type": "Direct", + "requested": "[8.4.0, )", + "resolved": "8.4.0", + "contentHash": "nc/+hUw3lsdo0zCj0KMIybAu7perMx79vu72w0za9Nsi6mWyNkGXxYxakAjWB7nEmYL6zdmhEQRB4oJ2ALUeug==", + "dependencies": { + "Serilog": "2.8.0", + "System.Reflection.TypeExtensions": "4.7.0" + } + }, + "Serilog.Expressions": { + "type": "Direct", + "requested": "[5.0.0, )", + "resolved": "5.0.0", + "contentHash": "QhZjXtUcA2QfQRA60m+DfyIfidKsQV7HBstbYEDqzJKMbJH/KnKthkkjciRuYrmFE+scWv1JibC5LlXrdtOUmw==", + "dependencies": { + "Serilog": "4.0.0" + } + }, + "Serilog.Sinks.Console": { + "type": "Direct", + "requested": "[6.0.0, )", + "resolved": "6.0.0", + "contentHash": "fQGWqVMClCP2yEyTXPIinSr5c+CBGUvBybPxjAGcf7ctDhadFhrQw03Mv8rJ07/wR5PDfFjewf2LimvXCDzpbA==", + "dependencies": { + "Serilog": "4.0.0" + } }, "BenchmarkDotNet.Annotations": { "type": "Transitive", @@ -1521,40 +1954,68 @@ "resolved": "3.1.6", "contentHash": "jek4XYaQ/PGUwDKKhwR8K47Uh1189PFzMeLqO83mXrXQVIpARZCcfuDedH50YDTepBkfijCZN5U/vZi++erxtg==" }, - "Microsoft.Extensions.DependencyInjection": { + "Microsoft.Extensions.Configuration": { "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "BmANAnR5Xd4Oqw7yQ75xOAYODybZQRzdeNucg7kS5wWKd2PNnMdYtJ2Vciy0QLylRmv42DGl5+AFL9izA6F1Rw==", + "resolved": "2.1.1", + "contentHash": "LjVKO6P2y52c5ZhTLX/w8zc5H4Y3J/LJsgqTBj49TtFq/hAtVNue/WA0F6/7GMY90xhD7K0MDZ4qpOeWXbLvzg==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "2.1.1" + } + }, + "Microsoft.Extensions.Configuration.Abstractions": { + "type": "Transitive", + "resolved": "2.1.1", + "contentHash": "VfuZJNa0WUshZ/+8BFZAhwFKiKuu/qOUCFntfdLpHj7vcRnsGHqd3G2Hse78DM+pgozczGM63lGPRLmy+uhUOA==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2" + "Microsoft.Extensions.Primitives": "2.1.1" + } + }, + "Microsoft.Extensions.Configuration.Binder": { + "type": "Transitive", + "resolved": "2.1.1", + "contentHash": "fcLCTS03poWE4v9tSNBr3pWn0QwGgAn1vzqHXlXgvqZeOc7LvQNzaWcKRQZTdEc3+YhQKwMsOtm3VKSA2aWQ8w==", + "dependencies": { + "Microsoft.Extensions.Configuration": "2.1.1" } }, "Microsoft.Extensions.DependencyInjection.Abstractions": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "3iE7UF7MQkCv1cxzCahz+Y/guQbTqieyxyaWKhrRO91itI9cOKO76OHeQDahqG4MmW5umr3CcCvGmK92lWNlbg==" + "resolved": "2.1.1", + "contentHash": "MgYpU5cwZohUMKKg3sbPhvGG+eAZ/59E9UwPwlrUkyXU+PGzqwZg9yyQNjhxuAWmoNoFReoemeCku50prYSGzA==" }, - "Microsoft.Extensions.Logging.Abstractions": { + "Microsoft.Extensions.Logging": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "nroMDjS7hNBPtkZqVBbSiQaQjWRDxITI8Y7XnDs97rqG3EbzVTNLZQf7bIeUJcaHOV8bca47s1Uxq94+2oGdxA==", + "resolved": "2.1.1", + "contentHash": "hh+mkOAQDTp6XH80xJt3+wwYVzkbwYQl9XZRCz4Um0JjP/o7N9vHM3rZ6wwwtr+BBe/L6iBO2sz0px6OWBzqZQ==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2" + "Microsoft.Extensions.Configuration.Binder": "2.1.1", + "Microsoft.Extensions.DependencyInjection.Abstractions": "2.1.1", + "Microsoft.Extensions.Logging.Abstractions": "2.1.1", + "Microsoft.Extensions.Options": "2.1.1" } }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "Transitive", + "resolved": "2.1.1", + "contentHash": "XRzK7ZF+O6FzdfWrlFTi1Rgj2080ZDsd46vzOjadHUB0Cz5kOvDG8vI7caa5YFrsHQpcfn0DxtjS4E46N4FZsA==" + }, "Microsoft.Extensions.Options": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "dWGKvhFybsaZpGmzkGCbNNwBD1rVlWzrZKANLW/CcbFJpCEceMCGzT7zZwHOGBCbwM0SzBuceMj5HN1LKV1QqA==", + "resolved": "2.1.1", + "contentHash": "V7lXCU78lAbzaulCGFKojcCyG8RTJicEbiBkPJjFqiqXwndEBBIehdXRMWEVU3UtzQ1yDvphiWUL9th6/4gJ7w==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" + "Microsoft.Extensions.DependencyInjection.Abstractions": "2.1.1", + "Microsoft.Extensions.Primitives": "2.1.1" } }, "Microsoft.Extensions.Primitives": { "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g==" + "resolved": "2.1.1", + "contentHash": "scJ1GZNIxMmjpENh0UZ8XCQ6vzr/LzeF9WvEA51Ix2OQGAs9WPgPu8ABVUdvpKPLuor/t05gm6menJK3PwqOXg==", + "dependencies": { + "System.Memory": "4.5.1", + "System.Runtime.CompilerServices.Unsafe": "4.5.1" + } }, "Microsoft.NETCore.Platforms": { "type": "Transitive", @@ -1636,23 +2097,29 @@ "Alexaka1.Serilog.Extensions.Formatting": { "type": "Project", "dependencies": { - "Serilog": "[4.0.2, )" + "Serilog": "[4.1.0, )" } }, "Serilog": { "type": "CentralTransitive", - "requested": "[4.0.2, )", - "resolved": "4.0.2", - "contentHash": "Vehq4uNYtURe/OnHEpWGvMgrvr5Vou7oZLdn3BuEH5FSCeHXDpNJtpzWoqywXsSvCTuiv0I65mZDRnJSeUvisA==" + "requested": "[4.1.0, )", + "resolved": "4.1.0", + "contentHash": "u1aZI8HZ62LWlq5dZLFwm6jMax/sUwnWZSw5lkPsCt518cJBxFKoNmc7oSxe5aA5BgSkzy9rzwFGR/i/acnSPw==" }, "System.Collections.Immutable": { "type": "CentralTransitive", - "requested": "[8.0.0, )", - "resolved": "8.0.0", - "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==" + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w==" + }, + "System.Reflection.Metadata": { + "type": "CentralTransitive", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "ANiqLu3DxW9kol/hMmTWbt3414t9ftdIuiIU7j80okq2YzAueo120M442xk1kDJWtmZTqWQn7wHDvMRipVOEOQ==" } }, - "net8.0/win7-x86": { + "net9.0/win-x86": { "Gee.External.Capstone": { "type": "Transitive", "resolved": "2.3.0", diff --git a/test/Serilog.Extensions.Formatting.Test/DelegatingSink.cs b/test/Serilog.Extensions.Formatting.Test/DelegatingSink.cs index 41e5f94..8c5c1be 100644 --- a/test/Serilog.Extensions.Formatting.Test/DelegatingSink.cs +++ b/test/Serilog.Extensions.Formatting.Test/DelegatingSink.cs @@ -3,40 +3,39 @@ using Serilog.Events; using Xunit; -namespace Serilog.Extensions.Formatting.Test +namespace Serilog.Extensions.Formatting.Test; + +public class DelegatingSink : ILogEventSink { - public class DelegatingSink : ILogEventSink + private readonly Action _write; + + public DelegatingSink(Action write) { - private readonly Action _write; + _write = write ?? throw new ArgumentNullException(nameof(write)); + } - public DelegatingSink(Action write) - { - _write = write ?? throw new ArgumentNullException(nameof(write)); - } + public void Emit(LogEvent logEvent) + { + _write(logEvent); + } - public void Emit(LogEvent logEvent) - { - _write(logEvent); - } + public static LogEvent GetLogEvent(Action writeAction, + Func configure = null) + { + LogEvent result = null; + var configuration = new LoggerConfiguration() + .MinimumLevel.Verbose() + .WriteTo.Sink(new DelegatingSink(le => result = le)); - public static LogEvent GetLogEvent(Action writeAction, - Func configure = null) + if (configure != null) { - LogEvent result = null; - var configuration = new LoggerConfiguration() - .MinimumLevel.Verbose() - .WriteTo.Sink(new DelegatingSink(le => result = le)); - - if (configure != null) - { - configuration = configure(configuration); - } + configuration = configure(configuration); + } - var l = configuration.CreateLogger(); + var l = configuration.CreateLogger(); - writeAction(l); - Assert.NotNull(result); - return result; - } + writeAction(l); + Assert.NotNull(result); + return result; } } diff --git a/test/Serilog.Extensions.Formatting.Test/Helpers.cs b/test/Serilog.Extensions.Formatting.Test/Helpers.cs index 2b5868a..8c4fc59 100644 --- a/test/Serilog.Extensions.Formatting.Test/Helpers.cs +++ b/test/Serilog.Extensions.Formatting.Test/Helpers.cs @@ -4,27 +4,26 @@ using Xunit; using Xunit.Abstractions; -namespace Serilog.Extensions.Formatting.Test +namespace Serilog.Extensions.Formatting.Test; + +public static class Helpers { - public static class Helpers + public static void AssertValidJson(string actual, ITestOutputHelper output = null) { - public static void AssertValidJson(string actual, ITestOutputHelper output = null) + var reader = new Utf8JsonReader(Encoding.UTF8.GetBytes(actual).AsSpan()); + bool valid = false; + try { - var reader = new Utf8JsonReader(Encoding.UTF8.GetBytes(actual).AsSpan()); - bool valid = false; - try - { - valid = JsonDocument.TryParseValue(ref reader, out _); - } - finally + valid = JsonDocument.TryParseValue(ref reader, out _); + } + finally + { + if (!valid) { - if (!valid) - { - output?.WriteLine(actual); - } + output?.WriteLine(actual); } - - Assert.True(valid); } + + Assert.True(valid); } } diff --git a/test/Serilog.Extensions.Formatting.Test/HostTests.cs b/test/Serilog.Extensions.Formatting.Test/HostTests.cs index ef2a315..383769e 100644 --- a/test/Serilog.Extensions.Formatting.Test/HostTests.cs +++ b/test/Serilog.Extensions.Formatting.Test/HostTests.cs @@ -11,153 +11,147 @@ using Xunit; using Xunit.Abstractions; -namespace Serilog.Extensions.Formatting.Test +namespace Serilog.Extensions.Formatting.Test; + +public sealed class HostTests : IDisposable { - public sealed class HostTests : IDisposable - { - private readonly ITestOutputHelper _output; + private readonly ITestOutputHelper _output; - public HostTests(ITestOutputHelper output) - { - _output = output; - SelfLog.Enable(_output.WriteLine); - } + public HostTests(ITestOutputHelper output) + { + _output = output; + SelfLog.Enable(_output.WriteLine); + } - public void Dispose() - { - SelfLog.Disable(); - } + public void Dispose() + { + SelfLog.Disable(); + } - [Theory] - [MemberData(nameof(MemberData))] - public async Task HostedServiceCanWriteOnManyThreads(HostParams data) - { - var now = DateTimeOffset.Parse("2023-01-01T12:34:56.7891111+01:00"); - data.Services.GetRequiredService>() - .LogInformation("Hello World, {CurrentTime:hh:mm:ss t z}", now); - var service = data.Services; - // string expected = ; + [Theory] + [MemberData(nameof(MemberData))] + public async Task HostedServiceCanWriteOnManyThreads(HostParams data) + { + var now = DateTimeOffset.Parse("2023-01-01T12:34:56.7891111+01:00"); + data.Services.GetRequiredService>() + .LogInformation("Hello World, {CurrentTime:hh:mm:ss t z}", now); + var service = data.Services; + // string expected = ; - var startSignal = new ManualResetEvent(false); + var startSignal = new ManualResetEvent(false); - var tasks = new Task[data.Threads]; - for (int i = 0; i < data.Threads; i++) + var tasks = new Task[data.Threads]; + for (int i = 0; i < data.Threads; i++) + { + int taskIndex = i; + tasks[taskIndex] = Task.Run(() => { - int taskIndex = i; - tasks[taskIndex] = Task.Run(() => - { - // Wait until the signal is given to start - startSignal.WaitOne(); - var logger = service.GetRequiredService>(); + // Wait until the signal is given to start + startSignal.WaitOne(); + var logger = service.GetRequiredService>(); - for (int j = 0; j < data.Iterations; j++) - { - logger.LogInformation("Hello World, {CurrentTime:hh:mm:ss t z}", now); - } + for (int j = 0; j < data.Iterations; j++) + { + logger.LogInformation("Hello World, {CurrentTime:hh:mm:ss t z}", now); + } - // results[taskIndex] = writer.ToString(); - }); - } + // results[taskIndex] = writer.ToString(); + }); + } - // Start all tasks at once - startSignal.Set(); - - // Wait for all tasks to complete - await Task.WhenAll(tasks); - Assert.True(true); - // await Task.Delay(TimeSpan.FromSeconds(5)); - Log.CloseAndFlush(); - await data.Services.DisposeAsync(); - using (var fileStream = new FileStream(data.FilePath, FileMode.Open, FileAccess.Read, FileShare.None, 4096, - FileOptions.SequentialScan)) - using (var stringReader = new StreamReader(fileStream)) + // Start all tasks at once + startSignal.Set(); + + // Wait for all tasks to complete + await Task.WhenAll(tasks); + Assert.True(true); + // await Task.Delay(TimeSpan.FromSeconds(5)); + Log.CloseAndFlush(); + await data.Services.DisposeAsync(); + using (var fileStream = new FileStream(data.FilePath, FileMode.Open, FileAccess.Read, FileShare.None, + 4096, + FileOptions.SequentialScan)) + { + using var stringReader = new StreamReader(fileStream); + // read line by line + int i = 0; + while (await stringReader.ReadLineAsync() is { } actual) { - // read line by line - string actual; - int i = 0; - while ((actual = await stringReader.ReadLineAsync()) != null) + i++; + if (string.IsNullOrWhiteSpace(actual)) { - i++; - if (string.IsNullOrWhiteSpace(actual)) - { - _output.WriteLine("Empty line at {0}", i); - continue; - } - - Helpers.AssertValidJson(actual, _output); - // Assert.Equal(expected, actual); + _output.WriteLine("Empty line at {0}", i); + continue; } - Assert.Equal(data.Iterations * data.Threads + 1, i); + Helpers.AssertValidJson(actual, _output); + // Assert.Equal(expected, actual); } - File.Delete(data.FilePath); + Assert.Equal(data.Iterations * data.Threads + 1, i); } - public static TheoryData MemberData() + File.Delete(data.FilePath); + } + + public static TheoryData MemberData() + { + int[] threads = [1, 10, 100 /*, 500*/]; + int[] iterations = [1, 100, 1000 /*, 10000*/]; + ITextFormatter[] formatter = [new Utf8JsonFormatter("\n", true), new JsonFormatter("\n", true)]; + var data = new List(); + foreach (int thread in threads) { - int[] threads = { 1, 10, 100 /*, 500*/ }; - int[] iterations = { 1, 100, 1000 /*, 10000*/ }; - ITextFormatter[] formatter = { new Utf8JsonFormatter("\n", true), new JsonFormatter("\n", true) }; - var data = new List(); - foreach (int thread in threads) + foreach (int iteration in iterations) { - foreach (int iteration in iterations) + foreach (var textFormatter in formatter) { - foreach (var textFormatter in formatter) + var services = new ServiceCollection(); + string fileName = Path.GetTempFileName(); + services.AddLogging().AddSerilog(configuration => { - var services = new ServiceCollection(); - string fileName = Path.GetTempFileName(); - services.AddLogging().AddSerilog(configuration => - { - configuration.MinimumLevel.Verbose() - .WriteTo.Console(new Utf8JsonFormatter("\n", true)) - .WriteTo.Async(a => a.Console(new Utf8JsonFormatter("\n", true))) - .Enrich.WithProperty("Hello", - new - { - now = DateTimeOffset.UtcNow, Exception = new InvalidOperationException(), - Url = new Uri("https://github.com/alexaka1/serilog-extensions"), - }) - // don't drop logs - .WriteTo.Async(a => a.File(textFormatter, fileName, buffered: false), - blockWhenFull: true) - ; - }); - data.Add(new HostParams(services.BuildServiceProvider(), iteration, thread, fileName, - textFormatter)); - } + configuration.MinimumLevel.Verbose() + .WriteTo.Console(new Utf8JsonFormatter("\n", true)) + .WriteTo.Async(a => a.Console(new Utf8JsonFormatter("\n", true))) + .Enrich.WithProperty("Hello", + new + { + now = DateTimeOffset.UtcNow, Exception = new InvalidOperationException(), + Url = new Uri("https://github.com/alexaka1/serilog-extensions"), + }) + // don't drop logs + .WriteTo.Async(a => a.File(textFormatter, fileName, buffered: false), + blockWhenFull: true) + ; + }); + data.Add(new HostParams(services.BuildServiceProvider(), iteration, thread, fileName, + textFormatter)); } } - - return new TheoryData(data); } - [Serializable] - public class HostParams - { - [NonSerialized] - private readonly ITextFormatter _textFormatter; + return new TheoryData(data); + } - [NonSerialized] - public readonly ServiceProvider Services; + [Serializable] + public class HostParams( + ServiceProvider services, + int iterations, + int threads, + string filePath, + ITextFormatter textFormatter) + { + [NonSerialized] + private readonly ITextFormatter _textFormatter = textFormatter; - public int Threads { get; set; } + [NonSerialized] + public readonly ServiceProvider Services = services; - public int Iterations { get; set; } + public int Threads { get; set; } = threads; - public string FilePath { get; set; } - public string Name => _textFormatter.GetType().Name; + public int Iterations { get; set; } = iterations; - public HostParams(ServiceProvider services, int iterations, int threads, string filePath, - ITextFormatter textFormatter) - { - _textFormatter = textFormatter; - Services = services; - Iterations = iterations; - Threads = threads; - FilePath = filePath; - } - } + public string FilePath { get; set; } = filePath; + public string Name => _textFormatter.GetType().Name; } } diff --git a/test/Serilog.Extensions.Formatting.Test/NullSink.cs b/test/Serilog.Extensions.Formatting.Test/NullSink.cs index 467a79f..9a76668 100644 --- a/test/Serilog.Extensions.Formatting.Test/NullSink.cs +++ b/test/Serilog.Extensions.Formatting.Test/NullSink.cs @@ -3,22 +3,21 @@ using Serilog.Events; using Serilog.Formatting; -namespace Serilog.Extensions.Formatting.Test +namespace Serilog.Extensions.Formatting.Test; + +public class NullSink : ILogEventSink { - public class NullSink : ILogEventSink - { - private readonly ITextFormatter _formatter; - private readonly TextWriter _textWriter; + private readonly ITextFormatter _formatter; + private readonly TextWriter _textWriter; - public NullSink(ITextFormatter formatter, TextWriter textWriter) - { - _formatter = formatter; - _textWriter = textWriter; - } + public NullSink(ITextFormatter formatter, TextWriter textWriter) + { + _formatter = formatter; + _textWriter = textWriter; + } - public void Emit(LogEvent logEvent) - { - _formatter.Format(logEvent, _textWriter); - } + public void Emit(LogEvent logEvent) + { + _formatter.Format(logEvent, _textWriter); } } diff --git a/test/Serilog.Extensions.Formatting.Test/Serilog.Extensions.Formatting.Test.csproj b/test/Serilog.Extensions.Formatting.Test/Serilog.Extensions.Formatting.Test.csproj index 5b6c268..479d097 100644 --- a/test/Serilog.Extensions.Formatting.Test/Serilog.Extensions.Formatting.Test.csproj +++ b/test/Serilog.Extensions.Formatting.Test/Serilog.Extensions.Formatting.Test.csproj @@ -1,7 +1,7 @@ - net8.0;net6.0;net481;net472 + net9.0;net8.0;net6.0;net481;net472 false true false @@ -17,17 +17,17 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - - - all diff --git a/test/Serilog.Extensions.Formatting.Test/SerilogJsonFormatterTests.cs b/test/Serilog.Extensions.Formatting.Test/SerilogJsonFormatterTests.cs index f17c733..dfbb530 100644 --- a/test/Serilog.Extensions.Formatting.Test/SerilogJsonFormatterTests.cs +++ b/test/Serilog.Extensions.Formatting.Test/SerilogJsonFormatterTests.cs @@ -1,12 +1,14 @@ +#if FEATURE_ISPANFORMATTABLE +using System.Globalization; +using System.Net; +#endif using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; -using System.Globalization; using System.IO; using System.Linq; -using System.Net; using System.Text.Json.Nodes; using Serilog.Events; using Serilog.Parsing; @@ -14,654 +16,650 @@ using Xunit.Abstractions; using static Serilog.Events.LogEventLevel; -namespace Serilog.Extensions.Formatting.Test +namespace Serilog.Extensions.Formatting.Test; + +public class SerilogJsonFormatterTests(ITestOutputHelper output) { - public class SerilogJsonFormatterTests + private string FormatToJson(LogEvent @event) { - public SerilogJsonFormatterTests(ITestOutputHelper output) - { - _output = output; - } - - private readonly ITestOutputHelper _output; - - private string FormatToJson(LogEvent @event) - { - var formatter = new Utf8JsonFormatter(); - var stringWriter = new StringWriter(); - formatter.Format(@event, stringWriter); - string result = stringWriter.ToString(); - Helpers.AssertValidJson(result, _output); - return result; - } + var formatter = new Utf8JsonFormatter(); + var stringWriter = new StringWriter(); + formatter.Format(@event, stringWriter); + string result = stringWriter.ToString(); + Helpers.AssertValidJson(result, output); + return result; + } - private JsonObject FormatJson(LogEvent @event) - { - string json = FormatToJson(@event); + private JsonObject FormatJson(LogEvent @event) + { + string json = FormatToJson(@event); #if DEBUG - _output.WriteLine(json); + output.WriteLine(json); #endif - return JsonNode.Parse(json)?.AsObject() ?? new JsonObject(); - } + return JsonNode.Parse(json)?.AsObject() ?? new JsonObject(); + } - private class MyDictionary : Dictionary - { - } + private class MyDictionary : Dictionary + { + } - private static JsonObject FormatEvent(LogEvent e) - { - var j = new Utf8JsonFormatter(); + private static JsonObject FormatEvent(LogEvent e) + { + var j = new Utf8JsonFormatter(); - var f = new StringWriter(); - j.Format(e, f); - return JsonNode.Parse(f.ToString())?.AsObject() ?? new JsonObject(); - } + var f = new StringWriter(); + j.Format(e, f); + return JsonNode.Parse(f.ToString())?.AsObject() ?? new JsonObject(); + } - [Fact] - public void ABooleanPropertySerializesAsBooleanValue() - { - string name = Some.String(); - const bool Value = true; - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); + [Fact] + public void ABooleanPropertySerializesAsBooleanValue() + { + string name = Some.String(); + const bool Value = true; + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); - var formatted = FormatJson(@event); + var formatted = FormatJson(@event); - Assert.Equal(Value, (bool?)formatted["Properties"]?[name]); - } + Assert.Equal(Value, (bool?)formatted["Properties"]?[name]); + } - [Fact] - public void AByteSerializesAsNumericValue() - { - string name = Some.String(); - const byte Value = 123; - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); + [Fact] + public void AByteSerializesAsNumericValue() + { + string name = Some.String(); + const byte Value = 123; + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); - var formatted = FormatJson(@event); + var formatted = FormatJson(@event); - Assert.Equal(Value, (byte?)formatted["Properties"]?[name]); - } + Assert.Equal(Value, (byte?)formatted["Properties"]?[name]); + } - [Fact] - public void ACharPropertySerializesAsStringValue() - { - string name = Some.String(); - const char Value = 'c'; - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); + [Fact] + public void ACharPropertySerializesAsStringValue() + { + string name = Some.String(); + const char Value = 'c'; + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); - var formatted = FormatJson(@event); + var formatted = FormatJson(@event); - Assert.Equal(Value.ToString(), (string)formatted["Properties"]?[name]); - } + Assert.Equal(Value.ToString(), (string)formatted["Properties"]?[name]); + } - [Fact] - public void ADecimalSerializesAsNumericValue() - { - string name = Some.String(); - const decimal Value = 123.45m; - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); + [Fact] + public void ADecimalSerializesAsNumericValue() + { + string name = Some.String(); + const decimal Value = 123.45m; + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); - var formatted = FormatJson(@event); + var formatted = FormatJson(@event); - Assert.Equal(Value, (decimal?)formatted["Properties"]?[name]); - } + Assert.Equal(Value, (decimal?)formatted["Properties"]?[name]); + } - [Fact] - public void ADictionaryWithScalarKeySerializesAsAnObject() - { - int dictKey = Some.Int(); - int dictValue = Some.Int(); - var dict = new DictionaryValue(new Dictionary - { - { new ScalarValue(dictKey), new ScalarValue(dictValue) }, - }); - var dictProp = new LogEventProperty(Some.String(), dict); - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(dictProp); - - string formatted = FormatToJson(@event); - string expected = $@"{{""{dictKey}"":{dictValue}}}"; - Assert.Contains(expected, formatted); - } + [Fact] + public void ADictionaryWithScalarKeySerializesAsAnObject() + { + int dictKey = Some.Int(); + int dictValue = Some.Int(); + var dict = new DictionaryValue(new Dictionary + { + { new ScalarValue(dictKey), new ScalarValue(dictValue) }, + }); + var dictProp = new LogEventProperty(Some.String(), dict); + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(dictProp); + + string formatted = FormatToJson(@event); + string expected = $$"""{"{{dictKey}}":{{dictValue}}}"""; + Assert.Contains(expected, formatted); + } - [Fact] - public void ADoubleSerializesAsNumericValue() - { - string name = Some.String(); - const double Value = 123.45; - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); + [Fact] + public void ADoubleSerializesAsNumericValue() + { + string name = Some.String(); + const double Value = 123.45; + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); - var formatted = FormatJson(@event); + var formatted = FormatJson(@event); - Assert.Equal(Value, (double?)formatted["Properties"]?[name]); - } + Assert.Equal(Value, (double?)formatted["Properties"]?[name]); + } - [Fact] - public void AFloatSerializesAsNumericValue() - { - string name = Some.String(); - const float Value = 123.45f; - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); + [Fact] + public void AFloatSerializesAsNumericValue() + { + string name = Some.String(); + const float Value = 123.45f; + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); - var formatted = FormatJson(@event); + var formatted = FormatJson(@event); - Assert.Equal(Value, (float?)formatted["Properties"]?[name]); - } + Assert.Equal(Value, (float?)formatted["Properties"]?[name]); + } - [Fact] - public void AGuidPropertySerializesAsStringValue() - { - string name = Some.String(); - var value = Guid.NewGuid(); - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); + [Fact] + public void AGuidPropertySerializesAsStringValue() + { + string name = Some.String(); + var value = Guid.NewGuid(); + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); - var formatted = FormatJson(@event); + var formatted = FormatJson(@event); - Assert.Equal(value.ToString(), (string)formatted["Properties"]?[name]); - } + Assert.Equal(value.ToString(), (string)formatted["Properties"]?[name]); + } - [Fact] - public void ALongSerializesAsNumericValue() - { - string name = Some.String(); - const long Value = long.MaxValue; - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); + [Fact] + public void ALongSerializesAsNumericValue() + { + string name = Some.String(); + const long Value = long.MaxValue; + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); - var formatted = FormatJson(@event); + var formatted = FormatJson(@event); - Assert.Equal(Value, (long?)formatted["Properties"]?[name]); - } + Assert.Equal(Value, (long?)formatted["Properties"]?[name]); + } - [Fact] - public void AnArrayPropertySerializesAsObjectToStringValue() - { - string name = Some.String(); - Guid[] value = { Guid.Empty, Guid.NewGuid(), Guid.NewGuid() }; - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); + [Fact] + public void AnArrayPropertySerializesAsObjectToStringValue() + { + string name = Some.String(); + Guid[] value = [Guid.Empty, Guid.NewGuid(), Guid.NewGuid()]; + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); - var formatted = FormatJson(@event); + var formatted = FormatJson(@event); - Assert.Equal("System.Guid[]", (string)formatted["Properties"]?[name]); - } + Assert.Equal("System.Guid[]", (string)formatted["Properties"]?[name]); + } - [Fact] - public void ANegativeIntegerPropertySerializesAsIntegerValue() - { - string name = Some.String(); - int value = -Some.Int(); - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); + [Fact] + public void ANegativeIntegerPropertySerializesAsIntegerValue() + { + string name = Some.String(); + int value = -Some.Int(); + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); - var formatted = FormatJson(@event); + var formatted = FormatJson(@event); - Assert.Equal(value, (int?)formatted["Properties"]?[name]); - } + Assert.Equal(value, (int?)formatted["Properties"]?[name]); + } - [Fact] - public void AnEnumPropertySerializesAsStringValue() - { - string name = Some.String(); - var value = TestEnum.Value1; - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); + [Fact] + public void AnEnumPropertySerializesAsStringValue() + { + string name = Some.String(); + var value = TestEnum.Value1; + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); - var formatted = FormatJson(@event); + var formatted = FormatJson(@event); - Assert.Equal(value.ToString(), (string)formatted["Properties"]?[name]); + Assert.Equal(value.ToString(), (string)formatted["Properties"]?[name]); - value = TestEnum.asdf; - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); + value = TestEnum.asdf; + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); - formatted = FormatJson(@event); + formatted = FormatJson(@event); - Assert.Equal(value.ToString(), (string)formatted["Properties"]?[name]); - } + Assert.Equal(value.ToString(), (string)formatted["Properties"]?[name]); + } - [Fact] - public void AnIntegerPropertySerializesAsIntegerValue() - { - string name = Some.String(); - int value = Some.Int(); - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); + [Fact] + public void AnIntegerPropertySerializesAsIntegerValue() + { + string name = Some.String(); + int value = Some.Int(); + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); - var formatted = FormatJson(@event); + var formatted = FormatJson(@event); - Assert.Equal(value, (int?)formatted["Properties"]?[name]); - } + Assert.Equal(value, (int?)formatted["Properties"]?[name]); + } - [Fact] - public void ANullIsSerializedAsNullRegardlessOfType() - { - string name = Some.String(); - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(null))); - - var formatted = FormatJson(@event); - Assert.Null(formatted["Properties"]?[name]); - int? value = null; - // ReSharper disable once ExpressionIsAlwaysNull - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); - - formatted = FormatJson(@event); - Assert.Null(formatted["Properties"]?[name]); - } + [Fact] + public void ANullIsSerializedAsNullRegardlessOfType() + { + string name = Some.String(); + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(null))); + + var formatted = FormatJson(@event); + Assert.Null(formatted["Properties"]?[name]); + int? value = null; + // ReSharper disable once ExpressionIsAlwaysNull + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); + + formatted = FormatJson(@event); + Assert.Null(formatted["Properties"]?[name]); + } - [Fact] - public void AnUnsignedIntegerPropertySerializesAsIntegerValue() - { - string name = Some.String(); - const uint Value = 123; - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); - var formatted = FormatJson(@event); - Assert.Equal(Value, (uint?)formatted["Properties"]?[name]); - } + [Fact] + public void AnUnsignedIntegerPropertySerializesAsIntegerValue() + { + string name = Some.String(); + const uint Value = 123; + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); + var formatted = FormatJson(@event); + Assert.Equal(Value, (uint?)formatted["Properties"]?[name]); + } - [Fact] - public void AnUnsignedLongSerializesAsNumericValue() - { - string name = Some.String(); - const ulong Value = ulong.MaxValue; - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); + [Fact] + public void AnUnsignedLongSerializesAsNumericValue() + { + string name = Some.String(); + const ulong Value = ulong.MaxValue; + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); - var formatted = FormatJson(@event); + var formatted = FormatJson(@event); - Assert.Equal(Value, (ulong?)formatted["Properties"]?[name]); - } + Assert.Equal(Value, (ulong?)formatted["Properties"]?[name]); + } - [Fact] - public void AnUnsignedShortSerializesAsIntegerValue() - { - string name = Some.String(); - const ushort Value = 15; - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); + [Fact] + public void AnUnsignedShortSerializesAsIntegerValue() + { + string name = Some.String(); + const ushort Value = 15; + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); - var formatted = FormatJson(@event); + var formatted = FormatJson(@event); - Assert.Equal(Value, (ushort?)formatted["Properties"]?[name]); - } + Assert.Equal(Value, (ushort?)formatted["Properties"]?[name]); + } - [Fact] - public void ASbyteSerializesAsNumericValue() - { - string name = Some.String(); - const sbyte Value = 123; - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); + [Fact] + public void ASbyteSerializesAsNumericValue() + { + string name = Some.String(); + const sbyte Value = 123; + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); - var formatted = FormatJson(@event); + var formatted = FormatJson(@event); - Assert.Equal(Value, (sbyte?)formatted["Properties"]?[name]); - } + Assert.Equal(Value, (sbyte?)formatted["Properties"]?[name]); + } - [Fact] - public void ASequencePropertySerializesAsArrayValue() - { - string name = Some.String(); - int?[] ints = { Some.Int(), Some.Int() }; - var value = new SequenceValue(ints.Select(i => new ScalarValue(i))); - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, value)); - - var formatted = FormatJson(@event); - var result = new List(); - foreach (var el in formatted["Properties"]?[name]?.AsArray() ?? new JsonArray()) - { - result.Add((int?)el); - } + [Fact] + public void ASequencePropertySerializesAsArrayValue() + { + string name = Some.String(); + int?[] ints = [Some.Int(), Some.Int()]; + var value = new SequenceValue(ints.Select(i => new ScalarValue(i))); + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, value)); - Assert.Equal(ints, result); + var formatted = FormatJson(@event); + var result = new List(); + foreach (var el in formatted["Properties"]?[name]?.AsArray() ?? []) + { + result.Add((int?)el); } - [Fact] - public void AShortSerializesAsIntegerValue() - { - string name = Some.String(); - const short Value = 15; - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); + Assert.Equal(ints, result); + } - var formatted = FormatJson(@event); + [Fact] + public void AShortSerializesAsIntegerValue() + { + string name = Some.String(); + const short Value = 15; + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(Value))); - Assert.Equal(Value, (short?)formatted["Properties"]?[name]); - } + var formatted = FormatJson(@event); - [Fact] - public void AStructureSerializesAsAnObject() - { - int value = Some.Int(); - var memberProp = new LogEventProperty(Some.String(), new ScalarValue(value)); - var structure = new StructureValue(new List { memberProp }.AsReadOnly()); - var structureProp = new LogEventProperty(Some.String(), structure); - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(structureProp); - - var formatted = FormatJson(@event); - int? result = (int?)formatted["Properties"]?[structureProp.Name]?[memberProp.Name]; - Assert.Equal(value, result); - } + Assert.Equal(Value, (short?)formatted["Properties"]?[name]); + } - [Fact] - public void AStructureWithTypeTagSerializesAsAnObject() - { - int value = Some.Int(); - var memberProp = new LogEventProperty(Some.String(), new ScalarValue(value)); - var structure = new StructureValue(new List { memberProp }.AsReadOnly(), "_myTypeTag"); - var structureProp = new LogEventProperty(Some.String(), structure); - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(structureProp); - - var formatted = FormatJson(@event); - int? result = (int?)formatted["Properties"]?[structureProp.Name]?[memberProp.Name]; - Assert.Equal(value, result); - string typeTag = (string)formatted["Properties"]?[structureProp.Name]?["_typeTag"]; - Assert.Equal("_myTypeTag", typeTag); - } + [Fact] + public void AStructureSerializesAsAnObject() + { + int value = Some.Int(); + var memberProp = new LogEventProperty(Some.String(), new ScalarValue(value)); + var structure = new StructureValue(new List { memberProp }.AsReadOnly()); + var structureProp = new LogEventProperty(Some.String(), structure); + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(structureProp); + + var formatted = FormatJson(@event); + int? result = (int?)formatted["Properties"]?[structureProp.Name]?[memberProp.Name]; + Assert.Equal(value, result); + } - [Fact] - public void ATimeSpanSerializesAsStringValue() - { - string name = Some.String(); - var value = TimeSpan.FromSeconds(123.45); - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); + [Fact] + public void AStructureWithTypeTagSerializesAsAnObject() + { + int value = Some.Int(); + var memberProp = new LogEventProperty(Some.String(), new ScalarValue(value)); + var structure = new StructureValue(new List { memberProp }.AsReadOnly(), "_myTypeTag"); + var structureProp = new LogEventProperty(Some.String(), structure); + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(structureProp); + + var formatted = FormatJson(@event); + int? result = (int?)formatted["Properties"]?[structureProp.Name]?[memberProp.Name]; + Assert.Equal(value, result); + string typeTag = (string)formatted["Properties"]?[structureProp.Name]?["_typeTag"]; + Assert.Equal("_myTypeTag", typeTag); + } + + [Fact] + public void ATimeSpanSerializesAsStringValue() + { + string name = Some.String(); + var value = TimeSpan.FromSeconds(123.45); + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); - var formatted = FormatJson(@event); + var formatted = FormatJson(@event); - Assert.Equal(value.ToString(), (string)formatted["Properties"]?[name]); - } + Assert.Equal(value.ToString(), (string)formatted["Properties"]?[name]); + } - [Fact] - public void CustomDictionariesAreDestructuredViaDictionaryValue_When_AsDictionary_Applied() + [Fact] + public void CustomDictionariesAreDestructuredViaDictionaryValue_When_AsDictionary_Applied() + { + var dict = new MyDictionary { - var dict = new MyDictionary - { - { "hello", "world" }, - { "nums", new[] { 1.2 } }, - }; - - var e = DelegatingSink.GetLogEvent(l => l.Information("Value is {ADictionary}", dict), - cfg => cfg.Destructure.AsDictionary()); - var f = FormatJson(e); - Assert.Equal("world", (string)f["Properties"]?["ADictionary"]?["hello"]); - Assert.Equal(1.2, (double?)f["Properties"]?["ADictionary"]?["nums"]?[0]); - } + { "hello", "world" }, + { "nums", new[] { 1.2 } }, + }; - [Fact] - public void CustomDictionariesAreDestructuredViaDictionaryValue_When_AsDictionary_Applied_IsValid() + var e = DelegatingSink.GetLogEvent(l => l.Information("Value is {ADictionary}", dict), + cfg => cfg.Destructure.AsDictionary()); + var f = FormatJson(e); + Assert.Equal("world", (string)f["Properties"]?["ADictionary"]?["hello"]); + Assert.Equal(1.2, (double?)f["Properties"]?["ADictionary"]?["nums"]?[0]); + } + + [Fact] + public void CustomDictionariesAreDestructuredViaDictionaryValue_When_AsDictionary_Applied_IsValid() + { + var dict = new MyDictionary { - var dict = new MyDictionary - { - { "hello", "world" }, - { "nums", new[] { 1.2 } }, - }; - - var e = DelegatingSink.GetLogEvent(l => l.Information("Value is {ADictionary}", dict), - cfg => cfg.Destructure.AsDictionary()); - string json = FormatToJson(e); - Helpers.AssertValidJson(json); - } + { "hello", "world" }, + { "nums", new[] { 1.2 } }, + }; + + var e = DelegatingSink.GetLogEvent(l => l.Information("Value is {ADictionary}", dict), + cfg => cfg.Destructure.AsDictionary()); + string json = FormatToJson(e); + Helpers.AssertValidJson(json); + } - [Fact] - public void DictionariesAreDestructuredViaDictionaryValue() + [Fact] + public void DictionariesAreDestructuredViaDictionaryValue() + { + var dict = new Dictionary { - var dict = new Dictionary - { - { "hello", "world" }, - { "nums", new[] { 1.2 } }, - }; + { "hello", "world" }, + { "nums", new[] { 1.2 } }, + }; - var e = DelegatingSink.GetLogEvent(l => l.Information("Value is {ADictionary}", dict)); - var f = FormatJson(e); + var e = DelegatingSink.GetLogEvent(l => l.Information("Value is {ADictionary}", dict)); + var f = FormatJson(e); - Assert.Equal("world", (string)f["Properties"]?["ADictionary"]?["hello"]); - Assert.Equal(1.2, (double?)f["Properties"]?["ADictionary"]?["nums"]?[0]); - } + Assert.Equal("world", (string)f["Properties"]?["ADictionary"]?["hello"]); + Assert.Equal(1.2, (double?)f["Properties"]?["ADictionary"]?["nums"]?[0]); + } - [Fact] - public void JsonFormattedDate() - { - var @event = new LogEvent( - DateTimeOffset.MaxValue, - Information, - null, - Some.MessageTemplate(), - new List - { new LogEventProperty("name", new ScalarValue(DateTime.Parse("2023-01-01T12:34:56.789000"))) } - .AsReadOnly()); - - var formatted = FormatJson(@event); - Assert.Equal( - // zeroes are trimmed - "2023-01-01T12:34:56.789", - (string)formatted["Properties"]?["name"]); - } + [Fact] + public void JsonFormattedDate() + { + var @event = new LogEvent( + DateTimeOffset.MaxValue, + Information, + null, + Some.MessageTemplate(), + new List + { new("name", new ScalarValue(DateTime.Parse("2023-01-01T12:34:56.789000"))) } + .AsReadOnly()); + + var formatted = FormatJson(@event); + Assert.Equal( + // zeroes are trimmed + "2023-01-01T12:34:56.789", + (string)formatted["Properties"]?["name"]); + } #if FEATURE_DATE_AND_TIME_ONLY - [Fact] - public void JsonFormattedDateOnly() - { - var @event = new LogEvent( - DateTimeOffset.MaxValue, - Information, - null, - Some.MessageTemplate(), - new List - { new LogEventProperty("name", new ScalarValue(DateOnly.MaxValue)) }.AsReadOnly()); - - var formatted = FormatJson(@event); - Assert.Equal( - "9999-12-31", - (string)formatted["Properties"]?["name"]); - } + [Fact] + public void JsonFormattedDateOnly() + { + var @event = new LogEvent( + DateTimeOffset.MaxValue, + Information, + null, + Some.MessageTemplate(), + new List + { new("name", new ScalarValue(DateOnly.MaxValue)) }.AsReadOnly()); + + var formatted = FormatJson(@event); + Assert.Equal( + "9999-12-31", + (string)formatted["Properties"]?["name"]); + } #endif - [Fact] - public void JsonFormattedEventsIncludeTimestamp() - { - var @event = new LogEvent( - new DateTimeOffset(2013, 3, 11, 15, 59, 0, 123, TimeSpan.FromHours(10)), - Information, - null, - Some.MessageTemplate(), - Array.Empty()); - - var formatted = FormatJson(@event); - - Assert.Equal( - // timestamp is formatted as `O` - "2013-03-11T15:59:00.1230000+10:00", - (string)formatted["Timestamp"]); - } + [Fact] + public void JsonFormattedEventsIncludeTimestamp() + { + var @event = new LogEvent( + new DateTimeOffset(2013, 3, 11, 15, 59, 0, 123, TimeSpan.FromHours(10)), + Information, + null, + Some.MessageTemplate(), + Array.Empty()); + + var formatted = FormatJson(@event); + + Assert.Equal( + // timestamp is formatted as `O` + "2013-03-11T15:59:00.1230000+10:00", + (string)formatted["Timestamp"]); + } #if FEATURE_DATE_AND_TIME_ONLY - [Fact] - public void JsonFormattedTimeOnly() - { - var @event = new LogEvent( - DateTimeOffset.MaxValue, - Information, - null, - Some.MessageTemplate(), - new List - { new LogEventProperty("name", new ScalarValue(TimeOnly.MaxValue)) }.AsReadOnly()); - - var formatted = FormatJson(@event); - Assert.Equal( - "23:59:59.9999999", - (string)formatted["Properties"]?["name"]); - } + [Fact] + public void JsonFormattedTimeOnly() + { + var @event = new LogEvent( + DateTimeOffset.MaxValue, + Information, + null, + Some.MessageTemplate(), + new List + { new("name", new ScalarValue(TimeOnly.MaxValue)) }.AsReadOnly()); + + var formatted = FormatJson(@event); + Assert.Equal( + "23:59:59.9999999", + (string)formatted["Properties"]?["name"]); + } #endif - [Fact] - public void PropertyTokensWithFormatStringsAreIncludedAsRenderings() - { - var p = new MessageTemplateParser(); - var e = new LogEvent(Some.OffsetInstant(), Information, null, - p.Parse("{AProperty:000}"), - new List { new LogEventProperty("AProperty", new ScalarValue(12)) }.AsReadOnly()); - - var d = FormatEvent(e); - var rs = d["Renderings"]?.AsObject() ?? new JsonObject(); - Assert.Single(rs); - var ap = d["Renderings"]?["AProperty"]; - var fs = ap?.AsArray() ?? new JsonArray(); - Assert.Single(fs); - Assert.Equal("000", (string)fs.Single()?["Format"]); - Assert.Equal("012", (string)fs.Single()?["Rendering"]); - } + [Fact] + public void PropertyTokensWithFormatStringsAreIncludedAsRenderings() + { + var p = new MessageTemplateParser(); + var e = new LogEvent(Some.OffsetInstant(), Information, null, + p.Parse("{AProperty:000}"), + new List { new("AProperty", new ScalarValue(12)) }.AsReadOnly()); + + var d = FormatEvent(e); + var rs = d["Renderings"]?.AsObject() ?? new JsonObject(); + Assert.Single(rs); + var ap = d["Renderings"]?["AProperty"]; + var fs = ap?.AsArray() ?? []; + Assert.Single(fs); + Assert.Equal("000", (string)fs.Single()?["Format"]); + Assert.Equal("012", (string)fs.Single()?["Rendering"]); + } - [Fact] - public void PropertyTokensWithoutFormatStringsAreNotIncludedAsRenderings() - { - var p = new MessageTemplateParser(); - var e = new LogEvent(Some.OffsetInstant(), Information, null, - p.Parse("{AProperty}"), - new List { new LogEventProperty("AProperty", new ScalarValue(12)) }.AsReadOnly()); + [Fact] + public void PropertyTokensWithoutFormatStringsAreNotIncludedAsRenderings() + { + var p = new MessageTemplateParser(); + var e = new LogEvent(Some.OffsetInstant(), Information, null, + p.Parse("{AProperty}"), + new List { new("AProperty", new ScalarValue(12)) }.AsReadOnly()); - var d = FormatEvent(e); + var d = FormatEvent(e); - var rs = (IEnumerable)d["Renderings"]; - Assert.Null(rs); - } + var rs = (IEnumerable)d["Renderings"]; + Assert.Null(rs); + } - [Fact] - public void ReadonlyDictionariesAreDestructuredViaDictionaryValue() + [Fact] + public void ReadonlyDictionariesAreDestructuredViaDictionaryValue() + { + var dict = new ReadOnlyDictionary(new Dictionary { - var dict = new ReadOnlyDictionary(new Dictionary - { - { "hello", "world" }, - { "nums", new[] { 1.2 } }, - }); + { "hello", "world" }, + { "nums", new[] { 1.2 } }, + }); - var e = DelegatingSink.GetLogEvent(l => l.Information("Value is {ADictionary}", dict)); - var f = FormatJson(e); + var e = DelegatingSink.GetLogEvent(l => l.Information("Value is {ADictionary}", dict)); + var f = FormatJson(e); - Assert.Equal("world", (string)f["Properties"]?["ADictionary"]?["hello"]); - Assert.Equal(1.2, (double?)f["Properties"]?["ADictionary"]?["nums"]?[0]); - } + Assert.Equal("world", (string)f["Properties"]?["ADictionary"]?["hello"]); + Assert.Equal(1.2, (double?)f["Properties"]?["ADictionary"]?["nums"]?[0]); + } - [Fact] // See https://github.com/serilog/serilog/issues/1924 - public void RenderedMessageIsIncludedCorrectlyWhenRequired() - { - var p = new MessageTemplateParser(); - var e = new LogEvent(Some.OffsetInstant(), Information, null, - p.Parse("Value: {AProperty}"), - new List { new LogEventProperty("AProperty", new ScalarValue(12)) }.AsReadOnly()); + [Fact] // See https://github.com/serilog/serilog/issues/1924 + public void RenderedMessageIsIncludedCorrectlyWhenRequired() + { + var p = new MessageTemplateParser(); + var e = new LogEvent(Some.OffsetInstant(), Information, null, + p.Parse("Value: {AProperty}"), + new List { new("AProperty", new ScalarValue(12)) }.AsReadOnly()); - var formatter = new Utf8JsonFormatter(renderMessage: true); + var formatter = new Utf8JsonFormatter(renderMessage: true); - var buffer = new StringWriter(); - formatter.Format(e, buffer); - string json = buffer.ToString(); + var buffer = new StringWriter(); + formatter.Format(e, buffer); + string json = buffer.ToString(); - Assert.Contains(@",""MessageTemplate"":""Value: {AProperty}"",""RenderedMessage"":""Value: 12"",", json); - } + Assert.Contains(""","MessageTemplate":"Value: {AProperty}","RenderedMessage":"Value: 12",""", json); + } - [Fact] - public void SequencesOfSequencesAreSerialized() - { - var p = new MessageTemplateParser(); - var e = new LogEvent(Some.OffsetInstant(), Information, null, - p.Parse("{@AProperty}"), - new List - { - new LogEventProperty("AProperty", new SequenceValue(new List - { - new SequenceValue(new List - { new ScalarValue("Hello") }.AsReadOnly()), - } - .AsReadOnly())), - }.AsReadOnly()); - - var d = FormatEvent(e); - - string h = (string)d["Properties"]?["AProperty"]?[0]?[0]; - Assert.Equal("Hello", h); - } + [Fact] + public void SequencesOfSequencesAreSerialized() + { + var p = new MessageTemplateParser(); + var e = new LogEvent(Some.OffsetInstant(), Information, null, + p.Parse("{@AProperty}"), + new List + { + new("AProperty", new SequenceValue(new List + { + new SequenceValue(new List + { new ScalarValue("Hello") }.AsReadOnly()), + } + .AsReadOnly())), + }.AsReadOnly()); + + var d = FormatEvent(e); + + string h = (string)d["Properties"]?["AProperty"]?[0]?[0]; + Assert.Equal("Hello", h); + } - [Fact] - public void TraceAndSpanAreIgnoredWhenAbsent() - { - var evt = Some.LogEvent(traceId: default, spanId: default); - var sw = new StringWriter(); - var formatter = new Utf8JsonFormatter(); - formatter.Format(evt, sw); - string formatted = sw.ToString(); - Assert.DoesNotContain("TraceId", formatted, StringComparison.OrdinalIgnoreCase); - Assert.DoesNotContain("SpanId", formatted, StringComparison.OrdinalIgnoreCase); - } + [Fact] + public void TraceAndSpanAreIgnoredWhenAbsent() + { + var evt = Some.LogEvent(traceId: default, spanId: default); + var sw = new StringWriter(); + var formatter = new Utf8JsonFormatter(); + formatter.Format(evt, sw); + string formatted = sw.ToString(); + Assert.DoesNotContain("TraceId", formatted, StringComparison.OrdinalIgnoreCase); + Assert.DoesNotContain("SpanId", formatted, StringComparison.OrdinalIgnoreCase); + } - [Fact] - public void TraceAndSpanAreIncludedWhenPresent() - { - var traceId = ActivityTraceId.CreateRandom(); - var spanId = ActivitySpanId.CreateRandom(); - var evt = Some.LogEvent(traceId: traceId, spanId: spanId); - var sw = new StringWriter(); - var formatter = new Utf8JsonFormatter(); - formatter.Format(evt, sw); - string formatted = sw.ToString(); - Assert.Contains($@"""TraceId"":""{traceId}""", formatted); - Assert.Contains($@"""SpanId"":""{spanId}""", formatted); - } + [Fact] + public void TraceAndSpanAreIncludedWhenPresent() + { + var traceId = ActivityTraceId.CreateRandom(); + var spanId = ActivitySpanId.CreateRandom(); + var evt = Some.LogEvent(traceId: traceId, spanId: spanId); + var sw = new StringWriter(); + var formatter = new Utf8JsonFormatter(); + formatter.Format(evt, sw); + string formatted = sw.ToString(); + Assert.Contains($""" + "TraceId":"{traceId}" + """, formatted); + Assert.Contains($""" + "SpanId":"{spanId}" + """, formatted); + } #if FEATURE_ISPANFORMATTABLE - [Fact] - public void AnISpanFormattablePropertySerializesAsStringValue() - { - string name = Some.String(); - var value = IPAddress.Parse("fdca:47ef:b356:4234::1"); - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); + [Fact] + public void AnISpanFormattablePropertySerializesAsStringValue() + { + string name = Some.String(); + var value = IPAddress.Parse("fdca:47ef:b356:4234::1"); + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); - var formatted = FormatJson(@event); - Assert.Equal(value.ToString(), (string)formatted["Properties"]?[name]); - } + var formatted = FormatJson(@event); + Assert.Equal(value.ToString(), (string)formatted["Properties"]?[name]); + } - [Fact] - public void AnISpanFormattablePropertySerializesAsStringValueNet6() - { - string name = Some.String(); - var value = new Uri("https://www.google.com"); - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); + [Fact] + public void AnISpanFormattablePropertySerializesAsStringValueNet6() + { + string name = Some.String(); + var value = new Uri("https://github.com/alexaka1/serilog-extensions"); + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); - var formatted = FormatJson(@event); - Assert.Equal(value.ToString(), (string)formatted["Properties"]?[name]); - } + var formatted = FormatJson(@event); + Assert.Equal(value.ToString(), (string)formatted["Properties"]?[name]); + } - [Fact] - public void AnISpanFormattableValueTypePropertySerializesAsStringValue() - { - string name = Some.String(); - var value = (Half)123.45; - var @event = Some.InformationEvent(); - @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); + [Fact] + public void AnISpanFormattableValueTypePropertySerializesAsStringValue() + { + string name = Some.String(); + var value = (Half)123.45; + var @event = Some.InformationEvent(); + @event.AddOrUpdateProperty(new LogEventProperty(name, new ScalarValue(value))); - var formatted = FormatJson(@event); + var formatted = FormatJson(@event); - Assert.Equal(value.ToString(CultureInfo.InvariantCulture), (string)formatted["Properties"]?[name]); - } -#endif + Assert.Equal(value.ToString(CultureInfo.InvariantCulture), (string)formatted["Properties"]?[name]); } +#endif +} - internal enum TestEnum - { - Value1, +internal enum TestEnum +{ + Value1, - // ReSharper disable once InconsistentNaming - asdf, - } + // ReSharper disable once InconsistentNaming + asdf, } diff --git a/test/Serilog.Extensions.Formatting.Test/Some.cs b/test/Serilog.Extensions.Formatting.Test/Some.cs index 527b378..b279815 100644 --- a/test/Serilog.Extensions.Formatting.Test/Some.cs +++ b/test/Serilog.Extensions.Formatting.Test/Some.cs @@ -6,110 +6,109 @@ using Serilog.Parsing; using Xunit; -namespace Serilog.Extensions.Formatting.Test +namespace Serilog.Extensions.Formatting.Test; + +internal static class Some { - internal static class Some - { - private static int Counter; - - public static int Int() - { - return Interlocked.Increment(ref Counter); - } - - public static decimal Decimal() - { - return Int() + 0.123m; - } - - public static string String(string tag = null) - { - return (tag ?? "") + "__" + Int(); - } - - public static TimeSpan TimeSpan() - { - return System.TimeSpan.FromMinutes(Int()); - } - - public static DateTime Instant() - { - return new DateTime(2012, 10, 28) + TimeSpan(); - } - - public static DateTimeOffset OffsetInstant() - { - return new DateTimeOffset(Instant()); - } - - public static LogEvent LogEvent( - DateTimeOffset? timestamp = null, - LogEventLevel level = LogEventLevel.Information, - Exception exception = null, - string messageTemplate = null, - object[] propertyValues = null, - ActivityTraceId traceId = default, - ActivitySpanId spanId = default) - { - var logger = new LoggerConfiguration().CreateLogger(); - // ReSharper disable once TemplateIsNotCompileTimeConstantProblem - Assert.True(logger.BindMessageTemplate(messageTemplate ?? "DEFAULT TEMPLATE", propertyValues, - out var parsedTemplate, out var boundProperties)); - return new LogEvent( - timestamp ?? OffsetInstant(), - level, - exception, - parsedTemplate, - boundProperties, - traceId, - spanId); - } - - public static LogEvent InformationEvent(DateTimeOffset? timestamp = null) - { - return LogEvent(timestamp); - } - - public static LogEvent DebugEvent(DateTimeOffset? timestamp = null) - { - return LogEvent(timestamp, LogEventLevel.Debug); - } - - public static LogEvent WarningEvent(DateTimeOffset? timestamp = null) - { - return LogEvent(timestamp, LogEventLevel.Warning); - } - - public static LogEventProperty LogEventProperty() - { - return new LogEventProperty(String(), new ScalarValue(Int())); - } - - public static string NonexistentTempFilePath() - { - return Path.Combine(Path.GetTempPath(), Guid.NewGuid() + ".txt"); - } - - public static string TempFilePath() - { - return Path.GetTempFileName(); - } - - public static string TempFolderPath() - { - string dir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); - Directory.CreateDirectory(dir); - return dir; - } - - public static MessageTemplate MessageTemplate() - { - return new MessageTemplateParser().Parse(String()); - } - - public static Exception Exception() - { - return new ArgumentException(String()); - } + private static int s_counter; + + public static int Int() + { + return Interlocked.Increment(ref s_counter); + } + + public static decimal Decimal() + { + return Int() + 0.123m; + } + + public static string String(string tag = null) + { + return (tag ?? "") + "__" + Int(); + } + + public static TimeSpan TimeSpan() + { + return System.TimeSpan.FromMinutes(Int()); + } + + public static DateTime Instant() + { + return new DateTime(2012, 10, 28) + TimeSpan(); + } + + public static DateTimeOffset OffsetInstant() + { + return new DateTimeOffset(Instant()); + } + + public static LogEvent LogEvent( + DateTimeOffset? timestamp = null, + LogEventLevel level = LogEventLevel.Information, + Exception exception = null, + string messageTemplate = null, + object[] propertyValues = null, + ActivityTraceId traceId = default, + ActivitySpanId spanId = default) + { + var logger = new LoggerConfiguration().CreateLogger(); + // ReSharper disable once TemplateIsNotCompileTimeConstantProblem + Assert.True(logger.BindMessageTemplate(messageTemplate ?? "DEFAULT TEMPLATE", propertyValues, + out var parsedTemplate, out var boundProperties)); + return new LogEvent( + timestamp ?? OffsetInstant(), + level, + exception, + parsedTemplate, + boundProperties, + traceId, + spanId); + } + + public static LogEvent InformationEvent(DateTimeOffset? timestamp = null) + { + return LogEvent(timestamp); + } + + public static LogEvent DebugEvent(DateTimeOffset? timestamp = null) + { + return LogEvent(timestamp, LogEventLevel.Debug); + } + + public static LogEvent WarningEvent(DateTimeOffset? timestamp = null) + { + return LogEvent(timestamp, LogEventLevel.Warning); + } + + public static LogEventProperty LogEventProperty() + { + return new LogEventProperty(String(), new ScalarValue(Int())); + } + + public static string NonexistentTempFilePath() + { + return Path.Combine(Path.GetTempPath(), Guid.NewGuid() + ".txt"); + } + + public static string TempFilePath() + { + return Path.GetTempFileName(); + } + + public static string TempFolderPath() + { + string dir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); + Directory.CreateDirectory(dir); + return dir; + } + + public static MessageTemplate MessageTemplate() + { + return new MessageTemplateParser().Parse(String()); + } + + public static Exception Exception() + { + return new ArgumentException(String()); } } diff --git a/test/Serilog.Extensions.Formatting.Test/Utf8JsonFormatterTests.cs b/test/Serilog.Extensions.Formatting.Test/Utf8JsonFormatterTests.cs index b7a5df5..8d8127b 100644 --- a/test/Serilog.Extensions.Formatting.Test/Utf8JsonFormatterTests.cs +++ b/test/Serilog.Extensions.Formatting.Test/Utf8JsonFormatterTests.cs @@ -18,479 +18,456 @@ using Xunit.Abstractions; #endif -namespace Serilog.Extensions.Formatting.Test +namespace Serilog.Extensions.Formatting.Test; + +public class Utf8JsonFormatterTests { - public class Utf8JsonFormatterTests - { - private readonly DateTimeOffset _dateTimeOffset = new DateTimeOffset(new DateTime(1970, 1, 1), TimeSpan.Zero); + private readonly DateTimeOffset _dateTimeOffset = new(new DateTime(1970, 1, 1), TimeSpan.Zero); - [Theory] - [MemberData(nameof(LogEvents))] - public void RendersSameJsonAsJsonFormatter(LogEvent e) - { - var json = new JsonFormatter(renderMessage: true); - var utf8 = new Utf8JsonFormatter(renderMessage: true, - // fix Unicode escaping for the tests - jsonWriterEncoder: JavaScriptEncoder.UnsafeRelaxedJsonEscaping); - - var jsonB = new StringWriter(); - var utf8B = new StringWriter(); - json.Format(e, jsonB); - utf8.Format(e, utf8B); - jsonB.Flush(); - utf8B.Flush(); - string expected = jsonB.ToString(); - string actual = utf8B.ToString(); + [Theory] + [MemberData(nameof(LogEvents))] + public void RendersSameJsonAsJsonFormatter(LogEvent e) + { + var json = new JsonFormatter(renderMessage: true); + var utf8 = new Utf8JsonFormatter(renderMessage: true, + // fix Unicode escaping for the tests + jsonWriterEncoder: JavaScriptEncoder.UnsafeRelaxedJsonEscaping); + + var jsonB = new StringWriter(); + var utf8B = new StringWriter(); + json.Format(e, jsonB); + utf8.Format(e, utf8B); + jsonB.Flush(); + utf8B.Flush(); + string expected = jsonB.ToString(); + string actual = utf8B.ToString(); #if DEBUG - _output.WriteLine("Json:"); - _output.WriteLine(expected); - _output.WriteLine("Utf8:"); - _output.WriteLine(actual); + _output.WriteLine("Json:"); + _output.WriteLine(expected); + _output.WriteLine("Utf8:"); + _output.WriteLine(actual); #endif - Assert.Equal(expected, actual); - } + Assert.Equal(expected, actual); + } - public static TheoryData LogEvents() - { - var p = new MessageTemplateParser(); - return new TheoryData - { - new LogEvent(Some.OffsetInstant(), LogEventLevel.Information, null, - p.Parse("Value: {AProperty}"), - new List { new LogEventProperty("AProperty", new ScalarValue(12)) }.AsReadOnly()), - new LogEvent(DateTimeOffset.UtcNow, LogEventLevel.Verbose, - new Exception("test") { Data = { ["testData"] = "test2" } }, - p.Parse( - "My name is {Name}, I'm {Age} years old, and I live in {City}, and the time is {Time:HH:mm:ss}"), - new List - { - new LogEventProperty("Name", new ScalarValue("John Doe")), - new LogEventProperty("Age", new ScalarValue(42)), - new LogEventProperty("City", new ScalarValue("London")), - new LogEventProperty("Time", - // DateTimes are trimmed, we test this case elsewhere - new ScalarValue(DateTimeOffset.Parse("2023-01-01T12:34:56.7891111+01:00")) - ), - }.AsReadOnly()), - new LogEvent(DateTimeOffset.UtcNow, LogEventLevel.Verbose, - new Exception("test") { Data = { ["testData"] = "test2" } }, - p.Parse( - "My name is {Name}, I'm {Age} years old, and I live in {City}, and the time is {Time:HH:mm:ss}"), - new List - { - new LogEventProperty("Name", new ScalarValue("John Doe")), - new LogEventProperty("Age", new ScalarValue(42)), - new LogEventProperty("City", new ScalarValue("London")), - new LogEventProperty("Time", - new ScalarValue(DateTime.Parse("2023-01-01T12:34:56.7891111+01:00")) - ), - }.AsReadOnly()), - new LogEvent(DateTimeOffset.UtcNow, LogEventLevel.Debug, - new Exception("test") { Data = { ["testData"] = "test2" } }, - p.Parse( - "I have {Count} fruits, which are {Fruits}"), - new List - { - new LogEventProperty("Count", new ScalarValue(3)), - new LogEventProperty("Fruits", - new SequenceValue(new List - { new ScalarValue("apple"), new ScalarValue("banana"), new ScalarValue("cherry") } - .AsReadOnly() - ) - ), - }.AsReadOnly() - ), - new LogEvent(DateTimeOffset.UtcNow, LogEventLevel.Information, - new Exception("test") { Data = { ["testData"] = "test2" } }, - p.Parse( - "I have {Fruit,-20} fruits"), - new List { new LogEventProperty("Fruit", new ScalarValue("apple")) }.AsReadOnly() - ), - new LogEvent(DateTimeOffset.UtcNow, LogEventLevel.Information, - new Exception("test") { Data = { ["testData"] = "test2" } }, - p.Parse( - "I have {@Fruit,-40} fruits, {Hello:u3}"), - new List - { - new LogEventProperty("Fruit", new StructureValue( - new List { new LogEventProperty("apple", new ScalarValue("apple")) } - .AsReadOnly() - ) - ), - new LogEventProperty("Hello", new ScalarValue("Hello World")), - }.AsReadOnly() - ), - }; - } + public static TheoryData LogEvents() + { + var p = new MessageTemplateParser(); + return + [ + new LogEvent(Some.OffsetInstant(), LogEventLevel.Information, null, + p.Parse("Value: {AProperty}"), + [new LogEventProperty("AProperty", new ScalarValue(12))]), + + new LogEvent(DateTimeOffset.UtcNow, LogEventLevel.Verbose, + new Exception("test") { Data = { ["testData"] = "test2" } }, + p.Parse( + "My name is {Name}, I'm {Age} years old, and I live in {City}, and the time is {Time:HH:mm:ss}"), + [ + new LogEventProperty("Name", new ScalarValue("John Doe")), + new LogEventProperty("Age", new ScalarValue(42)), + new LogEventProperty("City", new ScalarValue("London")), + new LogEventProperty("Time", + // DateTimes are trimmed, we test this case elsewhere + new ScalarValue(DateTimeOffset.Parse("2023-01-01T12:34:56.7891111+01:00")) + ), + ]), + + new LogEvent(DateTimeOffset.UtcNow, LogEventLevel.Verbose, + new Exception("test") { Data = { ["testData"] = "test2" } }, + p.Parse( + "My name is {Name}, I'm {Age} years old, and I live in {City}, and the time is {Time:HH:mm:ss}"), + [ + new LogEventProperty("Name", new ScalarValue("John Doe")), + new LogEventProperty("Age", new ScalarValue(42)), + new LogEventProperty("City", new ScalarValue("London")), + new LogEventProperty("Time", + new ScalarValue(DateTime.Parse("2023-01-01T12:34:56.7891111+01:00")) + ), + ]), + + new LogEvent(DateTimeOffset.UtcNow, LogEventLevel.Debug, + new Exception("test") { Data = { ["testData"] = "test2" } }, + p.Parse( + "I have {Count} fruits, which are {Fruits}"), + [ + new LogEventProperty("Count", new ScalarValue(3)), + new LogEventProperty("Fruits", + new SequenceValue( + [new ScalarValue("apple"), new ScalarValue("banana"), new ScalarValue("cherry")] + ) + ), + ] + ), + + new LogEvent(DateTimeOffset.UtcNow, LogEventLevel.Information, + new Exception("test") { Data = { ["testData"] = "test2" } }, + p.Parse( + "I have {Fruit,-20} fruits"), + [new LogEventProperty("Fruit", new ScalarValue("apple"))] + ), + + new LogEvent(DateTimeOffset.UtcNow, LogEventLevel.Information, + new Exception("test") { Data = { ["testData"] = "test2" } }, + p.Parse( + "I have {@Fruit,-40} fruits, {Hello:u3}"), + [ + new LogEventProperty("Fruit", new StructureValue( + [new LogEventProperty("apple", new ScalarValue("apple"))] + ) + ), + + new LogEventProperty("Hello", new ScalarValue("Hello World")), + ] + ), + ]; + } - [Theory] - [MemberData(nameof(ThreadSafetyMemberData))] - public async Task IsThreadSafe(ThreadSafetyParams @params) + [Theory] + [MemberData(nameof(ThreadSafetyMemberData))] + public async Task IsThreadSafe(ThreadSafetyParams @params) + { + var stringWriter = new StringWriter(); + var logEvent = new LogEvent(_dateTimeOffset, LogEventLevel.Debug, null, + new MessageTemplate("hello world", []), + [new LogEventProperty("hello", new ScalarValue("world"))] + , + ActivityTraceId.CreateFromString("3653d3ec94d045b9850794a08a4b286f".AsSpan()), + ActivitySpanId.CreateFromString("fcfb4c32a12a3532".AsSpan())); + @params.Formatter.Format(logEvent, stringWriter); + await stringWriter.FlushAsync(); + string expected = stringWriter.ToString(); + + var startSignal = new ManualResetEvent(false); + + string[] results = new string[@params.Threads]; + + var tasks = new Task[@params.Threads]; + for (int i = 0; i < @params.Threads; i++) { - var stringWriter = new StringWriter(); - var logEvent = new LogEvent(_dateTimeOffset, LogEventLevel.Debug, null, - new MessageTemplate("hello world", new List().AsReadOnly()), - new List { new LogEventProperty("hello", new ScalarValue("world")) } - .AsReadOnly(), - ActivityTraceId.CreateFromString("3653d3ec94d045b9850794a08a4b286f".AsSpan()), - ActivitySpanId.CreateFromString("fcfb4c32a12a3532".AsSpan())); - @params.Formatter.Format(logEvent, stringWriter); - await stringWriter.FlushAsync(); - string expected = stringWriter.ToString(); - - var startSignal = new ManualResetEvent(false); - - string[] results = new string[@params.Threads]; - - var tasks = new Task[@params.Threads]; - for (int i = 0; i < @params.Threads; i++) + int taskIndex = i; + tasks[taskIndex] = Task.Run(() => { - int taskIndex = i; - tasks[taskIndex] = Task.Run(() => - { - // Wait until the signal is given to start - startSignal.WaitOne(); - var writer = new StringWriter(); + // Wait until the signal is given to start + startSignal.WaitOne(); + var writer = new StringWriter(); - for (int j = 0; j < @params.Iterations; j++) - { - @params.Formatter.Format(logEvent, writer); - } + for (int j = 0; j < @params.Iterations; j++) + { + @params.Formatter.Format(logEvent, writer); + } - // Call the Format method - results[taskIndex] = writer.ToString(); - }); - } + // Call the Format method + results[taskIndex] = writer.ToString(); + }); + } - // Start all tasks at once - startSignal.Set(); - string expectedMerged = string.Join("", Enumerable.Repeat(expected, @params.Iterations)); + // Start all tasks at once + startSignal.Set(); + string expectedMerged = string.Join("", Enumerable.Repeat(expected, @params.Iterations)); - // Wait for all tasks to complete - await Task.WhenAll(tasks); - if (@params.Formatter is IDisposable disposable) - { - disposable.Dispose(); - } - - // Assert that all results are the same as expected output - for (int i = 0; i < @params.Threads; i++) - { - Assert.Equal(expectedMerged, results[i]); - } + // Wait for all tasks to complete + await Task.WhenAll(tasks); + if (@params.Formatter is IDisposable disposable) + { + disposable.Dispose(); } - public static TheoryData ThreadSafetyMemberData() + // Assert that all results are the same as expected output + for (int i = 0; i < @params.Threads; i++) { - int[] threads = { 1, 10, 100 /*, 500*/ }; - int[] iterations = { 1, 100, 1000, 10000 }; - var data = new List(); - // ReSharper disable once LoopCanBeConvertedToQuery - foreach (int thread in threads) - { - // ReSharper disable once LoopCanBeConvertedToQuery - foreach (int iteration in iterations) - { - data.Add(new ThreadSafetyParams(new Utf8JsonFormatter("\n"), iteration, thread)); - // the Serilog formatters are thread safe, uncomment if you want to test them - // data.Add(new ThreadSafetyData(new JsonFormatter("\n"), iteration, thread)); - // data.Add(new ThreadSafetyData( - // new ExpressionTemplate( - // "{ {Timestamp:@t,Level:@l,MessageTemplate:@mt,RenderedMessage:@m,TraceId:@tr,SpanId:@sp,Exception:@x,Properties:@p} }\n"), - // iteration, thread)); - } - } - - return new TheoryData(data); + Assert.Equal(expectedMerged, results[i]); } + } - [Fact] - public void CamelCase() + public static TheoryData ThreadSafetyMemberData() + { + int[] threads = [1, 10, 100 /*, 500*/]; + int[] iterations = [1, 100, 1000, 10000]; + var data = new List(); + // ReSharper disable once LoopCanBeConvertedToQuery + foreach (int thread in threads) { - var formatter = - new Utf8JsonFormatter("", true, null, 64, true, JsonNamingPolicy.CamelCase); - using (var stream = new MemoryStream()) - using (var writer = new StreamWriter(stream)) + // ReSharper disable once LoopCanBeConvertedToQuery + foreach (int iteration in iterations) { - formatter.Format(new LogEvent(_dateTimeOffset, LogEventLevel.Debug, null, - new MessageTemplate("hello world {Number}", - new List { new PropertyToken("Number", "{Number}") }.AsReadOnly()), - new List - { - new LogEventProperty("HelloWorld", new ScalarValue("world")), - new LogEventProperty("Number", new ScalarValue(123)), - }.AsReadOnly(), - ActivityTraceId.CreateFromString("3653d3ec94d045b9850794a08a4b286f".AsSpan()), - ActivitySpanId.CreateFromString("fcfb4c32a12a3532".AsSpan())), writer); - string message = Encoding.UTF8.GetString(stream.ToArray()); - Assert.Equal( - @"{""timestamp"":""1970-01-01T00:00:00.0000000\u002B00:00"",""level"":""Debug"",""messageTemplate"":""hello world {Number}"",""renderedMessage"":""123"",""traceId"":""3653d3ec94d045b9850794a08a4b286f"",""spanId"":""fcfb4c32a12a3532"",""properties"":{""helloWorld"":""world"",""number"":123}}", - message); + data.Add(new ThreadSafetyParams(new Utf8JsonFormatter("\n"), iteration, thread)); + // the Serilog formatters are thread safe, uncomment if you want to test them + // data.Add(new ThreadSafetyData(new JsonFormatter("\n"), iteration, thread)); + // data.Add(new ThreadSafetyData( + // new ExpressionTemplate( + // "{ {Timestamp:@t,Level:@l,MessageTemplate:@mt,RenderedMessage:@m,TraceId:@tr,SpanId:@sp,Exception:@x,Properties:@p} }\n"), + // iteration, thread)); } } - [Fact] - public void DoesNotThrowError() - { - var formatter = - new Utf8JsonFormatter(null, true); - using (var stream = new MemoryStream()) - using (var writer = new StreamWriter(stream)) - { - formatter.Format(new LogEvent(_dateTimeOffset, LogEventLevel.Debug, null, - new MessageTemplate("hello world {Number}", - new List { new PropertyToken("Number", "{Number}") }.AsReadOnly()), - new List - { - new LogEventProperty("HelloWorld", new ScalarValue("world")), - new LogEventProperty("Number", new ScalarValue(123)), - }.AsReadOnly(), - ActivityTraceId.CreateFromString("3653d3ec94d045b9850794a08a4b286f".AsSpan()), - ActivitySpanId.CreateFromString("fcfb4c32a12a3532".AsSpan())), writer); - writer.Flush(); - string message = Encoding.UTF8.GetString(stream.ToArray()); + return new TheoryData(data); + } + + [Fact] + public void CamelCase() + { + var formatter = + new Utf8JsonFormatter("", true, null, 64, true, JsonNamingPolicy.CamelCase); + using var stream = new MemoryStream(); + using var writer = new StreamWriter(stream); + formatter.Format(new LogEvent(_dateTimeOffset, LogEventLevel.Debug, null, + new MessageTemplate("hello world {Number}", + [new PropertyToken("Number", "{Number}")]), + [ + new LogEventProperty("HelloWorld", new ScalarValue("world")), + new LogEventProperty("Number", new ScalarValue(123)), + ], + ActivityTraceId.CreateFromString("3653d3ec94d045b9850794a08a4b286f".AsSpan()), + ActivitySpanId.CreateFromString("fcfb4c32a12a3532".AsSpan())), writer); + string message = Encoding.UTF8.GetString(stream.ToArray()); + Assert.Equal( + """{"timestamp":"1970-01-01T00:00:00.0000000\u002B00:00","level":"Debug","messageTemplate":"hello world {Number}","renderedMessage":"123","traceId":"3653d3ec94d045b9850794a08a4b286f","spanId":"fcfb4c32a12a3532","properties":{"helloWorld":"world","number":123}}""", + message); + } + + [Fact] + public void DoesNotThrowError() + { + var formatter = + new Utf8JsonFormatter(null, true); + using var stream = new MemoryStream(); + using var writer = new StreamWriter(stream); + formatter.Format(new LogEvent(_dateTimeOffset, LogEventLevel.Debug, null, + new MessageTemplate("hello world {Number}", + [new PropertyToken("Number", "{Number}")]), + [ + new LogEventProperty("HelloWorld", new ScalarValue("world")), + new LogEventProperty("Number", new ScalarValue(123)), + ], + ActivityTraceId.CreateFromString("3653d3ec94d045b9850794a08a4b286f".AsSpan()), + ActivitySpanId.CreateFromString("fcfb4c32a12a3532".AsSpan())), writer); + writer.Flush(); + string message = Encoding.UTF8.GetString(stream.ToArray()); #if DEBUG - _output.WriteLine(message); + _output.WriteLine(message); #endif - Helpers.AssertValidJson(message); - } - } + Helpers.AssertValidJson(message); + } - [Fact] - public void ExpressionTemplate() - { - var formatter = - new ExpressionTemplate( - "{ {Timestamp:@t,Level:@l,MessageTemplate:@mt,RenderedMessage:@m,TraceId:@tr,SpanId:@sp,Exception:@x,Properties:@p} }"); - var sb = new MemoryStream(); - using (var writer = new StreamWriter(sb)) - { - formatter.Format(new LogEvent(_dateTimeOffset, LogEventLevel.Debug, null, - new MessageTemplate("hello world {Number}", - new List { new PropertyToken("Number", "{Number}") }.AsReadOnly()), - new List - { - new LogEventProperty("HelloWorld", new ScalarValue("world")), - new LogEventProperty("Number", new ScalarValue(123)), - }.AsReadOnly(), - ActivityTraceId.CreateFromString("3653d3ec94d045b9850794a08a4b286f".AsSpan()), - ActivitySpanId.CreateFromString("fcfb4c32a12a3532".AsSpan())), writer); - writer.Flush(); - string message = Encoding.UTF8.GetString(sb.ToArray()); + [Fact] + public void ExpressionTemplate() + { + var formatter = + new ExpressionTemplate( + "{ {Timestamp:@t,Level:@l,MessageTemplate:@mt,RenderedMessage:@m,TraceId:@tr,SpanId:@sp,Exception:@x,Properties:@p} }"); + var sb = new MemoryStream(); + using var writer = new StreamWriter(sb); + formatter.Format(new LogEvent(_dateTimeOffset, LogEventLevel.Debug, null, + new MessageTemplate("hello world {Number}", + [new PropertyToken("Number", "{Number}")]), + [ + new LogEventProperty("HelloWorld", new ScalarValue("world")), + new LogEventProperty("Number", new ScalarValue(123)), + ], + ActivityTraceId.CreateFromString("3653d3ec94d045b9850794a08a4b286f".AsSpan()), + ActivitySpanId.CreateFromString("fcfb4c32a12a3532".AsSpan())), writer); + writer.Flush(); + string message = Encoding.UTF8.GetString(sb.ToArray()); #if DEBUG - _output.WriteLine(message); + _output.WriteLine(message); #endif - Helpers.AssertValidJson(message); - } - } + Helpers.AssertValidJson(message); + } - [Fact] - public void FormatTest() - { - var formatter = new Utf8JsonFormatter(""); - using (var stream = new MemoryStream()) - using (var writer = new StreamWriter(stream)) - { - formatter.Format(new LogEvent(_dateTimeOffset, LogEventLevel.Debug, null, - new MessageTemplate("hello world", new List().AsReadOnly()), - new List { new LogEventProperty("hello", new ScalarValue("world")) } - .AsReadOnly(), - ActivityTraceId.CreateFromString("3653d3ec94d045b9850794a08a4b286f".AsSpan()), - ActivitySpanId.CreateFromString("fcfb4c32a12a3532".AsSpan())), writer); - writer.Flush(); - Assert.Equal( - @"{""Timestamp"":""1970-01-01T00:00:00.0000000\u002B00:00"",""Level"":""Debug"",""MessageTemplate"":""hello world"",""TraceId"":""3653d3ec94d045b9850794a08a4b286f"",""SpanId"":""fcfb4c32a12a3532"",""Properties"":{""hello"":""world""}}", - Encoding.UTF8.GetString(stream.ToArray())); - } - } + [Fact] + public void FormatTest() + { + var formatter = new Utf8JsonFormatter(""); + using var stream = new MemoryStream(); + using var writer = new StreamWriter(stream); + formatter.Format(new LogEvent(_dateTimeOffset, LogEventLevel.Debug, null, + new MessageTemplate("hello world", []), + [new LogEventProperty("hello", new ScalarValue("world"))] + , + ActivityTraceId.CreateFromString("3653d3ec94d045b9850794a08a4b286f".AsSpan()), + ActivitySpanId.CreateFromString("fcfb4c32a12a3532".AsSpan())), writer); + writer.Flush(); + Assert.Equal( + """{"Timestamp":"1970-01-01T00:00:00.0000000\u002B00:00","Level":"Debug","MessageTemplate":"hello world","TraceId":"3653d3ec94d045b9850794a08a4b286f","SpanId":"fcfb4c32a12a3532","Properties":{"hello":"world"}}""", + Encoding.UTF8.GetString(stream.ToArray())); + } - [Fact] - public void NullParameterShouldThrow() - { - var formatter = new Utf8JsonFormatter(); - // ReSharper disable AssignNullToNotNullAttribute - Assert.Throws(() => formatter.Format(null, new StringWriter())); - Assert.Throws(() => formatter.Format(Some.LogEvent(), null)); - // ReSharper restore AssignNullToNotNullAttribute - } + [Fact] + public void NullParameterShouldThrow() + { + var formatter = new Utf8JsonFormatter(); + // ReSharper disable AssignNullToNotNullAttribute + Assert.Throws(() => formatter.Format(null, new StringWriter())); + Assert.Throws(() => formatter.Format(Some.LogEvent(), null)); + // ReSharper restore AssignNullToNotNullAttribute + } - [Fact] - public void UseAfterDisposeShouldThrow() - { - var formatter = new Utf8JsonFormatter(); - // init lazy resources - formatter.Format(Some.LogEvent(), new StringWriter()); - formatter.Dispose(); - Assert.Throws(() => formatter.Format(Some.LogEvent(), new StringWriter())); - } + [Fact] + public void UseAfterDisposeShouldThrow() + { + var formatter = new Utf8JsonFormatter(); + // init lazy resources + formatter.Format(Some.LogEvent(), new StringWriter()); + formatter.Dispose(); + Assert.Throws(() => formatter.Format(Some.LogEvent(), new StringWriter())); + } - [Fact] - public void WithException() - { - var formatter = - new Utf8JsonFormatter(null, true); - using (var stream = new MemoryStream()) - using (var writer = new StreamWriter(stream)) - { - formatter.Format(new LogEvent(_dateTimeOffset, LogEventLevel.Debug, new AggregateException( - new Exception("test"), new InvalidOperationException("test2", new ArgumentException("test3") - { - Data = { ["test"] = "test2" }, - }), new Exception("test"), new InvalidOperationException("test2", - new ArgumentException("test3") - { - Data = { ["test"] = "test2" }, - }), new Exception("test"), new InvalidOperationException("test2", - new ArgumentException("test3") - { - Data = { ["test"] = "test2" }, - }), new Exception("test"), new InvalidOperationException("test2", - new ArgumentException("test3") - { - Data = { ["test"] = "test2" }, - }), new Exception("test"), new InvalidOperationException("test2", - new ArgumentException("test3") - { - Data = { ["test"] = "test2" }, - }), new Exception("test"), new InvalidOperationException("test2", - new ArgumentException("test3") - { - Data = { ["test"] = "test2" }, - }), new Exception("test"), new InvalidOperationException("test2", - new ArgumentException("test3") - { - Data = { ["test"] = "test2" }, - }), new Exception("test"), new InvalidOperationException("test2", - new ArgumentException("test3") - { - Data = { ["test"] = "test2" }, - })), - new MessageTemplate("hello world", new List().AsReadOnly()), - new List { new LogEventProperty("hello", new ScalarValue("world")) } - .AsReadOnly(), - ActivityTraceId.CreateFromString("3653d3ec94d045b9850794a08a4b286f".AsSpan()), - ActivitySpanId.CreateFromString("fcfb4c32a12a3532".AsSpan())), writer); - writer.Flush(); - string message = Encoding.UTF8.GetString(stream.ToArray()); + [Fact] + public void WithException() + { + var formatter = + new Utf8JsonFormatter(null, true); + using var stream = new MemoryStream(); + using var writer = new StreamWriter(stream); + formatter.Format(new LogEvent(_dateTimeOffset, LogEventLevel.Debug, new AggregateException( + new Exception("test"), new InvalidOperationException("test2", new ArgumentException("test3") + { + Data = { ["test"] = "test2" }, + }), new Exception("test"), new InvalidOperationException("test2", + new ArgumentException("test3") + { + Data = { ["test"] = "test2" }, + }), new Exception("test"), new InvalidOperationException("test2", + new ArgumentException("test3") + { + Data = { ["test"] = "test2" }, + }), new Exception("test"), new InvalidOperationException("test2", + new ArgumentException("test3") + { + Data = { ["test"] = "test2" }, + }), new Exception("test"), new InvalidOperationException("test2", + new ArgumentException("test3") + { + Data = { ["test"] = "test2" }, + }), new Exception("test"), new InvalidOperationException("test2", + new ArgumentException("test3") + { + Data = { ["test"] = "test2" }, + }), new Exception("test"), new InvalidOperationException("test2", + new ArgumentException("test3") + { + Data = { ["test"] = "test2" }, + }), new Exception("test"), new InvalidOperationException("test2", + new ArgumentException("test3") + { + Data = { ["test"] = "test2" }, + })), + new MessageTemplate("hello world", []), + [new LogEventProperty("hello", new ScalarValue("world"))] + , + ActivityTraceId.CreateFromString("3653d3ec94d045b9850794a08a4b286f".AsSpan()), + ActivitySpanId.CreateFromString("fcfb4c32a12a3532".AsSpan())), writer); + writer.Flush(); + string message = Encoding.UTF8.GetString(stream.ToArray()); #if DEBUG - _output.WriteLine(message); + _output.WriteLine(message); #endif - Helpers.AssertValidJson(message); - } - } + Helpers.AssertValidJson(message); + } #if DEBUG - public Utf8JsonFormatterTests(ITestOutputHelper output) - { - _output = output; - } + public Utf8JsonFormatterTests(ITestOutputHelper output) + { + _output = output; + } - private readonly ITestOutputHelper _output; + private readonly ITestOutputHelper _output; #endif #if FEATURE_JSON_NAMING_POLICY - [Fact] - public void KebabCaseLower() - { - var formatter = - new Utf8JsonFormatter("", true, null, 64, true, JsonNamingPolicy.KebabCaseLower); - using (var stream = new MemoryStream()) - using (var writer = new StreamWriter(stream)) - { - formatter.Format(new LogEvent(_dateTimeOffset, LogEventLevel.Debug, null, - new MessageTemplate("hello world {Number}", - new List { new PropertyToken("Number", "{Number}") }.AsReadOnly()), - new List - { - new LogEventProperty("HelloWorld", new ScalarValue("world")), - new LogEventProperty("Number", new ScalarValue(123)), - }.AsReadOnly(), - ActivityTraceId.CreateFromString("3653d3ec94d045b9850794a08a4b286f"), - ActivitySpanId.CreateFromString("fcfb4c32a12a3532")), writer); - writer.Flush(); - string message = Encoding.UTF8.GetString(stream.ToArray().AsSpan()); - Assert.Equal( - @"{""timestamp"":""1970-01-01T00:00:00.0000000\u002B00:00"",""level"":""Debug"",""message-template"":""hello world {Number}"",""rendered-message"":""123"",""trace-id"":""3653d3ec94d045b9850794a08a4b286f"",""span-id"":""fcfb4c32a12a3532"",""properties"":{""hello-world"":""world"",""number"":123}}", - message); - } - } - - [Fact] - public void SnakeCaseLower() - { - var formatter = - new Utf8JsonFormatter("", true, null, 64, true, JsonNamingPolicy.SnakeCaseLower); - using (var stream = new MemoryStream()) - using (var writer = new StreamWriter(stream)) - { - formatter.Format(new LogEvent(_dateTimeOffset, LogEventLevel.Debug, null, - new MessageTemplate("hello world {Number}", - new List { new PropertyToken("Number", "{Number}") }.AsReadOnly()), - new List - { - new LogEventProperty("HelloWorld", new ScalarValue("world")), - new LogEventProperty("Number", new ScalarValue(123)), - }.AsReadOnly(), - ActivityTraceId.CreateFromString("3653d3ec94d045b9850794a08a4b286f"), - ActivitySpanId.CreateFromString("fcfb4c32a12a3532")), writer); - writer.Flush(); - string message = Encoding.UTF8.GetString(stream.ToArray().AsSpan()); - Assert.Equal( - @"{""timestamp"":""1970-01-01T00:00:00.0000000\u002B00:00"",""level"":""Debug"",""message_template"":""hello world {Number}"",""rendered_message"":""123"",""trace_id"":""3653d3ec94d045b9850794a08a4b286f"",""span_id"":""fcfb4c32a12a3532"",""properties"":{""hello_world"":""world"",""number"":123}}", - message); - } - } + [Fact] + public void KebabCaseLower() + { + var formatter = + new Utf8JsonFormatter("", true, null, 64, true, JsonNamingPolicy.KebabCaseLower); + using var stream = new MemoryStream(); + using var writer = new StreamWriter(stream); + formatter.Format(new LogEvent(_dateTimeOffset, LogEventLevel.Debug, null, + new MessageTemplate("hello world {Number}", + [new PropertyToken("Number", "{Number}")]), + [ + new LogEventProperty("HelloWorld", new ScalarValue("world")), + new LogEventProperty("Number", new ScalarValue(123)), + ], + ActivityTraceId.CreateFromString("3653d3ec94d045b9850794a08a4b286f"), + ActivitySpanId.CreateFromString("fcfb4c32a12a3532")), writer); + writer.Flush(); + string message = Encoding.UTF8.GetString(stream.ToArray().AsSpan()); + Assert.Equal( + """{"timestamp":"1970-01-01T00:00:00.0000000\u002B00:00","level":"Debug","message-template":"hello world {Number}","rendered-message":"123","trace-id":"3653d3ec94d045b9850794a08a4b286f","span-id":"fcfb4c32a12a3532","properties":{"hello-world":"world","number":123}}""", + message); + } - [Fact] - public void SnakeCaseUpper() - { - var formatter = - new Utf8JsonFormatter("", true, null, 64, true, JsonNamingPolicy.SnakeCaseUpper); - using (var stream = new MemoryStream()) - using (var writer = new StreamWriter(stream)) - { - formatter.Format(new LogEvent(_dateTimeOffset, LogEventLevel.Debug, null, - new MessageTemplate("hello world {Number}", - new List { new PropertyToken("Number", "{Number}") }.AsReadOnly()), - new List - { - new LogEventProperty("HelloWorld", new ScalarValue("world")), - new LogEventProperty("Number", new ScalarValue(123)), - }.AsReadOnly(), - ActivityTraceId.CreateFromString("3653d3ec94d045b9850794a08a4b286f"), - ActivitySpanId.CreateFromString("fcfb4c32a12a3532")), writer); - writer.Flush(); - string message = Encoding.UTF8.GetString(stream.ToArray().AsSpan()); - Assert.Equal( - @"{""TIMESTAMP"":""1970-01-01T00:00:00.0000000\u002B00:00"",""LEVEL"":""Debug"",""MESSAGE_TEMPLATE"":""hello world {Number}"",""RENDERED_MESSAGE"":""123"",""TRACE_ID"":""3653d3ec94d045b9850794a08a4b286f"",""SPAN_ID"":""fcfb4c32a12a3532"",""PROPERTIES"":{""HELLO_WORLD"":""world"",""NUMBER"":123}}", - message); - } - } -#endif + [Fact] + public void SnakeCaseLower() + { + var formatter = + new Utf8JsonFormatter("", true, null, 64, true, JsonNamingPolicy.SnakeCaseLower); + using var stream = new MemoryStream(); + using var writer = new StreamWriter(stream); + formatter.Format(new LogEvent(_dateTimeOffset, LogEventLevel.Debug, null, + new MessageTemplate("hello world {Number}", + [new PropertyToken("Number", "{Number}")]), + [ + new LogEventProperty("HelloWorld", new ScalarValue("world")), + new LogEventProperty("Number", new ScalarValue(123)), + ], + ActivityTraceId.CreateFromString("3653d3ec94d045b9850794a08a4b286f"), + ActivitySpanId.CreateFromString("fcfb4c32a12a3532")), writer); + writer.Flush(); + string message = Encoding.UTF8.GetString(stream.ToArray().AsSpan()); + Assert.Equal( + """{"timestamp":"1970-01-01T00:00:00.0000000\u002B00:00","level":"Debug","message_template":"hello world {Number}","rendered_message":"123","trace_id":"3653d3ec94d045b9850794a08a4b286f","span_id":"fcfb4c32a12a3532","properties":{"hello_world":"world","number":123}}""", + message); } - [Serializable] - public class ThreadSafetyParams + [Fact] + public void SnakeCaseUpper() { - [NonSerialized] - private ITextFormatter _formatter; + var formatter = + new Utf8JsonFormatter("", true, null, 64, true, JsonNamingPolicy.SnakeCaseUpper); + using var stream = new MemoryStream(); + using var writer = new StreamWriter(stream); + formatter.Format(new LogEvent(_dateTimeOffset, LogEventLevel.Debug, null, + new MessageTemplate("hello world {Number}", + [new PropertyToken("Number", "{Number}")]), + [ + new LogEventProperty("HelloWorld", new ScalarValue("world")), + new LogEventProperty("Number", new ScalarValue(123)), + ], + ActivityTraceId.CreateFromString("3653d3ec94d045b9850794a08a4b286f"), + ActivitySpanId.CreateFromString("fcfb4c32a12a3532")), writer); + writer.Flush(); + string message = Encoding.UTF8.GetString(stream.ToArray().AsSpan()); + Assert.Equal( + """{"TIMESTAMP":"1970-01-01T00:00:00.0000000\u002B00:00","LEVEL":"Debug","MESSAGE_TEMPLATE":"hello world {Number}","RENDERED_MESSAGE":"123","TRACE_ID":"3653d3ec94d045b9850794a08a4b286f","SPAN_ID":"fcfb4c32a12a3532","PROPERTIES":{"HELLO_WORLD":"world","NUMBER":123}}""", + message); + } +#endif +} - public int Threads { get; set; } +[Serializable] +public class ThreadSafetyParams +{ + [NonSerialized] + private ITextFormatter _formatter; - public int Iterations { get; set; } - public string Name => Formatter.GetType().Name; + public int Threads { get; set; } + public int Iterations { get; set; } + public string Name => Formatter.GetType().Name; - public ITextFormatter Formatter - { - get => _formatter; - set => _formatter = value; - } - public ThreadSafetyParams(ITextFormatter formatter, int iterations, int threads) - { - Formatter = formatter; - Iterations = iterations; - Threads = threads; - } + public ITextFormatter Formatter + { + get => _formatter; + set => _formatter = value; + } + + public ThreadSafetyParams(ITextFormatter formatter, int iterations, int threads) + { + Formatter = formatter; + Iterations = iterations; + Threads = threads; } } diff --git a/test/Serilog.Extensions.Formatting.Test/packages.lock.json b/test/Serilog.Extensions.Formatting.Test/packages.lock.json index bf6fed3..725bd26 100644 --- a/test/Serilog.Extensions.Formatting.Test/packages.lock.json +++ b/test/Serilog.Extensions.Formatting.Test/packages.lock.json @@ -17,38 +17,6 @@ "Microsoft.TestPlatform.ObjectModel": "17.10.0" } }, - "Microsoft.Extensions.Hosting": { - "type": "Direct", - "requested": "[8.0.1, )", - "resolved": "8.0.1", - "contentHash": "bP9EEkHBEfjgYiG8nUaXqMk/ujwJrffOkNPP7onpRMO8R+OUSESSP4xHkCAXgYZ1COP2Q9lXlU5gkMFh20gRuw==", - "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.Binder": "8.0.2", - "Microsoft.Extensions.Configuration.CommandLine": "8.0.0", - "Microsoft.Extensions.Configuration.EnvironmentVariables": "8.0.0", - "Microsoft.Extensions.Configuration.FileExtensions": "8.0.1", - "Microsoft.Extensions.Configuration.Json": "8.0.1", - "Microsoft.Extensions.Configuration.UserSecrets": "8.0.1", - "Microsoft.Extensions.DependencyInjection": "8.0.1", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Diagnostics": "8.0.1", - "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "Microsoft.Extensions.FileProviders.Physical": "8.0.0", - "Microsoft.Extensions.Hosting.Abstractions": "8.0.1", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging.Configuration": "8.0.1", - "Microsoft.Extensions.Logging.Console": "8.0.1", - "Microsoft.Extensions.Logging.Debug": "8.0.1", - "Microsoft.Extensions.Logging.EventLog": "8.0.1", - "Microsoft.Extensions.Logging.EventSource": "8.0.1", - "Microsoft.Extensions.Options": "8.0.2", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, "Microsoft.NET.Test.Sdk": { "type": "Direct", "requested": "[17.11.1, )", @@ -68,6 +36,12 @@ "System.Threading.Tasks.Extensions": "4.5.4" } }, + "PolySharp": { + "type": "Direct", + "requested": "[1.14.1, )", + "resolved": "1.14.1", + "contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ==" + }, "Serilog.Expressions": { "type": "Direct", "requested": "[5.0.0, )", @@ -92,11 +66,11 @@ }, "Serilog.Sinks.Async": { "type": "Direct", - "requested": "[2.0.0, )", - "resolved": "2.0.0", - "contentHash": "a+kTyUUxPAOZWKJiNbDqCPMiP0BWBWzObyTpRmGLrgCecgc/YJ+HqYGjsQoS6Sj9cRVXB9hH5O1mTZ0DiewG2w==", + "requested": "[2.1.0, )", + "resolved": "2.1.0", + "contentHash": "SnmRknWsSMgyo9wDXeZZCqSp48kkQYy44taSM6vcpxfiRICzSf09oLKEmVr0RCwQnfd8mJQ2WNN6nvhqf0RowQ==", "dependencies": { - "Serilog": "4.0.0" + "Serilog": "4.1.0" } }, "Serilog.Sinks.Console": { @@ -117,41 +91,6 @@ "Serilog": "4.0.0" } }, - "System.Collections.Immutable": { - "type": "Direct", - "requested": "[8.0.0, )", - "resolved": "8.0.0", - "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==", - "dependencies": { - "System.Memory": "4.5.5", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "System.Reflection.Metadata": { - "type": "Direct", - "requested": "[8.0.1, )", - "resolved": "8.0.1", - "contentHash": "+4sz5vGHPlo+5NpAxf2IlABnqVvOHOxv17b4dONv4hVwyNeFAeBevT14DIn7X3YWQ+eQFYO3YeTBNCleAblOKA==", - "dependencies": { - "System.Collections.Immutable": "8.0.0", - "System.Memory": "4.5.5" - } - }, - "System.Text.Json": { - "type": "Direct", - "requested": "[8.0.5, )", - "resolved": "8.0.5", - "contentHash": "0f1B50Ss7rqxXiaBJyzUu9bWFOO2/zSlifZ/UNMdiIpDYe4cY4LQQicP4nirK1OS31I43rn062UIJ1Q9bpmHpg==", - "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "System.Buffers": "4.5.1", - "System.Memory": "4.5.5", - "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "8.0.0", - "System.Threading.Tasks.Extensions": "4.5.4", - "System.ValueTuple": "4.5.0" - } - }, "xunit": { "type": "Direct", "requested": "[2.9.2, )", @@ -179,8 +118,8 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==", + "resolved": "9.0.0", + "contentHash": "owmu2Cr3IQ8yQiBleBHlGk8dSQ12oaF2e7TpzwJKEl4m84kkZJjEY1n33L67Y3zM5jPOjmmbdHjbfiL0RqcMRQ==", "dependencies": { "System.Threading.Tasks.Extensions": "4.5.4" } @@ -190,15 +129,6 @@ "resolved": "17.11.1", "contentHash": "nPJqrcA5iX+Y0kqoT3a+pD/8lrW/V7ayqnEJQsTonSoPz59J8bmoQhcSN4G8+UJ64Hkuf0zuxnfuj2lkHOq4cA==" }, - "Microsoft.Extensions.Configuration": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "0J/9YNXTMWSZP2p2+nvl8p71zpSwokZXZuJW+VjdErkegAnFdO1XlqtA62SJtgVYHdKu3uPxJHcMR/r35HwFBA==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, "Microsoft.Extensions.Configuration.Abstractions": { "type": "Transitive", "resolved": "8.0.0", @@ -208,105 +138,34 @@ "System.ValueTuple": "4.5.0" } }, - "Microsoft.Extensions.Configuration.Binder": { - "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "7IQhGK+wjyGrNsPBjJcZwWAr+Wf6D4+TwOptUt77bWtgNkiV8tDEbhFS+dDamtQFZ2X7kWG9m71iZQRj2x3zgQ==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0" - } - }, - "Microsoft.Extensions.Configuration.CommandLine": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "NZuZMz3Q8Z780nKX3ifV1fE7lS+6pynDHK71OfU4OZ1ItgvDOhyOC7E6z+JMZrAj63zRpwbdldYFk499t3+1dQ==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0" - } - }, - "Microsoft.Extensions.Configuration.EnvironmentVariables": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "plvZ0ZIpq+97gdPNNvhwvrEZ92kNml9hd1pe3idMA7svR0PztdzVLkoWLcRFgySYXUJc3kSM3Xw3mNFMo/bxRA==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0" - } - }, - "Microsoft.Extensions.Configuration.FileExtensions": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "EJzSNO9oaAXnTdtdNO6npPRsIIeZCBSNmdQ091VDO7fBiOtJAAeEq6dtrVXIi3ZyjC5XRSAtVvF8SzcneRHqKQ==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "Microsoft.Extensions.FileProviders.Physical": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Configuration.Json": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "L89DLNuimOghjV3tLx0ArFDwVEJD6+uGB3BMCMX01kaLzXkaXHb2021xOMl2QOxUxbdePKUZsUY7n2UUkycjRg==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.FileExtensions": "8.0.1", - "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "System.Text.Json": "8.0.5" - } - }, - "Microsoft.Extensions.Configuration.UserSecrets": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "7tYqdPPpAK+3jO9d5LTuCK2VxrEdf85Ol4trUr6ds4jclBecadWZ/RyPCbNjfbN5iGTfUnD/h65TOQuqQv2c+A==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.Json": "8.0.1", - "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "Microsoft.Extensions.FileProviders.Physical": "8.0.0" - } - }, "Microsoft.Extensions.DependencyInjection": { "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "BmANAnR5Xd4Oqw7yQ75xOAYODybZQRzdeNucg7kS5wWKd2PNnMdYtJ2Vciy0QLylRmv42DGl5+AFL9izA6F1Rw==", + "resolved": "8.0.0", + "contentHash": "V8S3bsm50ig6JSyrbcJJ8bW2b9QLGouz+G1miK3UTaOWmMtFwNNNzUf4AleyDWUmTrWMLNnFSLEQtxmxgNQnNQ==", "dependencies": { "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, "Microsoft.Extensions.DependencyInjection.Abstractions": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "3iE7UF7MQkCv1cxzCahz+Y/guQbTqieyxyaWKhrRO91itI9cOKO76OHeQDahqG4MmW5umr3CcCvGmK92lWNlbg==", + "resolved": "8.0.0", + "contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==", "dependencies": { "Microsoft.Bcl.AsyncInterfaces": "8.0.0", "System.Threading.Tasks.Extensions": "4.5.4" } }, - "Microsoft.Extensions.Diagnostics": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "doVPCUUCY7c6LhBsEfiy3W1bvS7Mi6LkfQMS8nlC22jZWNxBv8VO8bdfeyvpYFst6Kxqk7HBC6lytmEoBssvSQ==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Diagnostics.Abstractions": "8.0.1", - "Microsoft.Extensions.Options.ConfigurationExtensions": "8.0.0" - } - }, "Microsoft.Extensions.Diagnostics.Abstractions": { "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "elH2vmwNmsXuKmUeMQ4YW9ldXiF+gSGDgg1vORksob5POnpaI6caj1Hu8zaYbEuibhqCoWg0YRWDazBY3zjBfg==", + "resolved": "8.0.0", + "contentHash": "JHYCQG7HmugNYUhOl368g+NMxYE/N/AiclCYRNlgCY9eVyiBkOHMwK4x60RYMxv9EL3+rmj1mqHvdCiPpC+D4Q==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2", + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0", "System.Buffers": "4.5.1", - "System.Diagnostics.DiagnosticSource": "8.0.1", + "System.Diagnostics.DiagnosticSource": "8.0.0", "System.Memory": "4.5.5" } }, @@ -318,135 +177,53 @@ "Microsoft.Extensions.Primitives": "8.0.0" } }, - "Microsoft.Extensions.FileProviders.Physical": { + "Microsoft.Extensions.Hosting.Abstractions": { "type": "Transitive", "resolved": "8.0.0", - "contentHash": "UboiXxpPUpwulHvIAVE36Knq0VSHaAmfrFkegLyBZeaADuKezJ/AIXYAW8F5GBlGk/VaibN2k/Zn1ca8YAfVdA==", + "contentHash": "AG7HWwVRdCHlaA++1oKDxLsXIBxmDpMPb3VoyOoAghEWnkUvEAdYQUwnV4jJbAaa/nMYNiEh5ByoLauZBEiovg==", "dependencies": { + "Microsoft.Bcl.AsyncInterfaces": "8.0.0", + "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Diagnostics.Abstractions": "8.0.0", "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "Microsoft.Extensions.FileSystemGlobbing": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" + "Microsoft.Extensions.Logging.Abstractions": "8.0.0", + "System.Threading.Tasks.Extensions": "4.5.4" } }, - "Microsoft.Extensions.FileSystemGlobbing": { + "Microsoft.Extensions.Logging": { "type": "Transitive", "resolved": "8.0.0", - "contentHash": "OK+670i7esqlQrPjdIKRbsyMCe9g5kSLpRRQGSr4Q58AOYEe/hCnfLZprh7viNisSUUQZmMrbbuDaIrP+V1ebQ==" - }, - "Microsoft.Extensions.Hosting.Abstractions": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "nHwq9aPBdBPYXPti6wYEEfgXddfBrYC+CQLn+qISiwQq5tpfaqDZSKOJNxoe9rfQxGf1c+2wC/qWFe1QYJPYqw==", + "contentHash": "tvRkov9tAJ3xP51LCv3FJ2zINmv1P8Hi8lhhtcKGqM+ImiTCC84uOPEI4z8Cdq2C3o9e+Aa0Gw0rmrsJD77W+w==", "dependencies": { "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Diagnostics.Abstractions": "8.0.1", - "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "System.Threading.Tasks.Extensions": "4.5.4" + "Microsoft.Extensions.DependencyInjection": "8.0.0", + "Microsoft.Extensions.Logging.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0", + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.ValueTuple": "4.5.0" } }, "Microsoft.Extensions.Logging.Abstractions": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "nroMDjS7hNBPtkZqVBbSiQaQjWRDxITI8Y7XnDs97rqG3EbzVTNLZQf7bIeUJcaHOV8bca47s1Uxq94+2oGdxA==", + "resolved": "8.0.0", + "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", "System.Buffers": "4.5.1", - "System.Diagnostics.DiagnosticSource": "8.0.1", "System.Memory": "4.5.5" } }, - "Microsoft.Extensions.Logging.Configuration": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "QWwTrsgOnJMmn+XUslm8D2H1n3PkP/u/v52FODtyBc/k4W9r3i2vcXXeeX/upnzllJYRRbrzVzT0OclfNJtBJA==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.Binder": "8.0.2", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2", - "Microsoft.Extensions.Options.ConfigurationExtensions": "8.0.0" - } - }, - "Microsoft.Extensions.Logging.Console": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "uzcg/5U2eLyn5LIKlERkdSxw6VPC1yydnOSQiRRWGBGN3kphq3iL4emORzrojScDmxRhv49gp5BI8U3Dz7y4iA==", - "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging.Configuration": "8.0.1", - "Microsoft.Extensions.Options": "8.0.2", - "System.Buffers": "4.5.1", - "System.Text.Json": "8.0.5" - } - }, - "Microsoft.Extensions.Logging.Debug": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "B8hqNuYudC2RB+L/DI33uO4rf5by41fZVdcVL2oZj0UyoAZqnwTwYHp1KafoH4nkl1/23piNeybFFASaV2HkFg==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2" - } - }, - "Microsoft.Extensions.Logging.EventLog": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "ZD1m4GXoxcZeDJIq8qePKj+QAWeQNO/OG8skvrOG8RQfxLp9MAKRoliTc27xanoNUzeqvX5HhS/I7c0BvwAYUg==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2" - } - }, - "Microsoft.Extensions.Logging.EventSource": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "YMXMAla6B6sEf/SnfZYTty633Ool3AH7KOw2LOaaEqwSo2piK4f7HMtzyc3CNiipDnq1fsUSuG5Oc7ZzpVy8WQ==", - "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2", - "Microsoft.Extensions.Primitives": "8.0.0", - "System.Memory": "4.5.5", - "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Json": "8.0.5" - } - }, "Microsoft.Extensions.Options": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "dWGKvhFybsaZpGmzkGCbNNwBD1rVlWzrZKANLW/CcbFJpCEceMCGzT7zZwHOGBCbwM0SzBuceMj5HN1LKV1QqA==", + "resolved": "8.0.0", + "contentHash": "JOVOfqpnqlVLUzINQ2fox8evY2SKLYJ3BV8QDe/Jyp21u1T7r45x/R/5QdteURMR5r01GxeJSBBUOCOyaNXA3g==", "dependencies": { "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", "Microsoft.Extensions.Primitives": "8.0.0", "System.ValueTuple": "4.5.0" } }, - "Microsoft.Extensions.Options.ConfigurationExtensions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "0f4DMRqEd50zQh+UyJc+/HiBsZ3vhAQALgdkcQEalSH1L2isdC7Yj54M3cyo5e+BeO5fcBQ7Dxly8XiBBcvRgw==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.Binder": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, "Microsoft.Extensions.Primitives": { "type": "Transitive", "resolved": "8.0.0", @@ -487,6 +264,16 @@ "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, + "System.IO.Pipelines": { + "type": "Transitive", + "resolved": "9.0.0", + "contentHash": "eA3cinogwaNB4jdjQHOP3Z3EuyiDII7MT35jgtnsA4vkn0LUrrSHsU0nzHTzFzmaFYeKV7MYyMxOocFzsBHpTw==", + "dependencies": { + "System.Buffers": "4.5.1", + "System.Memory": "4.5.5", + "System.Threading.Tasks.Extensions": "4.5.4" + } + }, "System.Memory": { "type": "Transitive", "resolved": "4.5.5", @@ -509,8 +296,8 @@ }, "System.Text.Encodings.Web": { "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", + "resolved": "9.0.0", + "contentHash": "e2hMgAErLbKyUUwt18qSBf9T5Y+SFAL3ZedM8fLupkVj8Rj2PZ9oxQ37XX2LF8fTO1wNIxvKpihD7Of7D/NxZw==", "dependencies": { "System.Buffers": "4.5.1", "System.Memory": "4.5.5", @@ -581,32 +368,54 @@ "Alexaka1.Serilog.Extensions.Formatting": { "type": "Project", "dependencies": { - "Serilog": "[4.0.2, )", - "System.Text.Json": "[8.0.5, )" + "Serilog": "[4.1.0, )", + "System.Text.Json": "[9.0.0, )" } }, - "Microsoft.Extensions.Logging": { + "Serilog": { "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "8.0.1", - "contentHash": "4x+pzsQEbqxhNf1QYRr5TDkLP9UsLT3A6MdRKDDEgrW7h1ljiEPgTNhKYUhNCCAaVpQECVQ+onA91PTPnIp6Lw==", + "requested": "[4.1.0, )", + "resolved": "4.1.0", + "contentHash": "u1aZI8HZ62LWlq5dZLFwm6jMax/sUwnWZSw5lkPsCt518cJBxFKoNmc7oSxe5aA5BgSkzy9rzwFGR/i/acnSPw==", "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "Microsoft.Extensions.DependencyInjection": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2", "System.Diagnostics.DiagnosticSource": "8.0.1", - "System.ValueTuple": "4.5.0" + "System.Threading.Channels": "8.0.0" } }, - "Serilog": { + "System.Collections.Immutable": { "type": "CentralTransitive", - "requested": "[4.0.2, )", - "resolved": "4.0.2", - "contentHash": "Vehq4uNYtURe/OnHEpWGvMgrvr5Vou7oZLdn3BuEH5FSCeHXDpNJtpzWoqywXsSvCTuiv0I65mZDRnJSeUvisA==", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w==", "dependencies": { - "System.Diagnostics.DiagnosticSource": "8.0.1", - "System.Threading.Channels": "8.0.0" + "System.Memory": "4.5.5", + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "System.Reflection.Metadata": { + "type": "CentralTransitive", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "ANiqLu3DxW9kol/hMmTWbt3414t9ftdIuiIU7j80okq2YzAueo120M442xk1kDJWtmZTqWQn7wHDvMRipVOEOQ==", + "dependencies": { + "System.Collections.Immutable": "9.0.0", + "System.Memory": "4.5.5" + } + }, + "System.Text.Json": { + "type": "CentralTransitive", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "js7+qAu/9mQvnhA4EfGMZNEzXtJCDxgkgj8ohuxq/Qxv+R56G+ljefhiJHOxTNiw54q8vmABCWUwkMulNdlZ4A==", + "dependencies": { + "Microsoft.Bcl.AsyncInterfaces": "9.0.0", + "System.Buffers": "4.5.1", + "System.IO.Pipelines": "9.0.0", + "System.Memory": "4.5.5", + "System.Runtime.CompilerServices.Unsafe": "6.0.0", + "System.Text.Encodings.Web": "9.0.0", + "System.Threading.Tasks.Extensions": "4.5.4", + "System.ValueTuple": "4.5.0" } } }, @@ -626,38 +435,6 @@ "Microsoft.TestPlatform.ObjectModel": "17.10.0" } }, - "Microsoft.Extensions.Hosting": { - "type": "Direct", - "requested": "[8.0.1, )", - "resolved": "8.0.1", - "contentHash": "bP9EEkHBEfjgYiG8nUaXqMk/ujwJrffOkNPP7onpRMO8R+OUSESSP4xHkCAXgYZ1COP2Q9lXlU5gkMFh20gRuw==", - "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.Binder": "8.0.2", - "Microsoft.Extensions.Configuration.CommandLine": "8.0.0", - "Microsoft.Extensions.Configuration.EnvironmentVariables": "8.0.0", - "Microsoft.Extensions.Configuration.FileExtensions": "8.0.1", - "Microsoft.Extensions.Configuration.Json": "8.0.1", - "Microsoft.Extensions.Configuration.UserSecrets": "8.0.1", - "Microsoft.Extensions.DependencyInjection": "8.0.1", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Diagnostics": "8.0.1", - "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "Microsoft.Extensions.FileProviders.Physical": "8.0.0", - "Microsoft.Extensions.Hosting.Abstractions": "8.0.1", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging.Configuration": "8.0.1", - "Microsoft.Extensions.Logging.Console": "8.0.1", - "Microsoft.Extensions.Logging.Debug": "8.0.1", - "Microsoft.Extensions.Logging.EventLog": "8.0.1", - "Microsoft.Extensions.Logging.EventSource": "8.0.1", - "Microsoft.Extensions.Options": "8.0.2", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, "Microsoft.NET.Test.Sdk": { "type": "Direct", "requested": "[17.11.1, )", @@ -677,6 +454,12 @@ "System.Threading.Tasks.Extensions": "4.5.4" } }, + "PolySharp": { + "type": "Direct", + "requested": "[1.14.1, )", + "resolved": "1.14.1", + "contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ==" + }, "Serilog.Expressions": { "type": "Direct", "requested": "[5.0.0, )", @@ -701,11 +484,11 @@ }, "Serilog.Sinks.Async": { "type": "Direct", - "requested": "[2.0.0, )", - "resolved": "2.0.0", - "contentHash": "a+kTyUUxPAOZWKJiNbDqCPMiP0BWBWzObyTpRmGLrgCecgc/YJ+HqYGjsQoS6Sj9cRVXB9hH5O1mTZ0DiewG2w==", + "requested": "[2.1.0, )", + "resolved": "2.1.0", + "contentHash": "SnmRknWsSMgyo9wDXeZZCqSp48kkQYy44taSM6vcpxfiRICzSf09oLKEmVr0RCwQnfd8mJQ2WNN6nvhqf0RowQ==", "dependencies": { - "Serilog": "4.0.0" + "Serilog": "4.1.0" } }, "Serilog.Sinks.Console": { @@ -726,41 +509,6 @@ "Serilog": "4.0.0" } }, - "System.Collections.Immutable": { - "type": "Direct", - "requested": "[8.0.0, )", - "resolved": "8.0.0", - "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==", - "dependencies": { - "System.Memory": "4.5.5", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "System.Reflection.Metadata": { - "type": "Direct", - "requested": "[8.0.1, )", - "resolved": "8.0.1", - "contentHash": "+4sz5vGHPlo+5NpAxf2IlABnqVvOHOxv17b4dONv4hVwyNeFAeBevT14DIn7X3YWQ+eQFYO3YeTBNCleAblOKA==", - "dependencies": { - "System.Collections.Immutable": "8.0.0", - "System.Memory": "4.5.5" - } - }, - "System.Text.Json": { - "type": "Direct", - "requested": "[8.0.5, )", - "resolved": "8.0.5", - "contentHash": "0f1B50Ss7rqxXiaBJyzUu9bWFOO2/zSlifZ/UNMdiIpDYe4cY4LQQicP4nirK1OS31I43rn062UIJ1Q9bpmHpg==", - "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "System.Buffers": "4.5.1", - "System.Memory": "4.5.5", - "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "8.0.0", - "System.Threading.Tasks.Extensions": "4.5.4", - "System.ValueTuple": "4.5.0" - } - }, "xunit": { "type": "Direct", "requested": "[2.9.2, )", @@ -788,8 +536,8 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==", + "resolved": "9.0.0", + "contentHash": "owmu2Cr3IQ8yQiBleBHlGk8dSQ12oaF2e7TpzwJKEl4m84kkZJjEY1n33L67Y3zM5jPOjmmbdHjbfiL0RqcMRQ==", "dependencies": { "System.Threading.Tasks.Extensions": "4.5.4" } @@ -799,15 +547,6 @@ "resolved": "17.11.1", "contentHash": "nPJqrcA5iX+Y0kqoT3a+pD/8lrW/V7ayqnEJQsTonSoPz59J8bmoQhcSN4G8+UJ64Hkuf0zuxnfuj2lkHOq4cA==" }, - "Microsoft.Extensions.Configuration": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "0J/9YNXTMWSZP2p2+nvl8p71zpSwokZXZuJW+VjdErkegAnFdO1XlqtA62SJtgVYHdKu3uPxJHcMR/r35HwFBA==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, "Microsoft.Extensions.Configuration.Abstractions": { "type": "Transitive", "resolved": "8.0.0", @@ -817,106 +556,35 @@ "System.ValueTuple": "4.5.0" } }, - "Microsoft.Extensions.Configuration.Binder": { + "Microsoft.Extensions.DependencyInjection": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "7IQhGK+wjyGrNsPBjJcZwWAr+Wf6D4+TwOptUt77bWtgNkiV8tDEbhFS+dDamtQFZ2X7kWG9m71iZQRj2x3zgQ==", + "resolved": "8.0.0", + "contentHash": "V8S3bsm50ig6JSyrbcJJ8bW2b9QLGouz+G1miK3UTaOWmMtFwNNNzUf4AleyDWUmTrWMLNnFSLEQtxmxgNQnNQ==", "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0" + "Microsoft.Bcl.AsyncInterfaces": "8.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "System.Threading.Tasks.Extensions": "4.5.4" } }, - "Microsoft.Extensions.Configuration.CommandLine": { + "Microsoft.Extensions.DependencyInjection.Abstractions": { "type": "Transitive", "resolved": "8.0.0", - "contentHash": "NZuZMz3Q8Z780nKX3ifV1fE7lS+6pynDHK71OfU4OZ1ItgvDOhyOC7E6z+JMZrAj63zRpwbdldYFk499t3+1dQ==", + "contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==", "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0" + "Microsoft.Bcl.AsyncInterfaces": "8.0.0", + "System.Threading.Tasks.Extensions": "4.5.4" } }, - "Microsoft.Extensions.Configuration.EnvironmentVariables": { + "Microsoft.Extensions.Diagnostics.Abstractions": { "type": "Transitive", "resolved": "8.0.0", - "contentHash": "plvZ0ZIpq+97gdPNNvhwvrEZ92kNml9hd1pe3idMA7svR0PztdzVLkoWLcRFgySYXUJc3kSM3Xw3mNFMo/bxRA==", + "contentHash": "JHYCQG7HmugNYUhOl368g+NMxYE/N/AiclCYRNlgCY9eVyiBkOHMwK4x60RYMxv9EL3+rmj1mqHvdCiPpC+D4Q==", "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0" - } - }, - "Microsoft.Extensions.Configuration.FileExtensions": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "EJzSNO9oaAXnTdtdNO6npPRsIIeZCBSNmdQ091VDO7fBiOtJAAeEq6dtrVXIi3ZyjC5XRSAtVvF8SzcneRHqKQ==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "Microsoft.Extensions.FileProviders.Physical": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Configuration.Json": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "L89DLNuimOghjV3tLx0ArFDwVEJD6+uGB3BMCMX01kaLzXkaXHb2021xOMl2QOxUxbdePKUZsUY7n2UUkycjRg==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.FileExtensions": "8.0.1", - "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "System.Text.Json": "8.0.5" - } - }, - "Microsoft.Extensions.Configuration.UserSecrets": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "7tYqdPPpAK+3jO9d5LTuCK2VxrEdf85Ol4trUr6ds4jclBecadWZ/RyPCbNjfbN5iGTfUnD/h65TOQuqQv2c+A==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.Json": "8.0.1", - "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "Microsoft.Extensions.FileProviders.Physical": "8.0.0" - } - }, - "Microsoft.Extensions.DependencyInjection": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "BmANAnR5Xd4Oqw7yQ75xOAYODybZQRzdeNucg7kS5wWKd2PNnMdYtJ2Vciy0QLylRmv42DGl5+AFL9izA6F1Rw==", - "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "3iE7UF7MQkCv1cxzCahz+Y/guQbTqieyxyaWKhrRO91itI9cOKO76OHeQDahqG4MmW5umr3CcCvGmK92lWNlbg==", - "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "Microsoft.Extensions.Diagnostics": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "doVPCUUCY7c6LhBsEfiy3W1bvS7Mi6LkfQMS8nlC22jZWNxBv8VO8bdfeyvpYFst6Kxqk7HBC6lytmEoBssvSQ==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Diagnostics.Abstractions": "8.0.1", - "Microsoft.Extensions.Options.ConfigurationExtensions": "8.0.0" - } - }, - "Microsoft.Extensions.Diagnostics.Abstractions": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "elH2vmwNmsXuKmUeMQ4YW9ldXiF+gSGDgg1vORksob5POnpaI6caj1Hu8zaYbEuibhqCoWg0YRWDazBY3zjBfg==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2", - "System.Buffers": "4.5.1", - "System.Diagnostics.DiagnosticSource": "8.0.1", - "System.Memory": "4.5.5" + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0", + "System.Buffers": "4.5.1", + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.Memory": "4.5.5" } }, "Microsoft.Extensions.FileProviders.Abstractions": { @@ -927,135 +595,53 @@ "Microsoft.Extensions.Primitives": "8.0.0" } }, - "Microsoft.Extensions.FileProviders.Physical": { + "Microsoft.Extensions.Hosting.Abstractions": { "type": "Transitive", "resolved": "8.0.0", - "contentHash": "UboiXxpPUpwulHvIAVE36Knq0VSHaAmfrFkegLyBZeaADuKezJ/AIXYAW8F5GBlGk/VaibN2k/Zn1ca8YAfVdA==", + "contentHash": "AG7HWwVRdCHlaA++1oKDxLsXIBxmDpMPb3VoyOoAghEWnkUvEAdYQUwnV4jJbAaa/nMYNiEh5ByoLauZBEiovg==", "dependencies": { + "Microsoft.Bcl.AsyncInterfaces": "8.0.0", + "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Diagnostics.Abstractions": "8.0.0", "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "Microsoft.Extensions.FileSystemGlobbing": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" + "Microsoft.Extensions.Logging.Abstractions": "8.0.0", + "System.Threading.Tasks.Extensions": "4.5.4" } }, - "Microsoft.Extensions.FileSystemGlobbing": { + "Microsoft.Extensions.Logging": { "type": "Transitive", "resolved": "8.0.0", - "contentHash": "OK+670i7esqlQrPjdIKRbsyMCe9g5kSLpRRQGSr4Q58AOYEe/hCnfLZprh7viNisSUUQZmMrbbuDaIrP+V1ebQ==" - }, - "Microsoft.Extensions.Hosting.Abstractions": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "nHwq9aPBdBPYXPti6wYEEfgXddfBrYC+CQLn+qISiwQq5tpfaqDZSKOJNxoe9rfQxGf1c+2wC/qWFe1QYJPYqw==", + "contentHash": "tvRkov9tAJ3xP51LCv3FJ2zINmv1P8Hi8lhhtcKGqM+ImiTCC84uOPEI4z8Cdq2C3o9e+Aa0Gw0rmrsJD77W+w==", "dependencies": { "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Diagnostics.Abstractions": "8.0.1", - "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "System.Threading.Tasks.Extensions": "4.5.4" + "Microsoft.Extensions.DependencyInjection": "8.0.0", + "Microsoft.Extensions.Logging.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0", + "System.Diagnostics.DiagnosticSource": "8.0.0", + "System.ValueTuple": "4.5.0" } }, "Microsoft.Extensions.Logging.Abstractions": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "nroMDjS7hNBPtkZqVBbSiQaQjWRDxITI8Y7XnDs97rqG3EbzVTNLZQf7bIeUJcaHOV8bca47s1Uxq94+2oGdxA==", + "resolved": "8.0.0", + "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", "System.Buffers": "4.5.1", - "System.Diagnostics.DiagnosticSource": "8.0.1", "System.Memory": "4.5.5" } }, - "Microsoft.Extensions.Logging.Configuration": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "QWwTrsgOnJMmn+XUslm8D2H1n3PkP/u/v52FODtyBc/k4W9r3i2vcXXeeX/upnzllJYRRbrzVzT0OclfNJtBJA==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.Binder": "8.0.2", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2", - "Microsoft.Extensions.Options.ConfigurationExtensions": "8.0.0" - } - }, - "Microsoft.Extensions.Logging.Console": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "uzcg/5U2eLyn5LIKlERkdSxw6VPC1yydnOSQiRRWGBGN3kphq3iL4emORzrojScDmxRhv49gp5BI8U3Dz7y4iA==", - "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging.Configuration": "8.0.1", - "Microsoft.Extensions.Options": "8.0.2", - "System.Buffers": "4.5.1", - "System.Text.Json": "8.0.5" - } - }, - "Microsoft.Extensions.Logging.Debug": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "B8hqNuYudC2RB+L/DI33uO4rf5by41fZVdcVL2oZj0UyoAZqnwTwYHp1KafoH4nkl1/23piNeybFFASaV2HkFg==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2" - } - }, - "Microsoft.Extensions.Logging.EventLog": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "ZD1m4GXoxcZeDJIq8qePKj+QAWeQNO/OG8skvrOG8RQfxLp9MAKRoliTc27xanoNUzeqvX5HhS/I7c0BvwAYUg==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2" - } - }, - "Microsoft.Extensions.Logging.EventSource": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "YMXMAla6B6sEf/SnfZYTty633Ool3AH7KOw2LOaaEqwSo2piK4f7HMtzyc3CNiipDnq1fsUSuG5Oc7ZzpVy8WQ==", - "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2", - "Microsoft.Extensions.Primitives": "8.0.0", - "System.Memory": "4.5.5", - "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Json": "8.0.5" - } - }, "Microsoft.Extensions.Options": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "dWGKvhFybsaZpGmzkGCbNNwBD1rVlWzrZKANLW/CcbFJpCEceMCGzT7zZwHOGBCbwM0SzBuceMj5HN1LKV1QqA==", + "resolved": "8.0.0", + "contentHash": "JOVOfqpnqlVLUzINQ2fox8evY2SKLYJ3BV8QDe/Jyp21u1T7r45x/R/5QdteURMR5r01GxeJSBBUOCOyaNXA3g==", "dependencies": { "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", "Microsoft.Extensions.Primitives": "8.0.0", "System.ValueTuple": "4.5.0" } }, - "Microsoft.Extensions.Options.ConfigurationExtensions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "0f4DMRqEd50zQh+UyJc+/HiBsZ3vhAQALgdkcQEalSH1L2isdC7Yj54M3cyo5e+BeO5fcBQ7Dxly8XiBBcvRgw==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.Binder": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, "Microsoft.Extensions.Primitives": { "type": "Transitive", "resolved": "8.0.0", @@ -1096,6 +682,16 @@ "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, + "System.IO.Pipelines": { + "type": "Transitive", + "resolved": "9.0.0", + "contentHash": "eA3cinogwaNB4jdjQHOP3Z3EuyiDII7MT35jgtnsA4vkn0LUrrSHsU0nzHTzFzmaFYeKV7MYyMxOocFzsBHpTw==", + "dependencies": { + "System.Buffers": "4.5.1", + "System.Memory": "4.5.5", + "System.Threading.Tasks.Extensions": "4.5.4" + } + }, "System.Memory": { "type": "Transitive", "resolved": "4.5.5", @@ -1118,8 +714,8 @@ }, "System.Text.Encodings.Web": { "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", + "resolved": "9.0.0", + "contentHash": "e2hMgAErLbKyUUwt18qSBf9T5Y+SFAL3ZedM8fLupkVj8Rj2PZ9oxQ37XX2LF8fTO1wNIxvKpihD7Of7D/NxZw==", "dependencies": { "System.Buffers": "4.5.1", "System.Memory": "4.5.5", @@ -1190,32 +786,54 @@ "Alexaka1.Serilog.Extensions.Formatting": { "type": "Project", "dependencies": { - "Serilog": "[4.0.2, )", - "System.Text.Json": "[8.0.5, )" + "Serilog": "[4.1.0, )", + "System.Text.Json": "[9.0.0, )" } }, - "Microsoft.Extensions.Logging": { + "Serilog": { "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "8.0.1", - "contentHash": "4x+pzsQEbqxhNf1QYRr5TDkLP9UsLT3A6MdRKDDEgrW7h1ljiEPgTNhKYUhNCCAaVpQECVQ+onA91PTPnIp6Lw==", + "requested": "[4.1.0, )", + "resolved": "4.1.0", + "contentHash": "u1aZI8HZ62LWlq5dZLFwm6jMax/sUwnWZSw5lkPsCt518cJBxFKoNmc7oSxe5aA5BgSkzy9rzwFGR/i/acnSPw==", "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "Microsoft.Extensions.DependencyInjection": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2", "System.Diagnostics.DiagnosticSource": "8.0.1", - "System.ValueTuple": "4.5.0" + "System.Threading.Channels": "8.0.0" } }, - "Serilog": { + "System.Collections.Immutable": { "type": "CentralTransitive", - "requested": "[4.0.2, )", - "resolved": "4.0.2", - "contentHash": "Vehq4uNYtURe/OnHEpWGvMgrvr5Vou7oZLdn3BuEH5FSCeHXDpNJtpzWoqywXsSvCTuiv0I65mZDRnJSeUvisA==", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w==", "dependencies": { - "System.Diagnostics.DiagnosticSource": "8.0.1", - "System.Threading.Channels": "8.0.0" + "System.Memory": "4.5.5", + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "System.Reflection.Metadata": { + "type": "CentralTransitive", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "ANiqLu3DxW9kol/hMmTWbt3414t9ftdIuiIU7j80okq2YzAueo120M442xk1kDJWtmZTqWQn7wHDvMRipVOEOQ==", + "dependencies": { + "System.Collections.Immutable": "9.0.0", + "System.Memory": "4.5.5" + } + }, + "System.Text.Json": { + "type": "CentralTransitive", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "js7+qAu/9mQvnhA4EfGMZNEzXtJCDxgkgj8ohuxq/Qxv+R56G+ljefhiJHOxTNiw54q8vmABCWUwkMulNdlZ4A==", + "dependencies": { + "Microsoft.Bcl.AsyncInterfaces": "9.0.0", + "System.Buffers": "4.5.1", + "System.IO.Pipelines": "9.0.0", + "System.Memory": "4.5.5", + "System.Runtime.CompilerServices.Unsafe": "6.0.0", + "System.Text.Encodings.Web": "9.0.0", + "System.Threading.Tasks.Extensions": "4.5.4", + "System.ValueTuple": "4.5.0" } } }, @@ -1235,36 +853,6 @@ "Microsoft.TestPlatform.ObjectModel": "17.10.0" } }, - "Microsoft.Extensions.Hosting": { - "type": "Direct", - "requested": "[8.0.1, )", - "resolved": "8.0.1", - "contentHash": "bP9EEkHBEfjgYiG8nUaXqMk/ujwJrffOkNPP7onpRMO8R+OUSESSP4xHkCAXgYZ1COP2Q9lXlU5gkMFh20gRuw==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.Binder": "8.0.2", - "Microsoft.Extensions.Configuration.CommandLine": "8.0.0", - "Microsoft.Extensions.Configuration.EnvironmentVariables": "8.0.0", - "Microsoft.Extensions.Configuration.FileExtensions": "8.0.1", - "Microsoft.Extensions.Configuration.Json": "8.0.1", - "Microsoft.Extensions.Configuration.UserSecrets": "8.0.1", - "Microsoft.Extensions.DependencyInjection": "8.0.1", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Diagnostics": "8.0.1", - "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "Microsoft.Extensions.FileProviders.Physical": "8.0.0", - "Microsoft.Extensions.Hosting.Abstractions": "8.0.1", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging.Configuration": "8.0.1", - "Microsoft.Extensions.Logging.Console": "8.0.1", - "Microsoft.Extensions.Logging.Debug": "8.0.1", - "Microsoft.Extensions.Logging.EventLog": "8.0.1", - "Microsoft.Extensions.Logging.EventSource": "8.0.1", - "Microsoft.Extensions.Options": "8.0.2" - } - }, "Microsoft.NET.Test.Sdk": { "type": "Direct", "requested": "[17.11.1, )", @@ -1284,6 +872,12 @@ "Castle.Core": "5.1.1" } }, + "PolySharp": { + "type": "Direct", + "requested": "[1.14.1, )", + "resolved": "1.14.1", + "contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ==" + }, "Serilog.Expressions": { "type": "Direct", "requested": "[5.0.0, )", @@ -1308,11 +902,11 @@ }, "Serilog.Sinks.Async": { "type": "Direct", - "requested": "[2.0.0, )", - "resolved": "2.0.0", - "contentHash": "a+kTyUUxPAOZWKJiNbDqCPMiP0BWBWzObyTpRmGLrgCecgc/YJ+HqYGjsQoS6Sj9cRVXB9hH5O1mTZ0DiewG2w==", + "requested": "[2.1.0, )", + "resolved": "2.1.0", + "contentHash": "SnmRknWsSMgyo9wDXeZZCqSp48kkQYy44taSM6vcpxfiRICzSf09oLKEmVr0RCwQnfd8mJQ2WNN6nvhqf0RowQ==", "dependencies": { - "Serilog": "4.0.0" + "Serilog": "4.1.0" } }, "Serilog.Sinks.Console": { @@ -1333,34 +927,6 @@ "Serilog": "4.0.0" } }, - "System.Collections.Immutable": { - "type": "Direct", - "requested": "[8.0.0, )", - "resolved": "8.0.0", - "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "System.Reflection.Metadata": { - "type": "Direct", - "requested": "[8.0.1, )", - "resolved": "8.0.1", - "contentHash": "+4sz5vGHPlo+5NpAxf2IlABnqVvOHOxv17b4dONv4hVwyNeFAeBevT14DIn7X3YWQ+eQFYO3YeTBNCleAblOKA==", - "dependencies": { - "System.Collections.Immutable": "8.0.0" - } - }, - "System.Text.Json": { - "type": "Direct", - "requested": "[8.0.5, )", - "resolved": "8.0.5", - "contentHash": "0f1B50Ss7rqxXiaBJyzUu9bWFOO2/zSlifZ/UNMdiIpDYe4cY4LQQicP4nirK1OS31I43rn062UIJ1Q9bpmHpg==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "8.0.0" - } - }, "xunit": { "type": "Direct", "requested": "[2.9.2, )", @@ -1391,115 +957,368 @@ "resolved": "17.11.1", "contentHash": "nPJqrcA5iX+Y0kqoT3a+pD/8lrW/V7ayqnEJQsTonSoPz59J8bmoQhcSN4G8+UJ64Hkuf0zuxnfuj2lkHOq4cA==" }, - "Microsoft.Extensions.Configuration": { + "Microsoft.Extensions.Configuration.Abstractions": { "type": "Transitive", "resolved": "8.0.0", - "contentHash": "0J/9YNXTMWSZP2p2+nvl8p71zpSwokZXZuJW+VjdErkegAnFdO1XlqtA62SJtgVYHdKu3uPxJHcMR/r35HwFBA==", + "contentHash": "3lE/iLSutpgX1CC0NOW70FJoGARRHbyKmG7dc0klnUZ9Dd9hS6N/POPWhKhMLCEuNN5nXEY5agmlFtH562vqhQ==", "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", "Microsoft.Extensions.Primitives": "8.0.0" } }, - "Microsoft.Extensions.Configuration.Abstractions": { + "Microsoft.Extensions.DependencyInjection": { "type": "Transitive", "resolved": "8.0.0", - "contentHash": "3lE/iLSutpgX1CC0NOW70FJoGARRHbyKmG7dc0klnUZ9Dd9hS6N/POPWhKhMLCEuNN5nXEY5agmlFtH562vqhQ==", + "contentHash": "V8S3bsm50ig6JSyrbcJJ8bW2b9QLGouz+G1miK3UTaOWmMtFwNNNzUf4AleyDWUmTrWMLNnFSLEQtxmxgNQnNQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==" + }, + "Microsoft.Extensions.Diagnostics.Abstractions": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "JHYCQG7HmugNYUhOl368g+NMxYE/N/AiclCYRNlgCY9eVyiBkOHMwK4x60RYMxv9EL3+rmj1mqHvdCiPpC+D4Q==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0", + "System.Diagnostics.DiagnosticSource": "8.0.0" + } + }, + "Microsoft.Extensions.FileProviders.Abstractions": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "ZbaMlhJlpisjuWbvXr4LdAst/1XxH3vZ6A0BsgTphZ2L4PGuxRLz7Jr/S7mkAAnOn78Vu0fKhEgNF5JO3zfjqQ==", "dependencies": { "Microsoft.Extensions.Primitives": "8.0.0" } }, - "Microsoft.Extensions.Configuration.Binder": { + "Microsoft.Extensions.Hosting.Abstractions": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "7IQhGK+wjyGrNsPBjJcZwWAr+Wf6D4+TwOptUt77bWtgNkiV8tDEbhFS+dDamtQFZ2X7kWG9m71iZQRj2x3zgQ==", + "resolved": "8.0.0", + "contentHash": "AG7HWwVRdCHlaA++1oKDxLsXIBxmDpMPb3VoyOoAghEWnkUvEAdYQUwnV4jJbAaa/nMYNiEh5ByoLauZBEiovg==", "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0" + "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Diagnostics.Abstractions": "8.0.0", + "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", + "Microsoft.Extensions.Logging.Abstractions": "8.0.0" } }, - "Microsoft.Extensions.Configuration.CommandLine": { + "Microsoft.Extensions.Logging": { "type": "Transitive", "resolved": "8.0.0", - "contentHash": "NZuZMz3Q8Z780nKX3ifV1fE7lS+6pynDHK71OfU4OZ1ItgvDOhyOC7E6z+JMZrAj63zRpwbdldYFk499t3+1dQ==", + "contentHash": "tvRkov9tAJ3xP51LCv3FJ2zINmv1P8Hi8lhhtcKGqM+ImiTCC84uOPEI4z8Cdq2C3o9e+Aa0Gw0rmrsJD77W+w==", "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0" + "Microsoft.Extensions.DependencyInjection": "8.0.0", + "Microsoft.Extensions.Logging.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0" } }, - "Microsoft.Extensions.Configuration.EnvironmentVariables": { + "Microsoft.Extensions.Logging.Abstractions": { "type": "Transitive", "resolved": "8.0.0", - "contentHash": "plvZ0ZIpq+97gdPNNvhwvrEZ92kNml9hd1pe3idMA7svR0PztdzVLkoWLcRFgySYXUJc3kSM3Xw3mNFMo/bxRA==", + "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0" + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" } }, - "Microsoft.Extensions.Configuration.FileExtensions": { + "Microsoft.Extensions.Options": { "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "EJzSNO9oaAXnTdtdNO6npPRsIIeZCBSNmdQ091VDO7fBiOtJAAeEq6dtrVXIi3ZyjC5XRSAtVvF8SzcneRHqKQ==", + "resolved": "8.0.0", + "contentHash": "JOVOfqpnqlVLUzINQ2fox8evY2SKLYJ3BV8QDe/Jyp21u1T7r45x/R/5QdteURMR5r01GxeJSBBUOCOyaNXA3g==", "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "Microsoft.Extensions.FileProviders.Physical": "8.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", "Microsoft.Extensions.Primitives": "8.0.0" } }, - "Microsoft.Extensions.Configuration.Json": { + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "Microsoft.TestPlatform.ObjectModel": { + "type": "Transitive", + "resolved": "17.11.1", + "contentHash": "E2jZqAU6JeWEVsyOEOrSW1o1bpHLgb25ypvKNB/moBXPVsFYBPd/Jwi7OrYahG50J83LfHzezYI+GaEkpAotiA==", + "dependencies": { + "System.Reflection.Metadata": "1.6.0" + } + }, + "Microsoft.TestPlatform.TestHost": { + "type": "Transitive", + "resolved": "17.11.1", + "contentHash": "DnG+GOqJXO/CkoqlJWeDFTgPhqD/V6VqUIL3vINizCWZ3X+HshCtbbyDdSHQQEjrc2Sl/K3yaxX6s+5LFEdYuw==", + "dependencies": { + "Microsoft.TestPlatform.ObjectModel": "17.11.1", + "Newtonsoft.Json": "13.0.1" + } + }, + "Newtonsoft.Json": { + "type": "Transitive", + "resolved": "13.0.1", + "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" + }, + "Serilog.Extensions.Logging": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "YEAMWu1UnWgf1c1KP85l1SgXGfiVo0Rz6x08pCiPOIBt2Qe18tcZLvdBUuV5o1QHvrs8FAry9wTIhgBRtjIlEg==", + "dependencies": { + "Microsoft.Extensions.Logging": "8.0.0", + "Serilog": "3.1.1" + } + }, + "System.Diagnostics.DiagnosticSource": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "System.Diagnostics.EventLog": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "lcyUiXTsETK2ALsZrX+nWuHSIQeazhqPphLfaRxzdGaG93+0kELqpgEHtwWOlQe7+jSFnKwaCAgL4kjeZCQJnw==" + }, + "System.Memory": { + "type": "Transitive", + "resolved": "4.5.5", + "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==" + }, + "System.Runtime.CompilerServices.Unsafe": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" + }, + "xunit.abstractions": { + "type": "Transitive", + "resolved": "2.0.3", + "contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg==" + }, + "xunit.analyzers": { + "type": "Transitive", + "resolved": "1.16.0", + "contentHash": "hptYM7vGr46GUIgZt21YHO4rfuBAQS2eINbFo16CV/Dqq+24Tp+P5gDCACu1AbFfW4Sp/WRfDPSK8fmUUb8s0Q==" + }, + "xunit.assert": { + "type": "Transitive", + "resolved": "2.9.2", + "contentHash": "QkNBAQG4pa66cholm28AxijBjrmki98/vsEh4Sx5iplzotvPgpiotcxqJQMRC8d7RV7nIT8ozh97957hDnZwsQ==" + }, + "xunit.core": { + "type": "Transitive", + "resolved": "2.9.2", + "contentHash": "O6RrNSdmZ0xgEn5kT927PNwog5vxTtKrWMihhhrT0Sg9jQ7iBDciYOwzBgP2krBEk5/GBXI18R1lKvmnxGcb4w==", + "dependencies": { + "xunit.extensibility.core": "[2.9.2]", + "xunit.extensibility.execution": "[2.9.2]" + } + }, + "xunit.extensibility.core": { + "type": "Transitive", + "resolved": "2.9.2", + "contentHash": "Ol+KlBJz1x8BrdnhN2DeOuLrr1I/cTwtHCggL9BvYqFuVd/TUSzxNT5O0NxCIXth30bsKxgMfdqLTcORtM52yQ==", + "dependencies": { + "xunit.abstractions": "2.0.3" + } + }, + "xunit.extensibility.execution": { + "type": "Transitive", + "resolved": "2.9.2", + "contentHash": "rKMpq4GsIUIJibXuZoZ8lYp5EpROlnYaRpwu9Zr0sRZXE7JqJfEEbCsUriZqB+ByXCLFBJyjkTRULMdC+U566g==", + "dependencies": { + "xunit.extensibility.core": "[2.9.2]" + } + }, + "Alexaka1.Serilog.Extensions.Formatting": { + "type": "Project", + "dependencies": { + "Serilog": "[4.1.0, )" + } + }, + "Serilog": { + "type": "CentralTransitive", + "requested": "[4.1.0, )", + "resolved": "4.1.0", + "contentHash": "u1aZI8HZ62LWlq5dZLFwm6jMax/sUwnWZSw5lkPsCt518cJBxFKoNmc7oSxe5aA5BgSkzy9rzwFGR/i/acnSPw==" + }, + "System.Collections.Immutable": { + "type": "CentralTransitive", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w==", + "dependencies": { + "System.Memory": "4.5.5", + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "System.Reflection.Metadata": { + "type": "CentralTransitive", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "ANiqLu3DxW9kol/hMmTWbt3414t9ftdIuiIU7j80okq2YzAueo120M442xk1kDJWtmZTqWQn7wHDvMRipVOEOQ==", + "dependencies": { + "System.Collections.Immutable": "9.0.0", + "System.Memory": "4.5.5" + } + } + }, + "net8.0": { + "coverlet.collector": { + "type": "Direct", + "requested": "[6.0.2, )", + "resolved": "6.0.2", + "contentHash": "bJShQ6uWRTQ100ZeyiMqcFlhP7WJ+bCuabUs885dJiBEzMsJMSFr7BOyeCw4rgvQokteGi5rKQTlkhfQPUXg2A==" + }, + "GitHubActionsTestLogger": { + "type": "Direct", + "requested": "[2.4.1, )", + "resolved": "2.4.1", + "contentHash": "SH1ar/kg36CggzMqLUDRoUqR8SSjK/JiQ2JS8MYg8u0RCLDkkDEbPGIN91omOPx9f2GuDqsxxofSdgsQje3Xuw==", + "dependencies": { + "Microsoft.TestPlatform.ObjectModel": "17.10.0" + } + }, + "Microsoft.NET.Test.Sdk": { + "type": "Direct", + "requested": "[17.11.1, )", + "resolved": "17.11.1", + "contentHash": "U3Ty4BaGoEu+T2bwSko9tWqWUOU16WzSFkq6U8zve75oRBMSLTBdMAZrVNNz1Tq12aCdDom9fcOcM9QZaFHqFg==", + "dependencies": { + "Microsoft.CodeCoverage": "17.11.1", + "Microsoft.TestPlatform.TestHost": "17.11.1" + } + }, + "Moq": { + "type": "Direct", + "requested": "[4.20.72, )", + "resolved": "4.20.72", + "contentHash": "EA55cjyNn8eTNWrgrdZJH5QLFp2L43oxl1tlkoYUKIE9pRwL784OWiTXeCV5ApS+AMYEAlt7Fo03A2XfouvHmQ==", + "dependencies": { + "Castle.Core": "5.1.1" + } + }, + "PolySharp": { + "type": "Direct", + "requested": "[1.14.1, )", + "resolved": "1.14.1", + "contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ==" + }, + "Serilog.Expressions": { + "type": "Direct", + "requested": "[5.0.0, )", + "resolved": "5.0.0", + "contentHash": "QhZjXtUcA2QfQRA60m+DfyIfidKsQV7HBstbYEDqzJKMbJH/KnKthkkjciRuYrmFE+scWv1JibC5LlXrdtOUmw==", + "dependencies": { + "Serilog": "4.0.0" + } + }, + "Serilog.Extensions.Hosting": { + "type": "Direct", + "requested": "[8.0.0, )", + "resolved": "8.0.0", + "contentHash": "db0OcbWeSCvYQkHWu6n0v40N4kKaTAXNjlM3BKvcbwvNzYphQFcBR+36eQ/7hMMwOkJvAyLC2a9/jNdUL5NjtQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Hosting.Abstractions": "8.0.0", + "Microsoft.Extensions.Logging.Abstractions": "8.0.0", + "Serilog": "3.1.1", + "Serilog.Extensions.Logging": "8.0.0" + } + }, + "Serilog.Sinks.Async": { + "type": "Direct", + "requested": "[2.1.0, )", + "resolved": "2.1.0", + "contentHash": "SnmRknWsSMgyo9wDXeZZCqSp48kkQYy44taSM6vcpxfiRICzSf09oLKEmVr0RCwQnfd8mJQ2WNN6nvhqf0RowQ==", + "dependencies": { + "Serilog": "4.1.0" + } + }, + "Serilog.Sinks.Console": { + "type": "Direct", + "requested": "[6.0.0, )", + "resolved": "6.0.0", + "contentHash": "fQGWqVMClCP2yEyTXPIinSr5c+CBGUvBybPxjAGcf7ctDhadFhrQw03Mv8rJ07/wR5PDfFjewf2LimvXCDzpbA==", + "dependencies": { + "Serilog": "4.0.0" + } + }, + "Serilog.Sinks.File": { + "type": "Direct", + "requested": "[6.0.0, )", + "resolved": "6.0.0", + "contentHash": "lxjg89Y8gJMmFxVkbZ+qDgjl+T4yC5F7WSLTvA+5q0R04tfKVLRL/EHpYoJ/MEQd2EeCKDuylBIVnAYMotmh2A==", + "dependencies": { + "Serilog": "4.0.0" + } + }, + "xunit": { + "type": "Direct", + "requested": "[2.9.2, )", + "resolved": "2.9.2", + "contentHash": "7LhFS2N9Z6Xgg8aE5lY95cneYivRMfRI8v+4PATa4S64D5Z/Plkg0qa8dTRHSiGRgVZ/CL2gEfJDE5AUhOX+2Q==", + "dependencies": { + "xunit.analyzers": "1.16.0", + "xunit.assert": "2.9.2", + "xunit.core": "[2.9.2]" + } + }, + "xunit.runner.visualstudio": { + "type": "Direct", + "requested": "[2.8.2, )", + "resolved": "2.8.2", + "contentHash": "vm1tbfXhFmjFMUmS4M0J0ASXz3/U5XvXBa6DOQUL3fEz4Vt6YPhv+ESCarx6M6D+9kJkJYZKCNvJMas1+nVfmQ==" + }, + "Castle.Core": { "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "L89DLNuimOghjV3tLx0ArFDwVEJD6+uGB3BMCMX01kaLzXkaXHb2021xOMl2QOxUxbdePKUZsUY7n2UUkycjRg==", + "resolved": "5.1.1", + "contentHash": "rpYtIczkzGpf+EkZgDr9CClTdemhsrwA/W5hMoPjLkRFnXzH44zDLoovXeKtmxb1ykXK9aJVODSpiJml8CTw2g==", "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.FileExtensions": "8.0.1", - "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "System.Text.Json": "8.0.5" + "System.Diagnostics.EventLog": "6.0.0" } }, - "Microsoft.Extensions.Configuration.UserSecrets": { + "Microsoft.CodeCoverage": { "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "7tYqdPPpAK+3jO9d5LTuCK2VxrEdf85Ol4trUr6ds4jclBecadWZ/RyPCbNjfbN5iGTfUnD/h65TOQuqQv2c+A==", + "resolved": "17.11.1", + "contentHash": "nPJqrcA5iX+Y0kqoT3a+pD/8lrW/V7ayqnEJQsTonSoPz59J8bmoQhcSN4G8+UJ64Hkuf0zuxnfuj2lkHOq4cA==" + }, + "Microsoft.Extensions.Configuration.Abstractions": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "3lE/iLSutpgX1CC0NOW70FJoGARRHbyKmG7dc0klnUZ9Dd9hS6N/POPWhKhMLCEuNN5nXEY5agmlFtH562vqhQ==", "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.Json": "8.0.1", - "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "Microsoft.Extensions.FileProviders.Physical": "8.0.0" + "Microsoft.Extensions.Primitives": "8.0.0" } }, "Microsoft.Extensions.DependencyInjection": { "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "BmANAnR5Xd4Oqw7yQ75xOAYODybZQRzdeNucg7kS5wWKd2PNnMdYtJ2Vciy0QLylRmv42DGl5+AFL9izA6F1Rw==", + "resolved": "8.0.0", + "contentHash": "V8S3bsm50ig6JSyrbcJJ8bW2b9QLGouz+G1miK3UTaOWmMtFwNNNzUf4AleyDWUmTrWMLNnFSLEQtxmxgNQnNQ==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2" + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" } }, "Microsoft.Extensions.DependencyInjection.Abstractions": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "3iE7UF7MQkCv1cxzCahz+Y/guQbTqieyxyaWKhrRO91itI9cOKO76OHeQDahqG4MmW5umr3CcCvGmK92lWNlbg==" - }, - "Microsoft.Extensions.Diagnostics": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "doVPCUUCY7c6LhBsEfiy3W1bvS7Mi6LkfQMS8nlC22jZWNxBv8VO8bdfeyvpYFst6Kxqk7HBC6lytmEoBssvSQ==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Diagnostics.Abstractions": "8.0.1", - "Microsoft.Extensions.Options.ConfigurationExtensions": "8.0.0" - } + "resolved": "8.0.0", + "contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==" }, "Microsoft.Extensions.Diagnostics.Abstractions": { "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "elH2vmwNmsXuKmUeMQ4YW9ldXiF+gSGDgg1vORksob5POnpaI6caj1Hu8zaYbEuibhqCoWg0YRWDazBY3zjBfg==", + "resolved": "8.0.0", + "contentHash": "JHYCQG7HmugNYUhOl368g+NMxYE/N/AiclCYRNlgCY9eVyiBkOHMwK4x60RYMxv9EL3+rmj1mqHvdCiPpC+D4Q==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2", - "System.Diagnostics.DiagnosticSource": "8.0.1" + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0", + "System.Diagnostics.DiagnosticSource": "8.0.0" } }, "Microsoft.Extensions.FileProviders.Abstractions": { @@ -1510,135 +1329,49 @@ "Microsoft.Extensions.Primitives": "8.0.0" } }, - "Microsoft.Extensions.FileProviders.Physical": { + "Microsoft.Extensions.Hosting.Abstractions": { "type": "Transitive", "resolved": "8.0.0", - "contentHash": "UboiXxpPUpwulHvIAVE36Knq0VSHaAmfrFkegLyBZeaADuKezJ/AIXYAW8F5GBlGk/VaibN2k/Zn1ca8YAfVdA==", + "contentHash": "AG7HWwVRdCHlaA++1oKDxLsXIBxmDpMPb3VoyOoAghEWnkUvEAdYQUwnV4jJbAaa/nMYNiEh5ByoLauZBEiovg==", "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Diagnostics.Abstractions": "8.0.0", "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "Microsoft.Extensions.FileSystemGlobbing": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" + "Microsoft.Extensions.Logging.Abstractions": "8.0.0" } }, - "Microsoft.Extensions.FileSystemGlobbing": { + "Microsoft.Extensions.Logging": { "type": "Transitive", "resolved": "8.0.0", - "contentHash": "OK+670i7esqlQrPjdIKRbsyMCe9g5kSLpRRQGSr4Q58AOYEe/hCnfLZprh7viNisSUUQZmMrbbuDaIrP+V1ebQ==" - }, - "Microsoft.Extensions.Hosting.Abstractions": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "nHwq9aPBdBPYXPti6wYEEfgXddfBrYC+CQLn+qISiwQq5tpfaqDZSKOJNxoe9rfQxGf1c+2wC/qWFe1QYJPYqw==", + "contentHash": "tvRkov9tAJ3xP51LCv3FJ2zINmv1P8Hi8lhhtcKGqM+ImiTCC84uOPEI4z8Cdq2C3o9e+Aa0Gw0rmrsJD77W+w==", "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Diagnostics.Abstractions": "8.0.1", - "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2" + "Microsoft.Extensions.DependencyInjection": "8.0.0", + "Microsoft.Extensions.Logging.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0" } }, "Microsoft.Extensions.Logging.Abstractions": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "nroMDjS7hNBPtkZqVBbSiQaQjWRDxITI8Y7XnDs97rqG3EbzVTNLZQf7bIeUJcaHOV8bca47s1Uxq94+2oGdxA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "System.Diagnostics.DiagnosticSource": "8.0.1" - } - }, - "Microsoft.Extensions.Logging.Configuration": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "QWwTrsgOnJMmn+XUslm8D2H1n3PkP/u/v52FODtyBc/k4W9r3i2vcXXeeX/upnzllJYRRbrzVzT0OclfNJtBJA==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.Binder": "8.0.2", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2", - "Microsoft.Extensions.Options.ConfigurationExtensions": "8.0.0" - } - }, - "Microsoft.Extensions.Logging.Console": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "uzcg/5U2eLyn5LIKlERkdSxw6VPC1yydnOSQiRRWGBGN3kphq3iL4emORzrojScDmxRhv49gp5BI8U3Dz7y4iA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging.Configuration": "8.0.1", - "Microsoft.Extensions.Options": "8.0.2", - "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Json": "8.0.5" - } - }, - "Microsoft.Extensions.Logging.Debug": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "B8hqNuYudC2RB+L/DI33uO4rf5by41fZVdcVL2oZj0UyoAZqnwTwYHp1KafoH4nkl1/23piNeybFFASaV2HkFg==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2" - } - }, - "Microsoft.Extensions.Logging.EventLog": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "ZD1m4GXoxcZeDJIq8qePKj+QAWeQNO/OG8skvrOG8RQfxLp9MAKRoliTc27xanoNUzeqvX5HhS/I7c0BvwAYUg==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2", - "System.Diagnostics.EventLog": "8.0.1" - } - }, - "Microsoft.Extensions.Logging.EventSource": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "YMXMAla6B6sEf/SnfZYTty633Ool3AH7KOw2LOaaEqwSo2piK4f7HMtzyc3CNiipDnq1fsUSuG5Oc7ZzpVy8WQ==", + "resolved": "8.0.0", + "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2", - "Microsoft.Extensions.Primitives": "8.0.0", - "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Json": "8.0.5" + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" } }, "Microsoft.Extensions.Options": { - "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "dWGKvhFybsaZpGmzkGCbNNwBD1rVlWzrZKANLW/CcbFJpCEceMCGzT7zZwHOGBCbwM0SzBuceMj5HN1LKV1QqA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Options.ConfigurationExtensions": { "type": "Transitive", "resolved": "8.0.0", - "contentHash": "0f4DMRqEd50zQh+UyJc+/HiBsZ3vhAQALgdkcQEalSH1L2isdC7Yj54M3cyo5e+BeO5fcBQ7Dxly8XiBBcvRgw==", + "contentHash": "JOVOfqpnqlVLUzINQ2fox8evY2SKLYJ3BV8QDe/Jyp21u1T7r45x/R/5QdteURMR5r01GxeJSBBUOCOyaNXA3g==", "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.Binder": "8.0.0", "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0", "Microsoft.Extensions.Primitives": "8.0.0" } }, "Microsoft.Extensions.Primitives": { "type": "Transitive", "resolved": "8.0.0", - "contentHash": "bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } + "contentHash": "bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g==" }, "Microsoft.TestPlatform.ObjectModel": { "type": "Transitive", @@ -1673,29 +1406,13 @@ }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "vaoWjvkG1aenR2XdjaVivlCV9fADfgyhW5bZtXT23qaEea0lWiUljdQuze4E31vKM7ZWJaSUsbYIKE3rnzfZUg==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==" }, "System.Diagnostics.EventLog": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "n1ZP7NM2Gkn/MgD8+eOT5MulMj6wfeQMNS2Pizvq5GHCZfjlFMXV2irQlQmJhwA2VABC57M0auudO89Iu2uRLg==" - }, - "System.Runtime.CompilerServices.Unsafe": { "type": "Transitive", "resolved": "6.0.0", - "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } + "contentHash": "lcyUiXTsETK2ALsZrX+nWuHSIQeazhqPphLfaRxzdGaG93+0kELqpgEHtwWOlQe7+jSFnKwaCAgL4kjeZCQJnw==" }, "xunit.abstractions": { "type": "Transitive", @@ -1740,28 +1457,32 @@ "Alexaka1.Serilog.Extensions.Formatting": { "type": "Project", "dependencies": { - "Serilog": "[4.0.2, )" + "Serilog": "[4.1.0, )" } }, - "Microsoft.Extensions.Logging": { + "Serilog": { "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "8.0.1", - "contentHash": "4x+pzsQEbqxhNf1QYRr5TDkLP9UsLT3A6MdRKDDEgrW7h1ljiEPgTNhKYUhNCCAaVpQECVQ+onA91PTPnIp6Lw==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2" - } + "requested": "[4.1.0, )", + "resolved": "4.1.0", + "contentHash": "u1aZI8HZ62LWlq5dZLFwm6jMax/sUwnWZSw5lkPsCt518cJBxFKoNmc7oSxe5aA5BgSkzy9rzwFGR/i/acnSPw==" }, - "Serilog": { + "System.Collections.Immutable": { + "type": "CentralTransitive", + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w==" + }, + "System.Reflection.Metadata": { "type": "CentralTransitive", - "requested": "[4.0.2, )", - "resolved": "4.0.2", - "contentHash": "Vehq4uNYtURe/OnHEpWGvMgrvr5Vou7oZLdn3BuEH5FSCeHXDpNJtpzWoqywXsSvCTuiv0I65mZDRnJSeUvisA==" + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "ANiqLu3DxW9kol/hMmTWbt3414t9ftdIuiIU7j80okq2YzAueo120M442xk1kDJWtmZTqWQn7wHDvMRipVOEOQ==", + "dependencies": { + "System.Collections.Immutable": "9.0.0" + } } }, - "net8.0": { + "net9.0": { "coverlet.collector": { "type": "Direct", "requested": "[6.0.2, )", @@ -1777,36 +1498,6 @@ "Microsoft.TestPlatform.ObjectModel": "17.10.0" } }, - "Microsoft.Extensions.Hosting": { - "type": "Direct", - "requested": "[8.0.1, )", - "resolved": "8.0.1", - "contentHash": "bP9EEkHBEfjgYiG8nUaXqMk/ujwJrffOkNPP7onpRMO8R+OUSESSP4xHkCAXgYZ1COP2Q9lXlU5gkMFh20gRuw==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.Binder": "8.0.2", - "Microsoft.Extensions.Configuration.CommandLine": "8.0.0", - "Microsoft.Extensions.Configuration.EnvironmentVariables": "8.0.0", - "Microsoft.Extensions.Configuration.FileExtensions": "8.0.1", - "Microsoft.Extensions.Configuration.Json": "8.0.1", - "Microsoft.Extensions.Configuration.UserSecrets": "8.0.1", - "Microsoft.Extensions.DependencyInjection": "8.0.1", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Diagnostics": "8.0.1", - "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "Microsoft.Extensions.FileProviders.Physical": "8.0.0", - "Microsoft.Extensions.Hosting.Abstractions": "8.0.1", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging.Configuration": "8.0.1", - "Microsoft.Extensions.Logging.Console": "8.0.1", - "Microsoft.Extensions.Logging.Debug": "8.0.1", - "Microsoft.Extensions.Logging.EventLog": "8.0.1", - "Microsoft.Extensions.Logging.EventSource": "8.0.1", - "Microsoft.Extensions.Options": "8.0.2" - } - }, "Microsoft.NET.Test.Sdk": { "type": "Direct", "requested": "[17.11.1, )", @@ -1826,6 +1517,12 @@ "Castle.Core": "5.1.1" } }, + "PolySharp": { + "type": "Direct", + "requested": "[1.14.1, )", + "resolved": "1.14.1", + "contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ==" + }, "Serilog.Expressions": { "type": "Direct", "requested": "[5.0.0, )", @@ -1850,11 +1547,11 @@ }, "Serilog.Sinks.Async": { "type": "Direct", - "requested": "[2.0.0, )", - "resolved": "2.0.0", - "contentHash": "a+kTyUUxPAOZWKJiNbDqCPMiP0BWBWzObyTpRmGLrgCecgc/YJ+HqYGjsQoS6Sj9cRVXB9hH5O1mTZ0DiewG2w==", + "requested": "[2.1.0, )", + "resolved": "2.1.0", + "contentHash": "SnmRknWsSMgyo9wDXeZZCqSp48kkQYy44taSM6vcpxfiRICzSf09oLKEmVr0RCwQnfd8mJQ2WNN6nvhqf0RowQ==", "dependencies": { - "Serilog": "4.0.0" + "Serilog": "4.1.0" } }, "Serilog.Sinks.Console": { @@ -1875,24 +1572,6 @@ "Serilog": "4.0.0" } }, - "System.Collections.Immutable": { - "type": "Direct", - "requested": "[8.0.0, )", - "resolved": "8.0.0", - "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==" - }, - "System.Reflection.Metadata": { - "type": "Direct", - "requested": "[8.0.1, )", - "resolved": "8.0.1", - "contentHash": "+4sz5vGHPlo+5NpAxf2IlABnqVvOHOxv17b4dONv4hVwyNeFAeBevT14DIn7X3YWQ+eQFYO3YeTBNCleAblOKA==" - }, - "System.Text.Json": { - "type": "Direct", - "requested": "[8.0.5, )", - "resolved": "8.0.5", - "contentHash": "0f1B50Ss7rqxXiaBJyzUu9bWFOO2/zSlifZ/UNMdiIpDYe4cY4LQQicP4nirK1OS31I43rn062UIJ1Q9bpmHpg==" - }, "xunit": { "type": "Direct", "requested": "[2.9.2, )", @@ -1923,15 +1602,6 @@ "resolved": "17.11.1", "contentHash": "nPJqrcA5iX+Y0kqoT3a+pD/8lrW/V7ayqnEJQsTonSoPz59J8bmoQhcSN4G8+UJ64Hkuf0zuxnfuj2lkHOq4cA==" }, - "Microsoft.Extensions.Configuration": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "0J/9YNXTMWSZP2p2+nvl8p71zpSwokZXZuJW+VjdErkegAnFdO1XlqtA62SJtgVYHdKu3uPxJHcMR/r35HwFBA==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, "Microsoft.Extensions.Configuration.Abstractions": { "type": "Transitive", "resolved": "8.0.0", @@ -1940,96 +1610,27 @@ "Microsoft.Extensions.Primitives": "8.0.0" } }, - "Microsoft.Extensions.Configuration.Binder": { - "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "7IQhGK+wjyGrNsPBjJcZwWAr+Wf6D4+TwOptUt77bWtgNkiV8tDEbhFS+dDamtQFZ2X7kWG9m71iZQRj2x3zgQ==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0" - } - }, - "Microsoft.Extensions.Configuration.CommandLine": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "NZuZMz3Q8Z780nKX3ifV1fE7lS+6pynDHK71OfU4OZ1ItgvDOhyOC7E6z+JMZrAj63zRpwbdldYFk499t3+1dQ==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0" - } - }, - "Microsoft.Extensions.Configuration.EnvironmentVariables": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "plvZ0ZIpq+97gdPNNvhwvrEZ92kNml9hd1pe3idMA7svR0PztdzVLkoWLcRFgySYXUJc3kSM3Xw3mNFMo/bxRA==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0" - } - }, - "Microsoft.Extensions.Configuration.FileExtensions": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "EJzSNO9oaAXnTdtdNO6npPRsIIeZCBSNmdQ091VDO7fBiOtJAAeEq6dtrVXIi3ZyjC5XRSAtVvF8SzcneRHqKQ==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "Microsoft.Extensions.FileProviders.Physical": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Configuration.Json": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "L89DLNuimOghjV3tLx0ArFDwVEJD6+uGB3BMCMX01kaLzXkaXHb2021xOMl2QOxUxbdePKUZsUY7n2UUkycjRg==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.FileExtensions": "8.0.1", - "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0" - } - }, - "Microsoft.Extensions.Configuration.UserSecrets": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "7tYqdPPpAK+3jO9d5LTuCK2VxrEdf85Ol4trUr6ds4jclBecadWZ/RyPCbNjfbN5iGTfUnD/h65TOQuqQv2c+A==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.Json": "8.0.1", - "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "Microsoft.Extensions.FileProviders.Physical": "8.0.0" - } - }, "Microsoft.Extensions.DependencyInjection": { "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "BmANAnR5Xd4Oqw7yQ75xOAYODybZQRzdeNucg7kS5wWKd2PNnMdYtJ2Vciy0QLylRmv42DGl5+AFL9izA6F1Rw==", + "resolved": "8.0.0", + "contentHash": "V8S3bsm50ig6JSyrbcJJ8bW2b9QLGouz+G1miK3UTaOWmMtFwNNNzUf4AleyDWUmTrWMLNnFSLEQtxmxgNQnNQ==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2" + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" } }, "Microsoft.Extensions.DependencyInjection.Abstractions": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "3iE7UF7MQkCv1cxzCahz+Y/guQbTqieyxyaWKhrRO91itI9cOKO76OHeQDahqG4MmW5umr3CcCvGmK92lWNlbg==" - }, - "Microsoft.Extensions.Diagnostics": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "doVPCUUCY7c6LhBsEfiy3W1bvS7Mi6LkfQMS8nlC22jZWNxBv8VO8bdfeyvpYFst6Kxqk7HBC6lytmEoBssvSQ==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Diagnostics.Abstractions": "8.0.1", - "Microsoft.Extensions.Options.ConfigurationExtensions": "8.0.0" - } + "resolved": "8.0.0", + "contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==" }, "Microsoft.Extensions.Diagnostics.Abstractions": { "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "elH2vmwNmsXuKmUeMQ4YW9ldXiF+gSGDgg1vORksob5POnpaI6caj1Hu8zaYbEuibhqCoWg0YRWDazBY3zjBfg==", + "resolved": "8.0.0", + "contentHash": "JHYCQG7HmugNYUhOl368g+NMxYE/N/AiclCYRNlgCY9eVyiBkOHMwK4x60RYMxv9EL3+rmj1mqHvdCiPpC+D4Q==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2" + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0", + "System.Diagnostics.DiagnosticSource": "8.0.0" } }, "Microsoft.Extensions.FileProviders.Abstractions": { @@ -2040,120 +1641,42 @@ "Microsoft.Extensions.Primitives": "8.0.0" } }, - "Microsoft.Extensions.FileProviders.Physical": { + "Microsoft.Extensions.Hosting.Abstractions": { "type": "Transitive", "resolved": "8.0.0", - "contentHash": "UboiXxpPUpwulHvIAVE36Knq0VSHaAmfrFkegLyBZeaADuKezJ/AIXYAW8F5GBlGk/VaibN2k/Zn1ca8YAfVdA==", + "contentHash": "AG7HWwVRdCHlaA++1oKDxLsXIBxmDpMPb3VoyOoAghEWnkUvEAdYQUwnV4jJbAaa/nMYNiEh5ByoLauZBEiovg==", "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Diagnostics.Abstractions": "8.0.0", "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "Microsoft.Extensions.FileSystemGlobbing": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" + "Microsoft.Extensions.Logging.Abstractions": "8.0.0" } }, - "Microsoft.Extensions.FileSystemGlobbing": { + "Microsoft.Extensions.Logging": { "type": "Transitive", "resolved": "8.0.0", - "contentHash": "OK+670i7esqlQrPjdIKRbsyMCe9g5kSLpRRQGSr4Q58AOYEe/hCnfLZprh7viNisSUUQZmMrbbuDaIrP+V1ebQ==" - }, - "Microsoft.Extensions.Hosting.Abstractions": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "nHwq9aPBdBPYXPti6wYEEfgXddfBrYC+CQLn+qISiwQq5tpfaqDZSKOJNxoe9rfQxGf1c+2wC/qWFe1QYJPYqw==", + "contentHash": "tvRkov9tAJ3xP51LCv3FJ2zINmv1P8Hi8lhhtcKGqM+ImiTCC84uOPEI4z8Cdq2C3o9e+Aa0Gw0rmrsJD77W+w==", "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Diagnostics.Abstractions": "8.0.1", - "Microsoft.Extensions.FileProviders.Abstractions": "8.0.0", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2" + "Microsoft.Extensions.DependencyInjection": "8.0.0", + "Microsoft.Extensions.Logging.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0" } }, "Microsoft.Extensions.Logging.Abstractions": { "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "nroMDjS7hNBPtkZqVBbSiQaQjWRDxITI8Y7XnDs97rqG3EbzVTNLZQf7bIeUJcaHOV8bca47s1Uxq94+2oGdxA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2" - } - }, - "Microsoft.Extensions.Logging.Configuration": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "QWwTrsgOnJMmn+XUslm8D2H1n3PkP/u/v52FODtyBc/k4W9r3i2vcXXeeX/upnzllJYRRbrzVzT0OclfNJtBJA==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.Binder": "8.0.2", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2", - "Microsoft.Extensions.Options.ConfigurationExtensions": "8.0.0" - } - }, - "Microsoft.Extensions.Logging.Console": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "uzcg/5U2eLyn5LIKlERkdSxw6VPC1yydnOSQiRRWGBGN3kphq3iL4emORzrojScDmxRhv49gp5BI8U3Dz7y4iA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging.Configuration": "8.0.1", - "Microsoft.Extensions.Options": "8.0.2" - } - }, - "Microsoft.Extensions.Logging.Debug": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "B8hqNuYudC2RB+L/DI33uO4rf5by41fZVdcVL2oZj0UyoAZqnwTwYHp1KafoH4nkl1/23piNeybFFASaV2HkFg==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2" - } - }, - "Microsoft.Extensions.Logging.EventLog": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "ZD1m4GXoxcZeDJIq8qePKj+QAWeQNO/OG8skvrOG8RQfxLp9MAKRoliTc27xanoNUzeqvX5HhS/I7c0BvwAYUg==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2", - "System.Diagnostics.EventLog": "8.0.1" - } - }, - "Microsoft.Extensions.Logging.EventSource": { - "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "YMXMAla6B6sEf/SnfZYTty633Ool3AH7KOw2LOaaEqwSo2piK4f7HMtzyc3CNiipDnq1fsUSuG5Oc7ZzpVy8WQ==", + "resolved": "8.0.0", + "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", - "Microsoft.Extensions.Logging": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2", - "Microsoft.Extensions.Primitives": "8.0.0" + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" } }, "Microsoft.Extensions.Options": { - "type": "Transitive", - "resolved": "8.0.2", - "contentHash": "dWGKvhFybsaZpGmzkGCbNNwBD1rVlWzrZKANLW/CcbFJpCEceMCGzT7zZwHOGBCbwM0SzBuceMj5HN1LKV1QqA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Options.ConfigurationExtensions": { "type": "Transitive", "resolved": "8.0.0", - "contentHash": "0f4DMRqEd50zQh+UyJc+/HiBsZ3vhAQALgdkcQEalSH1L2isdC7Yj54M3cyo5e+BeO5fcBQ7Dxly8XiBBcvRgw==", + "contentHash": "JOVOfqpnqlVLUzINQ2fox8evY2SKLYJ3BV8QDe/Jyp21u1T7r45x/R/5QdteURMR5r01GxeJSBBUOCOyaNXA3g==", "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.Binder": "8.0.0", "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0", "Microsoft.Extensions.Primitives": "8.0.0" } }, @@ -2193,10 +1716,15 @@ "Serilog": "3.1.1" } }, + "System.Diagnostics.DiagnosticSource": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==" + }, "System.Diagnostics.EventLog": { "type": "Transitive", - "resolved": "8.0.1", - "contentHash": "n1ZP7NM2Gkn/MgD8+eOT5MulMj6wfeQMNS2Pizvq5GHCZfjlFMXV2irQlQmJhwA2VABC57M0auudO89Iu2uRLg==" + "resolved": "6.0.0", + "contentHash": "lcyUiXTsETK2ALsZrX+nWuHSIQeazhqPphLfaRxzdGaG93+0kELqpgEHtwWOlQe7+jSFnKwaCAgL4kjeZCQJnw==" }, "xunit.abstractions": { "type": "Transitive", @@ -2241,25 +1769,20 @@ "Alexaka1.Serilog.Extensions.Formatting": { "type": "Project", "dependencies": { - "Serilog": "[4.0.2, )" + "Serilog": "[4.1.0, )" } }, - "Microsoft.Extensions.Logging": { + "Serilog": { "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "8.0.1", - "contentHash": "4x+pzsQEbqxhNf1QYRr5TDkLP9UsLT3A6MdRKDDEgrW7h1ljiEPgTNhKYUhNCCAaVpQECVQ+onA91PTPnIp6Lw==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "8.0.1", - "Microsoft.Extensions.Logging.Abstractions": "8.0.2", - "Microsoft.Extensions.Options": "8.0.2" - } + "requested": "[4.1.0, )", + "resolved": "4.1.0", + "contentHash": "u1aZI8HZ62LWlq5dZLFwm6jMax/sUwnWZSw5lkPsCt518cJBxFKoNmc7oSxe5aA5BgSkzy9rzwFGR/i/acnSPw==" }, - "Serilog": { + "System.Reflection.Metadata": { "type": "CentralTransitive", - "requested": "[4.0.2, )", - "resolved": "4.0.2", - "contentHash": "Vehq4uNYtURe/OnHEpWGvMgrvr5Vou7oZLdn3BuEH5FSCeHXDpNJtpzWoqywXsSvCTuiv0I65mZDRnJSeUvisA==" + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "ANiqLu3DxW9kol/hMmTWbt3414t9ftdIuiIU7j80okq2YzAueo120M442xk1kDJWtmZTqWQn7wHDvMRipVOEOQ==" } } } diff --git a/yarn.lock b/yarn.lock index 839f4fd..9992b1d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6,11 +6,11 @@ __metadata: cacheKey: 10c0 "@babel/runtime@npm:^7.5.5": - version: 7.24.7 - resolution: "@babel/runtime@npm:7.24.7" + version: 7.26.0 + resolution: "@babel/runtime@npm:7.26.0" dependencies: regenerator-runtime: "npm:^0.14.0" - checksum: 10c0/b6fa3ec61a53402f3c1d75f4d808f48b35e0dfae0ec8e2bb5c6fc79fb95935da75766e0ca534d0f1c84871f6ae0d2ebdd950727cfadb745a2cdbef13faef5513 + checksum: 10c0/12c01357e0345f89f4f7e8c0e81921f2a3e3e101f06e8eaa18a382b517376520cd2fa8c237726eb094dab25532855df28a7baaf1c26342b52782f6936b07c287 languageName: node linkType: hard @@ -551,9 +551,9 @@ __metadata: linkType: hard "ignore@npm:^5.2.0": - version: 5.3.1 - resolution: "ignore@npm:5.3.1" - checksum: 10c0/703f7f45ffb2a27fb2c5a8db0c32e7dee66b33a225d28e8db4e1be6474795f606686a6e3bcc50e1aa12f2042db4c9d4a7d60af3250511de74620fbed052ea4cd + version: 5.3.2 + resolution: "ignore@npm:5.3.2" + checksum: 10c0/f9f652c957983634ded1e7f02da3b559a0d4cc210fca3792cb67f1b153623c9c42efdc1c4121af171e295444459fc4a9201101fb041b1104a3c000bccb188337 languageName: node linkType: hard @@ -733,9 +733,9 @@ __metadata: linkType: hard "package-manager-detector@npm:^0.2.0": - version: 0.2.0 - resolution: "package-manager-detector@npm:0.2.0" - checksum: 10c0/1ad699098018f9425b0f0a197537e085420ebcb7b6c49ef5a8dcff198f50d8de206f52ed10867624b7cb01bebac76396f5ac020dcff96f44154d59e6a5dcf36a + version: 0.2.4 + resolution: "package-manager-detector@npm:0.2.4" + checksum: 10c0/a777b8758afd9372874909becf7ba72616b1a8d568c48ab3dce6028e9937973f75f6d3af714090a3577693307318fe657035e0ecd12610b64fc99e02419db7b1 languageName: node linkType: hard @@ -754,9 +754,9 @@ __metadata: linkType: hard "picocolors@npm:^1.1.0": - version: 1.1.0 - resolution: "picocolors@npm:1.1.0" - checksum: 10c0/86946f6032148801ef09c051c6fb13b5cf942eaf147e30ea79edb91dd32d700934edebe782a1078ff859fb2b816792e97ef4dab03d7f0b804f6b01a0df35e023 + version: 1.1.1 + resolution: "picocolors@npm:1.1.1" + checksum: 10c0/e2e3e8170ab9d7c7421969adaa7e1b31434f789afb9b3f115f6b96d91945041ac3ceb02e9ec6fe6510ff036bcc0bf91e69a1772edc0b707e12b19c0f2d6bcf58 languageName: node linkType: hard @@ -847,11 +847,11 @@ __metadata: linkType: hard "semver@npm:^7.5.3": - version: 7.6.2 - resolution: "semver@npm:7.6.2" + version: 7.6.3 + resolution: "semver@npm:7.6.3" bin: semver: bin/semver.js - checksum: 10c0/97d3441e97ace8be4b1976433d1c32658f6afaff09f143e52c593bae7eef33de19e3e369c88bd985ce1042c6f441c80c6803078d1de2a9988080b66684cbb30c + checksum: 10c0/88f33e148b210c153873cb08cfe1e281d518aaa9a666d4d148add6560db5cd3c582f3a08ccb91f38d5f379ead256da9931234ed122057f40bb5766e65e58adaf languageName: node linkType: hard