Skip to content

Overloads of NetworkLoggerConfigurationExtensions.TCPSink(string uri, ...) can cause ambiguous call errors #58

@tbdrake

Description

@tbdrake

In a project using the 2.0.2.68 version I had code like this:

using Serilog.Sinks.Network;

var cfg = new LoggerConfiguration();
cfg.WriteTo.TCPSink("tcp://localhost:9880")

With 3.0.0-alpha.2, the code above has this error:

The call is ambiguous between the following methods or properties: 'NetworkLoggerConfigurationExtensions.TCPSink(LoggerSinkConfiguration, string, int?, int?, ITextFormatter?, LogEventLevel)' and 'NetworkLoggerConfigurationExtensions.TCPSink(LoggerSinkConfiguration, string, LogEventLevel)'

A workaround is to pass another parameter to resolve the ambiguity:

cfg.WriteTo.TCPSink("tcp://localhost:9880", LogEventLevel.Verbose)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions