mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-08-22 03:34:15 +02:00
Fix WireMockLogger implementation in dotnet-WireMock (#1431)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using System.Text.Json.Serialization;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using WireMock.Admin.Mappings;
|
||||
using WireMock.Admin.Requests;
|
||||
using WireMock.Types;
|
||||
@@ -9,10 +10,13 @@ namespace WireMock.Net.Json;
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(EncodingModel))]
|
||||
[JsonSerializable(typeof(JArray))]
|
||||
[JsonSerializable(typeof(JObject))]
|
||||
[JsonSerializable(typeof(LogEntryModel))]
|
||||
[JsonSerializable(typeof(LogRequestModel))]
|
||||
[JsonSerializable(typeof(LogResponseModel))]
|
||||
[JsonSerializable(typeof(LogRequestMatchModel))]
|
||||
[JsonSerializable(typeof(StatusModel))]
|
||||
[JsonSerializable(typeof(WireMockList<string>))]
|
||||
internal partial class SourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using System;
|
||||
using System.Text.Json;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using WireMock.Admin.Requests;
|
||||
@@ -11,11 +10,6 @@ namespace WireMock.Net;
|
||||
|
||||
public class WireMockLogger : IWireMockLogger
|
||||
{
|
||||
private readonly JsonSerializerOptions _options = new()
|
||||
{
|
||||
WriteIndented = true
|
||||
};
|
||||
|
||||
private readonly ILogger _logger;
|
||||
|
||||
public WireMockLogger(ILogger logger)
|
||||
|
||||
Reference in New Issue
Block a user