serilog-contrib / Serilog.Sinks.Logz.Io

Apache License 2.0
15 stars 11 forks source link

What is the new setting for `BoostProperties = true` for versions > 6.0.0 #32

Closed SeppPenner closed 1 year ago

SeppPenner commented 1 year ago

The old code was:

var logzIoOptions = new LogzioOptions
{
    BatchPostingLimit = 10,
    Period = TimeSpan.FromSeconds(10),
    UseHttps = true,
    DataCenterSubDomain = Listener,
    BoostProperties = true,
    RestrictedToMinimumLevel = LogEventLevel.Information
 };

New code?

var logzIoOptions = new LogzioOptions
{
    LogEventsInBatchLimit = 10,
    Period = TimeSpan.FromSeconds(10),
    DataCenter = new LogzioDataCenter
    {
        SubDomain = Listener,
        UseHttps = true,
    },
    BoostProperties = true, // Doesnt' work, how do we set it?
    RestrictedToMinimumLevel = LogEventLevel.Information
 };
mantasaudickas commented 1 year ago
var logzIoOptions = new LogzioOptions
{
    LogEventsInBatchLimit = 10,
    Period = TimeSpan.FromSeconds(10),
    DataCenter = new LogzioDataCenter
    {
        SubDomain = Listener,
        UseHttps = true,
    },
    TextFormatterOptions = new LogzioTextFormatterOptions {
        BoostProperties = true
    },
    RestrictedToMinimumLevel = LogEventLevel.Information
 };
SeppPenner commented 1 year ago
var logzIoOptions = new LogzioOptions
{
    LogEventsInBatchLimit = 10,
    Period = TimeSpan.FromSeconds(10),
    DataCenter = new LogzioDataCenter
    {
        SubDomain = Listener,
        UseHttps = true,
    },
    TextFormatterOptions = new LogzioTextFormatterOptions {
        BoostProperties = true
    },
    RestrictedToMinimumLevel = LogEventLevel.Information
 };

Sorry for the question, I just didn't find an example with the option set 😅