diff --git a/pom.xml b/pom.xml index b493eb1498f3fbc037601beffcf914ac0e26d6c6..e08e23a2fbde7793695249aeff5c9603bdd1698a 100644 --- a/pom.xml +++ b/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>eu.hbp.mip</groupId> @@ -15,7 +15,7 @@ <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.3.7.RELEASE</version> - <relativePath /> + <relativePath/> </parent> <properties> @@ -75,7 +75,17 @@ <dependencies> <dependency> <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-logging</artifactId> + <artifactId>spring-boot-starter-log4j2</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter</artifactId> + <exclusions> + <exclusion> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-logging</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.springframework.boot</groupId> diff --git a/src/main/java/eu/hbp/mip/MIPApplication.java b/src/main/java/eu/hbp/mip/MIPApplication.java index df70ba78a5ba397676f1ad1533895e86a67c4f89..489fe56d50708eb98a1d1da7c7bef7121b0ee0c4 100644 --- a/src/main/java/eu/hbp/mip/MIPApplication.java +++ b/src/main/java/eu/hbp/mip/MIPApplication.java @@ -4,6 +4,7 @@ package eu.hbp.mip; +import ch.chuv.lren.mip.portal.Reporting; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -11,6 +12,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; public class MIPApplication { public static void main(String[] args) { + new Reporting().init(); SpringApplication.run(MIPApplication.class, args); } diff --git a/src/main/java/eu/hbp/mip/StartupTasks.java b/src/main/java/eu/hbp/mip/StartupTasks.java index b9c44c8ada7deb3c765e4c7bced887c05ac995a5..fa58eaf924ef9826e7eadb6ac182b85acc2a9341 100644 --- a/src/main/java/eu/hbp/mip/StartupTasks.java +++ b/src/main/java/eu/hbp/mip/StartupTasks.java @@ -43,13 +43,14 @@ public class StartupTasks implements ApplicationListener<ApplicationReadyEvent> // Pre-fill the local variable repository with the list of datasets, interpreted here as variables // (a bit like a categorical variable can be split into a set of variables (a.k.a one hot encoding in Data science) ) // Try 5 times, to be more robust in the face of cluster failures / slow startup + LOGGER.info("Prefill variable repository with datasets..."); for (int i = 0; i < 5; i++) { try { for (Dataset dataset : datasetsApi.fetchDatasets()) { final String code = dataset.dataset().code(); Variable v = variableRepository.findOne(code); if (v == null) { - LOGGER.info("Store additional variable {}", v.getCode()); + LOGGER.info("Store additional variable {}", code); v = new Variable(code); variableRepository.save(v); }