better logging

This commit is contained in:
anhefti 2021-09-09 11:34:59 +02:00
parent c3eda2b81d
commit f54b769388
2 changed files with 9 additions and 1 deletions

View file

@ -143,7 +143,14 @@ public abstract class AbstractCourseAccess {
public Result<ExamineeAccountDetails> getExamineeAccountDetails(final String examineeSessionId) {
final Supplier<ExamineeAccountDetails> accountDetailsSupplier = accountDetailsSupplier(examineeSessionId);
return this.accountDetailRequest.protectedRun(accountDetailsSupplier);
return this.accountDetailRequest.protectedRun(() -> {
try {
return accountDetailsSupplier.get();
} catch (final Exception e) {
log.error("Unexpected error while trying to get examinee account details: ", e);
throw e;
}
});
}
/** Default implementation that uses getExamineeAccountDetails to geht the examinee name

View file

@ -35,6 +35,7 @@ logging.level.ch=INFO
# logging.file=/sebserver/log/sebserver.log
### spring actuator configuration
management.endpoints.jmx.exposure.include=metrics,logfile,loggers,heapdump,health
management.endpoints.web.base-path=/mprofile
management.endpoints.web.exposure.include=metrics,logfile,loggers,heapdump,health