more logging for Moodle setup

This commit is contained in:
anhefti 2021-03-17 09:31:01 +01:00
parent 40b0426129
commit 2bc990195e

View file

@ -130,7 +130,8 @@ class MoodleRestTemplateFactory {
if (result.hasError()) { if (result.hasError()) {
log.warn("Failed to get access token for LMS: {}({})", log.warn("Failed to get access token for LMS: {}({})",
this.lmsSetup.name, this.lmsSetup.name,
this.lmsSetup.id); this.lmsSetup.id,
result.getError());
} }
return result; return result;
}) })
@ -360,6 +361,9 @@ class MoodleRestTemplateFactory {
if (moodleToken == null || moodleToken.token == null) { if (moodleToken == null || moodleToken.token == null) {
throw new RuntimeException("Access Token request with 200 but no or invalid token body"); 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; this.accessToken = moodleToken.token;