From 33616158176fa9768a21674926928222f1dfafd6 Mon Sep 17 00:00:00 2001 From: Black-Thunder Date: Sun, 21 Jun 2020 00:56:01 +0200 Subject: [PATCH] optimized logging --- lib/melcloudDevice.js | 4 ++-- lib/melcloudPlatform.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/melcloudDevice.js b/lib/melcloudDevice.js index c65c4f31..13a20231 100644 --- a/lib/melcloudDevice.js +++ b/lib/melcloudDevice.js @@ -578,7 +578,7 @@ class MelcloudDevice { if(statusCode != HttpStatus.OK) { gthis.airInfo = null; - gthat.log.error("Invalid HTTP status code (see line above). Getting device data failed!"); + gthat.log.error("Invalid HTTP status code (" + statusCode + " - " + HttpStatus.getStatusText(statusCode) + "). Getting device data failed!"); return; } @@ -692,7 +692,7 @@ class MelcloudDevice { if(statusCode != HttpStatus.OK) { gthis.airInfo = null; - gthat.log.error("Invalid HTTP status code (see line above). Changing device option failed!"); + gthat.log.error("Invalid HTTP status code (" + statusCode + " - " + HttpStatus.getStatusText(statusCode) + "). Changing device option failed!"); return; } diff --git a/lib/melcloudPlatform.js b/lib/melcloudPlatform.js index 1f33e902..252d26c6 100644 --- a/lib/melcloudPlatform.js +++ b/lib/melcloudPlatform.js @@ -64,7 +64,7 @@ class MelcloudPlatform { if(statusCode != HttpStatus.OK) { gthis.isConnected = false; gthat.setAdapterConnectionState(false); - gthat.log.error("Invalid HTTP status code (see line above). Login failed!"); + gthat.log.error("Invalid HTTP status code (" + statusCode + " - " + HttpStatus.getStatusText(statusCode) + "). Login failed!"); return; } @@ -129,7 +129,7 @@ class MelcloudPlatform { if(statusCode != HttpStatus.OK) { gthis.isConnected = false; gthat.setAdapterConnectionState(false); - gthat.log.error("Invalid HTTP status code (see line above). Getting devices failed!"); + gthat.log.error("Invalid HTTP status code (" + statusCode + " - " + HttpStatus.getStatusText(statusCode) + "). Getting devices failed!"); return; }