serilog / serilog-sinks-email

A Serilog sink that writes events to SMTP email
Apache License 2.0
70 stars 68 forks source link

Can't configure PeriodicBatching options with email sink #135

Open SamWECA opened 2 weeks ago

SamWECA commented 2 weeks ago

Tried to follow the structure outlined here: https://github.com/serilog/serilog-sinks-email/issues/130, but can't seem to get it to only send according to the config, which is below. This is using appsettings.json.

"Serilog": { "MinimumLevel": { "Default": "Debug", "Override": { "System": "Error", "Microsoft": "Error" } }, "WriteTo": [ { "Name": "EventLog", "Args": { "restrictedToMinimumLevel": "Error", "source": "redacted" } }, { "Name": "Email", "Args": { "options": { "from": "redacted", "to": "redacted", "host": "redacted", "port": 25, "subject": "Error" }, "batchingOptions": { "batchSizeLimit": 5, "period": "00:01:00" }, "restrictedToMinimumLevel": "Error" } } ], "Enrich": [ "FromLogContext" ] }