From 2bc990195ea9ebabee6f2ff177eac050b80520e6 Mon Sep 17 00:00:00 2001 From: anhefti Date: Wed, 17 Mar 2021 09:31:01 +0100 Subject: [PATCH] more logging for Moodle setup --- .../lms/impl/moodle/MoodleRestTemplateFactory.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleRestTemplateFactory.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleRestTemplateFactory.java index ca878b2f..522452d9 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleRestTemplateFactory.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleRestTemplateFactory.java @@ -130,7 +130,8 @@ class MoodleRestTemplateFactory { if (result.hasError()) { log.warn("Failed to get access token for LMS: {}({})", this.lmsSetup.name, - this.lmsSetup.id); + this.lmsSetup.id, + result.getError()); } return result; }) @@ -360,6 +361,9 @@ class MoodleRestTemplateFactory { if (moodleToken == null || moodleToken.token == null) { throw new RuntimeException("Access Token request with 200 but no or invalid token body"); + } else { + log.info("Successfully get access token from Moodle: {}", + MoodleRestTemplateFactory.this.lmsSetup); } this.accessToken = moodleToken.token;