Closed zoinkydoink closed 7 months ago
So, this does I thought, that this was fixed with the commit that closed https://github.com/SeppPenner/Serilog.Sinks.Telegram/issues/3 already.
I am not sure if that other but addresses this one. While the restrictToMinimumLevel addresses the issue I am having.
while the new flag works great... but it doesn’t check Serilog overrides
if I set restrictToMinimumLevel to Information It should print all information and above, but if I have a override that says minimum is Warning for Microsoft and System It should only print warning from Microsoft packages and system but continue to print Information for other packages/custom code
I guess, you're right, this is not addressed yet. I will need to investigate on this more as I don't have an idea yet how this is done in Serilog / should be done in sinks.
I assumed that if I provided the overrides, serilog would be smart enough NOT to send the events if they are already overrides but it seems to pass them to the sinks anyways
From: HansM notifications@github.com Sent: Thursday, January 28, 2021 3:44:04 PM To: SeppPenner/Serilog.Sinks.Telegram Serilog.Sinks.Telegram@noreply.github.com Cc: zoinkydoink zoinky@gmail.com; State change state_change@noreply.github.com Subject: Re: [SeppPenner/Serilog.Sinks.Telegram] LogEventLevel is not being respected with Serilog overrides (#6)
I guess, you're right, this is not addressed yet. I will need to investigate on this more as I don't have an idea yet how this is done in Serilog / should be done in sinks.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/SeppPenner/Serilog.Sinks.Telegram/issues/6#issuecomment-769376983, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADZWBGXLSFXM36ZFKEDM3VLS4HEBJANCNFSM4WR7XNZQ.
I assumed that if I provided the overrides, serilog would be smart enough NOT to send the events if they are already overrides but it seems to pass them to the sinks anyways
I'm not sure, maybe the sink is just using it wrong. I will check this.
Mhm, so this is blocked for now...
I think the SO post mentioned there uses filtering that can be used here but I am not sure
From: HansM notifications@github.com Sent: Friday, January 29, 2021 2:56:23 AM To: SeppPenner/Serilog.Sinks.Telegram Serilog.Sinks.Telegram@noreply.github.com Cc: zoinkydoink zoinky@gmail.com; State change state_change@noreply.github.com Subject: Re: [SeppPenner/Serilog.Sinks.Telegram] LogEventLevel is not being respected with Serilog overrides (#6)
Mhm, so this is blocked for now...
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/SeppPenner/Serilog.Sinks.Telegram/issues/6#issuecomment-769643182, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADZWBGQHIHTNXINZPO4V3ZDS4JS2PANCNFSM4WR7XNZQ.
I would like to wait for this until it's supported natively from Serilog.
The workaround seems to be that users can use on their own I would say: https://stackoverflow.com/questions/62341787/how-can-i-override-serilog-levels-differently-for-different-sinks. I don't want to include it in the sink directly for now, to be honest.
I would close this now as Serilog doesn't seem to change something here in the main repository...
When I have the following:
Telegram Sink should NOT be printing 'Information' level logs from Microsoft as I had defined a override to only show Warnings from Microsoft and Errors from System.
Basically the Telegram Sink should respect the overrides