diff --git a/src/Sitko.Core.OpenSearch/ApplicationExtensions.cs b/src/Sitko.Core.OpenSearch/ApplicationExtensions.cs index b1800fefd..d5af44bdc 100644 --- a/src/Sitko.Core.OpenSearch/ApplicationExtensions.cs +++ b/src/Sitko.Core.OpenSearch/ApplicationExtensions.cs @@ -7,25 +7,25 @@ namespace Sitko.Core.OpenSearch; [PublicAPI] public static class ApplicationExtensions { - public static IHostApplicationBuilder AddOpenSearch(this IHostApplicationBuilder hostApplicationBuilder, - Action configure, string? optionsKey = null) + public static IHostApplicationBuilder AddOpenSearchLogging(this IHostApplicationBuilder hostApplicationBuilder, + Action configure, string? optionsKey = null) { - hostApplicationBuilder.GetSitkoCore().AddOpenSearch(configure, optionsKey); + hostApplicationBuilder.GetSitkoCore().AddOpenSearchLogging(configure, optionsKey); return hostApplicationBuilder; } - public static IHostApplicationBuilder AddOpenSearch(this IHostApplicationBuilder hostApplicationBuilder, - Action? configure = null, string? optionsKey = null) + public static IHostApplicationBuilder AddOpenSearchLogging(this IHostApplicationBuilder hostApplicationBuilder, + Action? configure = null, string? optionsKey = null) { - hostApplicationBuilder.GetSitkoCore().AddOpenSearch(configure, optionsKey); + hostApplicationBuilder.GetSitkoCore().AddOpenSearchLogging(configure, optionsKey); return hostApplicationBuilder; } - public static ISitkoCoreApplicationBuilder AddOpenSearch(this ISitkoCoreApplicationBuilder applicationBuilder, - Action configure, string? optionsKey = null) => - applicationBuilder.AddModule(configure, optionsKey); + public static ISitkoCoreApplicationBuilder AddOpenSearchLogging(this ISitkoCoreApplicationBuilder applicationBuilder, + Action configure, string? optionsKey = null) => + applicationBuilder.AddModule(configure, optionsKey); - public static ISitkoCoreApplicationBuilder AddOpenSearch(this ISitkoCoreApplicationBuilder applicationBuilder, - Action? configure = null, string? optionsKey = null) => - applicationBuilder.AddModule(configure, optionsKey); + public static ISitkoCoreApplicationBuilder AddOpenSearchLogging(this ISitkoCoreApplicationBuilder applicationBuilder, + Action? configure = null, string? optionsKey = null) => + applicationBuilder.AddModule(configure, optionsKey); } diff --git a/src/Sitko.Core.OpenSearch/OpenSearchModule.cs b/src/Sitko.Core.OpenSearch/OpenSearchLoggingModule.cs similarity index 93% rename from src/Sitko.Core.OpenSearch/OpenSearchModule.cs rename to src/Sitko.Core.OpenSearch/OpenSearchLoggingModule.cs index ffcc36eb3..46e9a5678 100644 --- a/src/Sitko.Core.OpenSearch/OpenSearchModule.cs +++ b/src/Sitko.Core.OpenSearch/OpenSearchLoggingModule.cs @@ -6,11 +6,11 @@ namespace Sitko.Core.OpenSearch; -public class OpenSearchModule : BaseApplicationModule, ILoggingModule +public class OpenSearchLoggingModule : BaseApplicationModule, ILoggingModule { public override string OptionsKey => "OpenSearch"; - public LoggerConfiguration ConfigureLogging(IApplicationContext context, OpenSearchModuleOptions options, + public LoggerConfiguration ConfigureLogging(IApplicationContext context, OpenSearchLoggingModuleOptions options, LoggerConfiguration loggerConfiguration) { if (options.LoggingEnabled) diff --git a/src/Sitko.Core.OpenSearch/OpenSearchModuleConfig.cs b/src/Sitko.Core.OpenSearch/OpenSearchModuleConfig.cs index 838a90a35..9e5590a24 100644 --- a/src/Sitko.Core.OpenSearch/OpenSearchModuleConfig.cs +++ b/src/Sitko.Core.OpenSearch/OpenSearchModuleConfig.cs @@ -6,7 +6,7 @@ namespace Sitko.Core.OpenSearch; -public class OpenSearchModuleOptions : BaseModuleOptions +public class OpenSearchLoggingModuleOptions : BaseModuleOptions { public bool LoggingEnabled => !string.IsNullOrEmpty(Url); public string Url { get; set; } = ""; @@ -24,9 +24,9 @@ public class OpenSearchModuleOptions : BaseModuleOptions public string? LogIndexTypeName { get; set; } } -public class OpenSearchModuleOptionsValidator : AbstractValidator +public class OpenSearchLoggingModuleOptionsValidator : AbstractValidator { - public OpenSearchModuleOptionsValidator() + public OpenSearchLoggingModuleOptionsValidator() { RuleFor(o => o.Url).NotEmpty().When(o => o.LoggingEnabled) .WithMessage("OpenSearch url can't be empty");