serilog-contrib / serilog-sinks-slack

A simple (yet customizable) Slack logging sink for Serilog
MIT License
40 stars 28 forks source link

Support custom timestamp attachment format #25

Closed siewers closed 3 years ago

siewers commented 3 years ago

Currently, the timestamp attachment is not formatted and is just written as DateTimeOffset.ToString(), which is depending on the culture of the current thread.

https://github.com/mgibas/serilog-sinks-slack/blob/master/Serilog.Sinks.Slack/SlackSink.cs#L89

new Field{Title = "Timestamp", Value = logEvent.Timestamp.ToString(), Short = _options.DefaultAttachmentsShortFormat}

Would it be possible to add support for custom timestamp attachment formats, so you can use any format you like, without having to rely on the current machine culture?