diff --git a/src/Nocr.TelegramListener.AppServices/UpdateListeners/Handlers/Implementation/UpdateHandler.cs b/src/Nocr.TelegramListener.AppServices/UpdateListeners/Handlers/Implementation/UpdateHandler.cs index 43edcdf..b1e63f4 100644 --- a/src/Nocr.TelegramListener.AppServices/UpdateListeners/Handlers/Implementation/UpdateHandler.cs +++ b/src/Nocr.TelegramListener.AppServices/UpdateListeners/Handlers/Implementation/UpdateHandler.cs @@ -45,6 +45,9 @@ public sealed class UpdateHandler( private async Task HandleMessage(MessageBase messageBase, bool edit = false) { + _logger.LogDebug("HandleMessage called for {MessageType} with ID {MessageId}, edit={Edit}", + messageBase.GetType().Name, messageBase.ID, edit); + switch (messageBase) { case Message m: diff --git a/src/Nocr.TelegramListener.AppServices/UpdateListeners/UpdateListenerBackgroundService.cs b/src/Nocr.TelegramListener.AppServices/UpdateListeners/UpdateListenerBackgroundService.cs index b119038..559a948 100644 --- a/src/Nocr.TelegramListener.AppServices/UpdateListeners/UpdateListenerBackgroundService.cs +++ b/src/Nocr.TelegramListener.AppServices/UpdateListeners/UpdateListenerBackgroundService.cs @@ -71,8 +71,12 @@ public sealed class UpdateListenerBackgroundService : BackgroundService { using var scope = _serviceProvider.CreateScope(); var updateHandler = scope.ServiceProvider.GetRequiredService(); + + _logger.LogDebug("Received {UpdateType} with {Count} updates", updates.GetType().Name, updates.UpdateList.Length); + foreach (var update in updates.UpdateList) { + _logger.LogDebug("Processing update {UpdateType} (ID: {UpdateId})", update.GetType().Name, update.GetType().GetProperty("ID")?.GetValue(update) ?? "N/A"); await updateHandler.HandleUpdate(update); } }