Skip to content

Commit

Permalink
Rename Elasticsearch.Extensions.Logging => Elastic.Extensions.Logging (
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz authored May 2, 2023
1 parent d86ce27 commit 746aa5c
Show file tree
Hide file tree
Showing 31 changed files with 40 additions and 48 deletions.
6 changes: 3 additions & 3 deletions ecs-dotnet.sln
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "aspnetcore-with-serilog", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.CommonSchema.Benchmarks", "tools\Elastic.CommonSchema.Benchmarks\Elastic.CommonSchema.Benchmarks.csproj", "{EC19A9E1-79CC-46A8-94D7-EE66ED22D3BD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elasticsearch.Extensions.Logging", "src\Elasticsearch.Extensions.Logging\Elasticsearch.Extensions.Logging.csproj", "{D88AAA7D-1AEE-4B4C-BE37-69BA85DA07DA}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Extensions.Logging", "src\Elastic.Extensions.Logging\Elastic.Extensions.Logging.csproj", "{D88AAA7D-1AEE-4B4C-BE37-69BA85DA07DA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elasticsearch.Extensions.Logging.IntegrationTests", "tests-integration\Elasticsearch.Extensions.Logging.IntegrationTests\Elasticsearch.Extensions.Logging.IntegrationTests.csproj", "{0E7008E1-B215-4B9B-BC28-DC9D31415FB9}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Extensions.Logging.IntegrationTests", "tests-integration\Elastic.Extensions.Logging.IntegrationTests\Elastic.Extensions.Logging.IntegrationTests.csproj", "{0E7008E1-B215-4B9B-BC28-DC9D31415FB9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elasticsearch.Extensions.Logging.Example", "examples\Elasticsearch.Extensions.Logging.Example\Elasticsearch.Extensions.Logging.Example.csproj", "{F319AD28-A0A4-4012-8480-E2A4CFA755C2}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Extensions.Logging.Example", "examples\Elastic.Extensions.Logging.Example\Elastic.Extensions.Logging.Example.csproj", "{F319AD28-A0A4-4012-8480-E2A4CFA755C2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console-with-extensions-logging", "examples\console-with-extensions-logging\console-with-extensions-logging.csproj", "{D87AE73E-8112-444C-8F2F-CFBC4F738026}"
EndProject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Elasticsearch.Extensions.Logging\Elasticsearch.Extensions.Logging.csproj" />
<ProjectReference Include="..\..\src\Elastic.Extensions.Logging\Elastic.Extensions.Logging.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

namespace Elasticsearch.Extensions.Logging.Example
namespace Elastic.Extensions.Logging.Example
{

/// <summary> Simulate work that logs in low volume with some time in between each log call </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using Microsoft.Extensions.Logging;

namespace Elasticsearch.Extensions.Logging.Example
namespace Elastic.Extensions.Logging.Example
{
public class Log
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

namespace Elasticsearch.Extensions.Logging.Example
namespace Elastic.Extensions.Logging.Example
{
/// <summary> Simulate work that logs in low volume with some time in between each log call </summary>
public class LowVolumeWorkSimulation : BackgroundService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
using Elastic.Channels;
using Elastic.Elasticsearch.Ephemeral;
using Elastic.Ingest.Elasticsearch;
using Elasticsearch.Extensions.Logging.Options;
using Elastic.Extensions.Logging.Options;
using Elasticsearch.Net;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Nest;

namespace Elasticsearch.Extensions.Logging.Example
namespace Elastic.Extensions.Logging.Example
{
internal static class Program
{
// Configuration can be overriden from command line, e.g.
// dotnet run --project ./examples/Elasticsearch.Extensions.Logging.Example/ --Logging:Elasticsearch:ShipTo:NodeUris:0 "http://ipv4.fiddler:9200"
// dotnet run --project ./examples/Elastic.Extensions.Logging.Example/ --Logging:Elasticsearch:ShipTo:NodeUris:0 "http://ipv4.fiddler:9200"

public static IHostBuilder CreateHostBuilder(string[] args)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/aspnetcore-with-extensions-logging/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

using Elastic.Clients.Elasticsearch;
using Elastic.Elasticsearch.Ephemeral;
using Elasticsearch.Extensions.Logging;
using Elastic.Extensions.Logging;

using var cluster = new EphemeralCluster("8.4.0");
var client = CreateClient(cluster);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Elasticsearch.Extensions.Logging\Elasticsearch.Extensions.Logging.csproj" />
<ProjectReference Include="..\..\src\Elastic.Extensions.Logging\Elastic.Extensions.Logging.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion examples/console-with-extensions-logging/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.Extensions.Hosting;

/* 1. Add using */
using Elasticsearch.Extensions.Logging;
using Elastic.Extensions.Logging;

namespace ConsoleExample
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.6"/>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.6" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Elasticsearch.Extensions.Logging\Elasticsearch.Extensions.Logging.csproj"/>
<ProjectReference Include="..\..\src\Elastic.Extensions.Logging\Elastic.Extensions.Logging.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
using Elastic.CommonSchema;
using Elastic.Channels;
using Elastic.Channels.Diagnostics;
using Elasticsearch.Extensions.Logging.Options;
using Elastic.Extensions.Logging.Options;
using Microsoft.Extensions.Logging;

namespace Elasticsearch.Extensions.Logging
namespace Elastic.Extensions.Logging
{
/// <summary>
/// An <see cref="ILogger"/> implementation that writes logs directly to Elasticsearch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information

using Elasticsearch.Extensions.Logging.Options;
using Elastic.Extensions.Logging.Options;
using Microsoft.Extensions.Logging.Configuration;
using Microsoft.Extensions.Options;

namespace Elasticsearch.Extensions.Logging
namespace Elastic.Extensions.Logging
{
internal class ElasticsearchLoggerOptionsSetup : ConfigureFromConfigurationOptions<ElasticsearchLoggerOptions>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
using System.Threading;
using Elastic.Channels;
using Elastic.Channels.Diagnostics;
using Elastic.Extensions.Logging.Options;
using Elastic.Ingest.Elasticsearch;
using Elastic.Ingest.Elasticsearch.CommonSchema;
using Elastic.Ingest.Elasticsearch.DataStreams;
using Elastic.Ingest.Elasticsearch.Indices;
using Elastic.Transport;
using Elastic.Transport.Products.Elasticsearch;
using Elasticsearch.Extensions.Logging.Options;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;

namespace Elasticsearch.Extensions.Logging
namespace Elastic.Extensions.Logging
{
/// <summary>
/// An <see cref="ILoggerProvider"/> implementation that exposes a way to create <see cref="ElasticsearchLogger"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using Elastic.Ingest.Elasticsearch;

namespace Elasticsearch.Extensions.Logging
namespace Elastic.Extensions.Logging
{
/// <summary>
/// Provide callbacks to further configure <see cref="ElasticsearchChannelOptionsBase{TEvent}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System;
using Elastic.Ingest.Elasticsearch;

namespace Elasticsearch.Extensions.Logging
namespace Elastic.Extensions.Logging
{
/// <inheritdoc cref="IChannelSetup"/>
public class ChannelSetup : IChannelSetup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Elastic.CommonSchema;
using Elastic.CommonSchema.Serialization;

namespace Elasticsearch.Extensions.Logging
namespace Elastic.Extensions.Logging
{
/// <summary>
/// A subclass of <see cref="EcsDocument"/> that adds additional properties related to Extensions logging.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.Extensions.Logging;

namespace Elasticsearch.Extensions.Logging
namespace Elastic.Extensions.Logging
{
internal static class LogEventToEcsHelper
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
// See the LICENSE file in the project root for more information

using System;
using Elastic.Extensions.Logging.Options;
using Elastic.Ingest.Elasticsearch;
using Elastic.Transport;
using Elasticsearch.Extensions.Logging.Options;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Configuration;
using Microsoft.Extensions.Options;

namespace Elasticsearch.Extensions.Logging
namespace Elastic.Extensions.Logging
{
/// <summary>
/// Provides builder extension methods to <see cref="ILoggingBuilder"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Elasticsearch.Extensions.Logging.Options
namespace Elastic.Extensions.Logging.Options
{
/// <summary>
/// Provides options to control the datastream to write Elasticsearch logs too
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Elastic.Ingest.Elasticsearch;
using Elastic.Transport;

namespace Elasticsearch.Extensions.Logging.Options
namespace Elastic.Extensions.Logging.Options
{
/// <summary>
/// Provide options to <see cref="ElasticsearchLogger"/> to control how data gets written to Elasticsearch
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Elasticsearch.Extensions.Logging.Options
namespace Elastic.Extensions.Logging.Options
{
/// <summary>
/// Provides options to configure the naming of the index name to write too.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using Elastic.Transport;

namespace Elasticsearch.Extensions.Logging.Options
namespace Elastic.Extensions.Logging.Options
{
/// <summary>
/// The type of connection pool to use
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using System;

namespace Elasticsearch.Extensions.Logging.Options
namespace Elastic.Extensions.Logging.Options
{
/// <summary>
/// Configures where to write Elasticsearch logs to
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Elasticsearch.Extensions.Logging\Elasticsearch.Extensions.Logging.csproj" />
<ProjectReference Include="..\..\src\Elastic.Extensions.Logging\Elastic.Extensions.Logging.csproj" />
<ProjectReference Include="..\Elasticsearch.IntegrationDefaults\Elasticsearch.IntegrationDefaults.csproj" />
</ItemGroup>


</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[assembly: TestFramework("Elastic.Elasticsearch.Xunit.Sdk.ElasticTestFramework", "Elastic.Elasticsearch.Xunit")]

namespace Elasticsearch.Extensions.Logging.IntegrationTests;
namespace Elastic.Extensions.Logging.IntegrationTests;

/// <summary> Declare our cluster that we want to inject into our test classes </summary>
public class LoggingCluster : TestClusterBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
using Elastic.Channels.Diagnostics;
using Elastic.Clients.Elasticsearch;
using Elastic.CommonSchema;
using Elasticsearch.Extensions.Logging.Options;
using Elastic.Extensions.Logging.Options;
using FluentAssertions;
using Microsoft.Extensions.Logging;
using Xunit;
using Xunit.Abstractions;
using BulkResponse = Elastic.Ingest.Elasticsearch.Serialization.BulkResponse;

namespace Elasticsearch.Extensions.Logging.IntegrationTests
namespace Elastic.Extensions.Logging.IntegrationTests
{
public class LoggingToDataStreamTests : TestBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
using Elastic.Channels.Diagnostics;
using Elastic.Clients.Elasticsearch;
using Elastic.CommonSchema;
using Elasticsearch.Extensions.Logging.Options;
using Elastic.Extensions.Logging.Options;
using FluentAssertions;
using Microsoft.Extensions.Logging;
using Xunit;
using Xunit.Abstractions;
using BulkResponse = Elastic.Ingest.Elasticsearch.Serialization.BulkResponse;

namespace Elasticsearch.Extensions.Logging.IntegrationTests
namespace Elastic.Extensions.Logging.IntegrationTests
{
public class LoggingToIndexTests : TestBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
using Elastic.Channels.Diagnostics;
using Elastic.Clients.Elasticsearch;
using Elastic.Elasticsearch.Xunit.XunitPlumbing;
using Elasticsearch.Extensions.Logging.Options;
using Elastic.Extensions.Logging.Options;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Xunit.Abstractions;
using BulkResponse = Elastic.Ingest.Elasticsearch.Serialization.BulkResponse;

namespace Elasticsearch.Extensions.Logging.IntegrationTests;
namespace Elastic.Extensions.Logging.IntegrationTests;

public abstract class TestBase : IClusterFixture<LoggingCluster>
{
Expand Down

0 comments on commit 746aa5c

Please sign in to comment.