Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telegram.Client: log errors happened during the message queue processing #194

Merged
merged 2 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
6 changes: 5 additions & 1 deletion Emulsion.Telegram/Client.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading