Skip to content

Uri scheme must be tcp or tls #27

@stianl

Description

@stianl

According to the documentation configuring the Sink using a hostname and port should be valid:

var urlLogger = new LoggerConfiguration()
    .WriteTo.TCPSink("some.url.com", 1337)
    .CreateLogger();

Howerver, when I attempt this I get the following exception:

An unhandled exception of type 'System.UriFormatException' occurred in Serilog.Sinks.Network.dll: 'Uri scheme must be tcp or tls' at Serilog.Sinks.Network.NetworkLoggerConfigurationExtensions.BuildUri(String s) at Serilog.Sinks.Network.NetworkLoggerConfigurationExtensions.TCPSink(LoggerSinkConfiguration loggerConfiguration, String uri, ITextFormatter textFormatter, LogEventLevel restrictedToMinimumLevel)

Is this an error in the documentation, or a bug?

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