From 5be31ca7468fd4f8aaf53ef3f0d8e65e54f5949f Mon Sep 17 00:00:00 2001 From: Tetteh Sackey Date: Wed, 8 Jan 2020 13:52:31 -0500 Subject: [PATCH 1/2] test commit --- Serilog.Sinks.Datadog.Logs.sln | 32 ++++++++++--------- .../Sinks/Datadog/DatadogClient.cs | 2 +- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Serilog.Sinks.Datadog.Logs.sln b/Serilog.Sinks.Datadog.Logs.sln index d9d3252..fc55d49 100755 --- a/Serilog.Sinks.Datadog.Logs.sln +++ b/Serilog.Sinks.Datadog.Logs.sln @@ -1,11 +1,10 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29418.71 MinimumVisualStudioVersion = 15.0.26124.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D0A5A0BA-56F9-4C56-8785-8C9F23A3B411}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.Datadog.Logs", "src\Serilog.Sinks.Datadog.Logs\Serilog.Sinks.Datadog.Logs.csproj", "{897105F7-58A7-4849-98A8-EB8EDD450E47}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Sinks.Datadog.Logs", "src\Serilog.Sinks.Datadog.Logs\Serilog.Sinks.Datadog.Logs.csproj", "{897105F7-58A7-4849-98A8-EB8EDD450E47}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -16,24 +15,27 @@ Global Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {897105F7-58A7-4849-98A8-EB8EDD450E47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {897105F7-58A7-4849-98A8-EB8EDD450E47}.Debug|Any CPU.Build.0 = Debug|Any CPU - {897105F7-58A7-4849-98A8-EB8EDD450E47}.Debug|x64.ActiveCfg = Debug|x64 - {897105F7-58A7-4849-98A8-EB8EDD450E47}.Debug|x64.Build.0 = Debug|x64 - {897105F7-58A7-4849-98A8-EB8EDD450E47}.Debug|x86.ActiveCfg = Debug|x86 - {897105F7-58A7-4849-98A8-EB8EDD450E47}.Debug|x86.Build.0 = Debug|x86 + {897105F7-58A7-4849-98A8-EB8EDD450E47}.Debug|x64.ActiveCfg = Debug|Any CPU + {897105F7-58A7-4849-98A8-EB8EDD450E47}.Debug|x64.Build.0 = Debug|Any CPU + {897105F7-58A7-4849-98A8-EB8EDD450E47}.Debug|x86.ActiveCfg = Debug|Any CPU + {897105F7-58A7-4849-98A8-EB8EDD450E47}.Debug|x86.Build.0 = Debug|Any CPU {897105F7-58A7-4849-98A8-EB8EDD450E47}.Release|Any CPU.ActiveCfg = Release|Any CPU {897105F7-58A7-4849-98A8-EB8EDD450E47}.Release|Any CPU.Build.0 = Release|Any CPU - {897105F7-58A7-4849-98A8-EB8EDD450E47}.Release|x64.ActiveCfg = Release|x64 - {897105F7-58A7-4849-98A8-EB8EDD450E47}.Release|x64.Build.0 = Release|x64 - {897105F7-58A7-4849-98A8-EB8EDD450E47}.Release|x86.ActiveCfg = Release|x86 - {897105F7-58A7-4849-98A8-EB8EDD450E47}.Release|x86.Build.0 = Release|x86 + {897105F7-58A7-4849-98A8-EB8EDD450E47}.Release|x64.ActiveCfg = Release|Any CPU + {897105F7-58A7-4849-98A8-EB8EDD450E47}.Release|x64.Build.0 = Release|Any CPU + {897105F7-58A7-4849-98A8-EB8EDD450E47}.Release|x86.ActiveCfg = Release|Any CPU + {897105F7-58A7-4849-98A8-EB8EDD450E47}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {897105F7-58A7-4849-98A8-EB8EDD450E47} = {D0A5A0BA-56F9-4C56-8785-8C9F23A3B411} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DAA72944-174B-45F4-92A5-FCEB78A03E00} + EndGlobalSection EndGlobal diff --git a/src/Serilog.Sinks.Datadog.Logs/Sinks/Datadog/DatadogClient.cs b/src/Serilog.Sinks.Datadog.Logs/Sinks/Datadog/DatadogClient.cs index a1f643b..11211fc 100644 --- a/src/Serilog.Sinks.Datadog.Logs/Sinks/Datadog/DatadogClient.cs +++ b/src/Serilog.Sinks.Datadog.Logs/Sinks/Datadog/DatadogClient.cs @@ -21,6 +21,6 @@ public interface IDatadogClient /// /// Cleanup existing resources. /// - void Close(); + void Close(); } } From c6efa4f1acf260503e6b33bd2086f3ec6fa90cd9 Mon Sep 17 00:00:00 2001 From: Tetteh Sackey Date: Tue, 14 Jan 2020 10:59:55 -0500 Subject: [PATCH 2/2] renamed logLevel to restrictedToMinimumLevel --- .../LoggerConfigurationDatadogLogsExtensions.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Serilog.Sinks.Datadog.Logs/Configuration/Extensions/Microsoft.Extensions.Configuration/LoggerConfigurationDatadogLogsExtensions.cs b/src/Serilog.Sinks.Datadog.Logs/Configuration/Extensions/Microsoft.Extensions.Configuration/LoggerConfigurationDatadogLogsExtensions.cs index 1b79c60..85591bb 100644 --- a/src/Serilog.Sinks.Datadog.Logs/Configuration/Extensions/Microsoft.Extensions.Configuration/LoggerConfigurationDatadogLogsExtensions.cs +++ b/src/Serilog.Sinks.Datadog.Logs/Configuration/Extensions/Microsoft.Extensions.Configuration/LoggerConfigurationDatadogLogsExtensions.cs @@ -27,6 +27,7 @@ public static class LoggerConfigurationDatadogExtensions /// Custom tags. /// The Datadog logs client configuration. /// A config section defining the datadog configuration. + /// The minimum level for this sink /// Logger configuration /// A required parameter is null. public static LoggerConfiguration DatadogLogs( @@ -38,7 +39,7 @@ public static LoggerConfiguration DatadogLogs( string[] tags = null, DatadogConfiguration configuration = null, IConfigurationSection configurationSection = null, - LogEventLevel logLevel = LevelAlias.Minimum) + LogEventLevel restrictedToMinimumLevel = LevelAlias.Minimum) { if (loggerConfiguration == null) { @@ -51,7 +52,7 @@ public static LoggerConfiguration DatadogLogs( var config = ApplyMicrosoftExtensionsConfiguration.ConfigureDatadogConfiguration(configuration, configurationSection); - return loggerConfiguration.Sink(new DatadogSink(apiKey, source, service, host, tags, config), logLevel); + return loggerConfiguration.Sink(new DatadogSink(apiKey, source, service, host, tags, config), restrictedToMinimumLevel); } } }