Change the serialization from the WireMockServerSettings in the logging when WireMockServer is started

This commit is contained in:
Stef Heyenrath
2026-07-01 11:21:56 +02:00
parent cbc28c235c
commit 56c606e1c4
6 changed files with 237 additions and 7 deletions
@@ -1,8 +1,6 @@
// Copyright © WireMock.Net
using System.IO;
using System.Reflection;
using System.Threading.Tasks;
using log4net;
using log4net.Config;
using log4net.Repository;
@@ -12,7 +10,7 @@ namespace WireMock.Net.Console.NET8;
static class Program
{
private static readonly ILoggerRepository LogRepository = LogManager.GetRepository(Assembly.GetEntryAssembly());
private static readonly ILoggerRepository LogRepository = LogManager.GetRepository(Assembly.GetEntryAssembly()!);
private static readonly ILog Log = LogManager.GetLogger(typeof(Program));
static async Task Main(params string[] args)
@@ -70,7 +70,7 @@ public class WireMockService : IWireMockService
_server = WireMockServer.Start(_settings);
_logger.LogInformation($"WireMock.Net server settings {JsonConvert.SerializeObject(_settings)}");
_logger.LogInformation("WireMock.Net server settings {Settings}", JsonConvert.SerializeObject(_settings));
}
public void Stop()