From 72b6898d497f8479de2a86189b29b2f2829d5277 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 2 Jun 2021 13:13:26 +0000 Subject: [PATCH] Twitter: Improved logging for the picture upload --- twitter/twitter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/twitter/twitter.php b/twitter/twitter.php index 8bfa1737..d6867e73 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -716,10 +716,10 @@ function twitter_post_hook(App $a, array &$b) $data = ['media_id' => $media->media_id_string, 'alt_text' => ['text' => substr($image['description'], 0, 420)]]; $ret = $cb->media_metadata_create($data); - Logger::info('Metadata create', ['id' => $b['id'], 'data' => $data, 'return' => json_encode($ret)]); + Logger::info('Metadata create', ['id' => $b['id'], 'data' => $data, 'return' => $ret]); } } else { - Logger::error('Failed upload', ['id' => $b['id'], 'image' => $image['url']]); + Logger::error('Failed upload', ['id' => $b['id'], 'image' => $image['url'], 'return' => $media]); throw new Exception('Failed upload of ' . $image['url']); } } -- 2.39.5