From 0f8830df898c162299d8bf91f657b31da2a41e83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Kr=C3=BCger?= Date: Thu, 23 Jun 2022 15:00:13 +0200 Subject: [PATCH] Use log level exception for exceptions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also log the exception itself instead of the localized message concatinated in the log message. Signed-off-by: Tim Krüger --- .../talk/services/firebase/ChatAndCallMessagingService.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/gplay/java/com/nextcloud/talk/services/firebase/ChatAndCallMessagingService.kt b/app/src/gplay/java/com/nextcloud/talk/services/firebase/ChatAndCallMessagingService.kt index e9eadfbeb..745a39f57 100644 --- a/app/src/gplay/java/com/nextcloud/talk/services/firebase/ChatAndCallMessagingService.kt +++ b/app/src/gplay/java/com/nextcloud/talk/services/firebase/ChatAndCallMessagingService.kt @@ -161,14 +161,14 @@ class ChatAndCallMessagingService : FirebaseMessagingService() { decryptMessage(privateKey, base64DecodedSubject, subject, signature) } } catch (e1: NoSuchAlgorithmException) { - Log.d(NotificationWorker.TAG, "No proper algorithm to decrypt the message " + e1.localizedMessage) + Log.e(NotificationWorker.TAG, "No proper algorithm to decrypt the message.", e1) } catch (e1: NoSuchPaddingException) { - Log.d(NotificationWorker.TAG, "No proper padding to decrypt the message " + e1.localizedMessage) + Log.e(NotificationWorker.TAG, "No proper padding to decrypt the message.", e1) } catch (e1: InvalidKeyException) { - Log.d(NotificationWorker.TAG, "Invalid private key " + e1.localizedMessage) + Log.e(NotificationWorker.TAG, "Invalid private key.", e1) } } catch (exception: Exception) { - Log.d(NotificationWorker.TAG, "Something went very wrong " + exception.localizedMessage, exception) + Log.e(NotificationWorker.TAG, "Something went very wrong!", exception) } }