From 88f7c511bf9f712cc1249effb28be4561802d78c Mon Sep 17 00:00:00 2001 From: Friedrich von Never Date: Tue, 6 Feb 2024 22:52:15 +0100 Subject: [PATCH 1/2] (#190) Telegram.Client: log errors happened during the message queue processing --- Emulsion.Telegram/Client.fs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Emulsion.Telegram/Client.fs b/Emulsion.Telegram/Client.fs index 459874d8..73e6ccae 100644 --- a/Emulsion.Telegram/Client.fs +++ b/Emulsion.Telegram/Client.fs @@ -22,7 +22,11 @@ type Client(ctx: ServiceContext, hostingSettings: HostingSettings option) = inherit MessageSystemBase(ctx, cancellationToken) - let botConfig = { Funogram.Telegram.Bot.Config.defaultConfig with Token = telegramSettings.Token } + let botConfig = { + Funogram.Telegram.Bot.Config.defaultConfig with + Token = telegramSettings.Token + OnError = fun e -> ctx.Logger.Error(e, "Exception in Telegram message processing") + } interface ITelegramClient with member this.GetFileInfo(fileId) = async { From 30202090150f2801a01a7f54d4fdc56784faa55e Mon Sep 17 00:00:00 2001 From: Friedrich von Never Date: Tue, 6 Feb 2024 22:54:26 +0100 Subject: [PATCH 2/2] (#190) Document the change --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7e3ef88..4ab13837 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning v2.0.0](https://semver.org/spec/v2.0.0.html). +## [Unreleased] (2.4.5) +### Fixed +- The second part of [#190](https://github.com/codingteam/emulsion/issues/190): now the Telegram errors will be logged to the log file, not to the stdout. + ## [2.4.4] - 2024-02-06 ### Changed - Downgrade to .NET 7 (the hosting infrastructure turns out to be unable to handle a newer one so far).