serilog-contrib / Serilog.Sinks.Telegram.Alternative

Serilog.Sinks.Telegram.Alternative is a library to save logging information from Serilog to Telegram.
MIT License
36 stars 12 forks source link

Improve support for spoilers and user mentions #26

Closed nebula2 closed 2 years ago

nebula2 commented 2 years ago

if we want to use spoilers or mention a user it is required to set useCustomHtmlFormatting in the options and ensure that we escape everything properly each time that we want to log something.

as documented here

we can for example say This is a spoiler:<tg-spoiler></tg-spoiler> or <a href="tg://user?id={userId}">hello</a> to mention a user.

it would be nice to

I would like to create a pull request for the second option as it provides more flexibility and less effort for maintainence in this repository.

SeppPenner commented 2 years ago

If you ask me, the best would be to add both of the options: Extend the default behaviour, but make it possible to set a custom logic from the user code. Or am I missing something that this doesn't make sense?

I will have a look at your pull request soon.

SeppPenner commented 2 years ago

The new version containing your changes should be available soon.