Can't configure PeriodicBatching options with email sink
SamWECA opened this issue · 1 comments
Tried to follow the structure outlined here: #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" ] }
Make sure your To: email address is in an array, even if there is only one
"WriteTo": [
{
"Name": "Email",
"Args": {
"options": {
"from": "postmaster@App.com",
"to": [ "thatGuy@test.org" ],
"host": "localhost"
}
}
}
]