Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Ambiguous reference configuring logging to ElasticCloud #458

Open
raanam opened this issue Oct 25, 2024 · 0 comments
Open

[BUG] - Ambiguous reference configuring logging to ElasticCloud #458

raanam opened this issue Oct 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@raanam
Copy link

raanam commented Oct 25, 2024

ECS integration/library project(s) (e.g. Elastic.CommonSchema.Serilog): Elastic.Serilog.Sinks - Version - 8.12.*

ECS schema version (e.g. 1.4.0):

ECS .NET assembly version (e.g. 1.4.2):

Elasticsearch version (if applicable):

.NET framework / OS: 8

Description of the problem, including expected versus actual behavior:

Trying to configure Elastic Search Sink in following way

Log.Logger = new LoggerConfiguration() .Enrich.FromLogContext() .WriteTo.ElasticCloud("***", "***","***") .CreateLogger()

Results in following compilation error

Severity Code Description Project File Line Suppression State
Error (active) CS0121 The call is ambiguous between the following methods or properties: 'ConfigSinkExtensions.ElasticCloud(LoggerSinkConfiguration, string, string, string, Action?, Action?, LoggingLevelSwitch?, LogEventLevel)' and 'ElasticsearchSinkExtensions.ElasticCloud(LoggerSinkConfiguration, string, string, string, Action?, Action?, LoggingLevelSwitch?, LogEventLevel)' Wellzio.TestConnectivity C:\Repositories\Wellzio\Wellzio.TestConnectivity\Wellzio.TestConnectivity\Program.cs 13

Steps to reproduce:

  1. Create a .net 8 web api project
  2. Reference Elastic.Serilog.Sinks - package - 8.12.*
  3. Configure logger as mentioned above to see compile time error
    This problem is also reported here - https://discuss.elastic.co/t/ambiguous-reference-configuring-logging-to-elasticcloud-in-elastic-serilog-sinks/368372
@raanam raanam added the bug Something isn't working label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant