serilog-sinks-email icon indicating copy to clipboard operation
serilog-sinks-email copied to clipboard

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

Open ite-klass opened this issue 4 months ago • 0 comments

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.

ite-klass avatar Apr 15 '24 15:04 ite-klass