mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-27 11:17:31 +02:00
Add log4net logging (#89)
* logging + fixed proxy isses * Add more logging * comments * 1.0.3.1
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using WireMock.Server;
|
||||
using WireMock.Settings;
|
||||
using WireMock.Validation;
|
||||
using JetBrains.Annotations;
|
||||
using Newtonsoft.Json;
|
||||
using log4net;
|
||||
|
||||
namespace WireMock.Net.StandAlone
|
||||
{
|
||||
@@ -13,8 +12,10 @@ namespace WireMock.Net.StandAlone
|
||||
/// </summary>
|
||||
public static class StandAloneApp
|
||||
{
|
||||
private static readonly ILog Log = LogManager.GetLogger(typeof(StandAloneApp));
|
||||
|
||||
/// <summary>
|
||||
/// Start WireMock.Net standalone based on the FluentMockServerSettings.
|
||||
/// Start WireMock.Net standalone Server based on the FluentMockServerSettings.
|
||||
/// </summary>
|
||||
/// <param name="settings">The FluentMockServerSettings</param>
|
||||
[PublicAPI]
|
||||
@@ -26,7 +27,7 @@ namespace WireMock.Net.StandAlone
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start WireMock.Net standalone based on the commandline arguments.
|
||||
/// Start WireMock.Net standalone Server based on the commandline arguments.
|
||||
/// </summary>
|
||||
/// <param name="args">The commandline arguments</param>
|
||||
[PublicAPI]
|
||||
@@ -34,7 +35,7 @@ namespace WireMock.Net.StandAlone
|
||||
{
|
||||
Check.NotNull(args, nameof(args));
|
||||
|
||||
Console.WriteLine("WireMock.Net server arguments [{0}]", string.Join(", ", args.Select(a => $"'{a}'")));
|
||||
Log.DebugFormat("WireMock.Net server arguments [{0}]", string.Join(", ", args.Select(a => $"'{a}'")));
|
||||
|
||||
var parser = new SimpleCommandLineParser();
|
||||
parser.Parse(args);
|
||||
@@ -73,11 +74,9 @@ namespace WireMock.Net.StandAlone
|
||||
};
|
||||
}
|
||||
|
||||
Console.WriteLine("WireMock.Net server settings {0}", JsonConvert.SerializeObject(settings, Formatting.Indented));
|
||||
|
||||
FluentMockServer server = Start(settings);
|
||||
|
||||
Console.WriteLine("WireMock.Net server listening at {0}", string.Join(",", server.Urls));
|
||||
Log.InfoFormat("WireMock.Net server listening at {0}", string.Join(",", server.Urls));
|
||||
|
||||
return server;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<Description>Lightweight StandAlone Http Mocking Server for .Net.</Description>
|
||||
<AssemblyTitle>WireMock.Net.StandAlone</AssemblyTitle>
|
||||
<Version>1.0.3</Version>
|
||||
<Version>1.0.3.1</Version>
|
||||
<Authors>Stef Heyenrath</Authors>
|
||||
<TargetFrameworks>net452;net46;netstandard1.3;netstandard2.0</TargetFrameworks>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
@@ -36,10 +36,7 @@
|
||||
<PackageReference Include="JetBrains.Annotations" Version="10.4.0">
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<!-- <PackageReference Include="CommandLineArgumentsParser" Version="3.0.16" /> -->
|
||||
<!-- <PackageReference Include="Marsonsoft.CommandLineParser" Version="1.0.34" /> -->
|
||||
<!-- <PackageReference Include="BurnSystems.CommandLine" Version="1.1.0" /> -->
|
||||
<!-- <ProjectReference Include="..\..\..\CommandLineParser\src\CommandLineArgumentsParser\CommandLineArgumentsParser.csproj" /> -->
|
||||
<PackageReference Include="log4net" Version="2.0.8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user