Refactor logging. Remove TCP adapter from HTTP host if disabled.

This commit is contained in:
Christian
2018-05-13 20:18:08 +02:00
parent 8df8cb1eb6
commit dc7b9414d9
13 changed files with 41 additions and 38 deletions
@@ -4,7 +4,7 @@ namespace MQTTnet.Diagnostics
{
public interface IMqttNetChildLogger
{
IMqttNetChildLogger CreateChildLogger(string source);
IMqttNetChildLogger CreateChildLogger(string source = null);
void Verbose(string message, params object[] parameters);
@@ -6,7 +6,7 @@ namespace MQTTnet.Diagnostics
{
event EventHandler<MqttNetLogMessagePublishedEventArgs> LogMessagePublished;
IMqttNetChildLogger CreateChildLogger(string source);
IMqttNetChildLogger CreateChildLogger(string source = null);
void Publish(MqttNetLogLevel logLevel, string source, string message, object[] parameters, Exception exception);
}
@@ -13,7 +13,7 @@ namespace MQTTnet.Diagnostics
public event EventHandler<MqttNetLogMessagePublishedEventArgs> LogMessagePublished;
public IMqttNetChildLogger CreateChildLogger(string source)
public IMqttNetChildLogger CreateChildLogger(string source = null)
{
return new MqttNetChildLogger(this, source);
}