serilog-contrib / serilog-sinks-splunk

A Serilog sink that writes to Splunk
https://splunk.com
Apache License 2.0
46 stars 47 forks source link

Add AppSettings Configuration ability #148

Closed masanek2 closed 7 months ago

masanek2 commented 3 years ago

The logic to allow for easy appsettings configuration doesn't work with complex types. Its easy enough to add this extension to my own assembly but wonder if it should be provided by default

    public static LoggerConfiguration Splunk(this LoggerSinkConfiguration sinkConfiguration, string host, int port)
    {
        return sinkConfiguration.SplunkViaTcp(new Serilog.Sinks.Splunk.SplunkTcpSinkConnectionInfo(host, port));
    }

Or maybe im doing something wrong ha!

merbla commented 3 years ago

Closing as a part of larger Serilog contrib reorg

Checkout serilog/serilog#1627