mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-19 15:31:39 +02:00
--WireMockLogger WireMockConsoleLogger (#282)
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>1.0.17</VersionPrefix>
|
<VersionPrefix>1.0.18</VersionPrefix>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Choose>
|
<Choose>
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
https://github.com/StefH/GitHubReleaseNotes
|
https://github.com/StefH/GitHubReleaseNotes
|
||||||
|
|
||||||
GitHubReleaseNotes.exe --output CHANGELOG.md --skip-empty-releases --version 1.0.17.0
|
GitHubReleaseNotes.exe --output CHANGELOG.md --skip-empty-releases --version 1.0.18.0
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
"profiles": {
|
"profiles": {
|
||||||
"WireMock.Net.StandAlone.NETCoreApp": {
|
"WireMock.Net.StandAlone.NETCoreApp": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"commandLineArgs": "--Urls http://*:9091"
|
"commandLineArgs": "--Urls http://*:9091 --WireMockLogger WireMockConsoleLogger"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -50,7 +50,7 @@ namespace WireMock.Net.StandAlone
|
|||||||
AdminUsername = parser.GetStringValue("AdminUsername"),
|
AdminUsername = parser.GetStringValue("AdminUsername"),
|
||||||
AdminPassword = parser.GetStringValue("AdminPassword"),
|
AdminPassword = parser.GetStringValue("AdminPassword"),
|
||||||
MaxRequestLogCount = parser.GetIntValue("MaxRequestLogCount"),
|
MaxRequestLogCount = parser.GetIntValue("MaxRequestLogCount"),
|
||||||
RequestLogExpirationDuration = parser.GetIntValue("RequestLogExpirationDuration"),
|
RequestLogExpirationDuration = parser.GetIntValue("RequestLogExpirationDuration")
|
||||||
};
|
};
|
||||||
|
|
||||||
if (logger != null)
|
if (logger != null)
|
||||||
@@ -58,6 +58,11 @@ namespace WireMock.Net.StandAlone
|
|||||||
settings.Logger = logger;
|
settings.Logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (parser.GetStringValue("WireMockLogger") == "WireMockConsoleLogger")
|
||||||
|
{
|
||||||
|
settings.Logger = new WireMockConsoleLogger();
|
||||||
|
}
|
||||||
|
|
||||||
if (parser.Contains("Port"))
|
if (parser.Contains("Port"))
|
||||||
{
|
{
|
||||||
settings.Port = parser.GetIntValue("Port");
|
settings.Port = parser.GetIntValue("Port");
|
||||||
@@ -82,9 +87,7 @@ namespace WireMock.Net.StandAlone
|
|||||||
|
|
||||||
settings.Logger.Debug("WireMock.Net server arguments [{0}]", string.Join(", ", args.Select(a => $"'{a}'")));
|
settings.Logger.Debug("WireMock.Net server arguments [{0}]", string.Join(", ", args.Select(a => $"'{a}'")));
|
||||||
|
|
||||||
FluentMockServer server = Start(settings);
|
return Start(settings);
|
||||||
|
|
||||||
return server;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using WireMock.Exceptions;
|
using WireMock.Exceptions;
|
||||||
using WireMock.Handlers;
|
using WireMock.Handlers;
|
||||||
using WireMock.Logging;
|
using WireMock.Logging;
|
||||||
@@ -185,7 +185,7 @@ namespace WireMock.Server
|
|||||||
|
|
||||||
private FluentMockServer(IFluentMockServerSettings settings)
|
private FluentMockServer(IFluentMockServerSettings settings)
|
||||||
{
|
{
|
||||||
settings.Logger = settings.Logger ?? new WireMockConsoleLogger();
|
settings.Logger = settings.Logger ?? new WireMockNullLogger();
|
||||||
|
|
||||||
_logger = settings.Logger;
|
_logger = settings.Logger;
|
||||||
_fileSystemHandler = settings.FileSystemHandler ?? new LocalFileSystemHandler();
|
_fileSystemHandler = settings.FileSystemHandler ?? new LocalFileSystemHandler();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using JetBrains.Annotations;
|
||||||
using JetBrains.Annotations;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using WireMock.Handlers;
|
using WireMock.Handlers;
|
||||||
using WireMock.Logging;
|
using WireMock.Logging;
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace WireMock.Settings
|
|||||||
bool? UseSSL { get; set; }
|
bool? UseSSL { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets wether to start admin interface.
|
/// Gets or sets whether to start admin interface.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
bool? StartAdminInterface { get; set; }
|
bool? StartAdminInterface { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user