serilog / serilog-sinks-email

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

`Subject` config does not make use of `IBatchTextFormatter` #132

Open ite-klass opened 7 months ago

ite-klass commented 7 months ago

EmailSinkOptions has a property Subject of type ITextFormatter.

IBatchTextFormatter specifies in its summary xdoc:

Pass an instance for the argument when configuring the sink.

I implemented a class SerilogEmailSubject implementing IBatchTextFormatter and set Subject to an instance of it.

I now expect the email subject to make use of the FormatBatch method instead of Format.

But an email with 8 log messages seems to use Format with presumably the last log event.