replaced log4j2 with slf4j
This commit is contained in:
parent
4850581c53
commit
d8eac0ac10
136
pom.xml
136
pom.xml
|
@ -22,7 +22,7 @@
|
|||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
@ -30,15 +30,10 @@
|
|||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-log4j2</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jdbc</artifactId>
|
||||
|
@ -47,11 +42,6 @@
|
|||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-actuator-autoconfigure</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
<!--<scope>provided</scope>-->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
|
@ -60,20 +50,7 @@
|
|||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||
<version>3.0.1</version>
|
||||
</dependency>
|
||||
-->
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>javax.el</groupId>
|
||||
<artifactId>javax.el-api</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency>
|
||||
-->
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>eu.dnetlib.dhp</groupId>
|
||||
|
@ -123,36 +100,6 @@
|
|||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.springframework</groupId>-->
|
||||
<!-- <artifactId>spring-webmvc</artifactId>-->
|
||||
<!-- <version>${spring.version}</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.hibernate</groupId>-->
|
||||
<!-- <artifactId>hibernate-validator-annotation-processor</artifactId>-->
|
||||
<!-- <version>4.1.0.Final</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>log4j</groupId>-->
|
||||
<!-- <artifactId>log4j</artifactId>-->
|
||||
<!-- <version>${log4j.version}</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>eu.dnetlib</groupId>-->
|
||||
<!-- <artifactId>uoa-domain</artifactId>-->
|
||||
<!-- <version>[2.0.0-SNAPSHOT, 3.0.0)</version>-->
|
||||
<!-- <exclusions>-->
|
||||
<!-- <exclusion> <!– declare the exclusion here –>-->
|
||||
<!-- <groupId>cglib</groupId>-->
|
||||
<!-- <artifactId>cglib</artifactId>-->
|
||||
<!-- </exclusion>-->
|
||||
<!-- <exclusion>-->
|
||||
<!-- <groupId>log4j</groupId>-->
|
||||
<!-- <artifactId>log4j</artifactId>-->
|
||||
<!-- </exclusion>-->
|
||||
<!-- </exclusions>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>eu.dnetlib</groupId>
|
||||
<artifactId>dnet-openaire-usage-stats-sushilite</artifactId>
|
||||
|
@ -192,38 +139,6 @@
|
|||
<version>2.7.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>xerces</groupId>-->
|
||||
<!-- <artifactId>xercesImpl</artifactId>-->
|
||||
<!-- <version>2.11.0</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<version>2.9.4</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>2.9.4</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.springframework</groupId>-->
|
||||
<!-- <artifactId>spring-context</artifactId>-->
|
||||
<!-- <version>${spring.version}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.springframework</groupId>-->
|
||||
<!-- <artifactId>spring-jdbc</artifactId>-->
|
||||
<!-- <version>${spring.version}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>com.sun.jersey</groupId>
|
||||
<artifactId>jersey-client</artifactId>
|
||||
|
@ -265,13 +180,6 @@
|
|||
<version>9.1-901.jdbc3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-catalina -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.apache.tomcat</groupId>-->
|
||||
<!-- <artifactId>tomcat-catalina</artifactId>-->
|
||||
<!-- <version>9.0.22</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
|
@ -293,14 +201,6 @@
|
|||
<groupId>org.springframework.session</groupId>
|
||||
<artifactId>spring-session-data-redis</artifactId>
|
||||
</dependency>
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>org.springframework.session</groupId>
|
||||
<artifactId>spring-session-data-redis</artifactId>
|
||||
<version>2.5.1</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
-->
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/redis.clients/jedis -->
|
||||
<dependency>
|
||||
|
@ -324,13 +224,7 @@
|
|||
<artifactId>cors-filter</artifactId>
|
||||
<version>2.5</version>
|
||||
</dependency>
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>com.netflix.rxjava</groupId>
|
||||
<artifactId>rxjava-core</artifactId>
|
||||
<version>0.20.7</version>
|
||||
</dependency>
|
||||
-->
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/javax.xml.ws/jaxws-api -->
|
||||
<dependency>
|
||||
<groupId>javax.xml.ws</groupId>
|
||||
|
@ -384,30 +278,6 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Enable micrometer >> -->
|
||||
<!-- <dependency> <!– TODO: remove this with ActuatorConfig class –>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-actuator</artifactId>-->
|
||||
<!-- <version>1.3.5.RELEASE</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-actuator-autoconfigure</artifactId>-->
|
||||
<!-- <version>2.1.18.RELEASE</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>io.micrometer</groupId>-->
|
||||
<!-- <artifactId>micrometer-core</artifactId>-->
|
||||
<!-- <version>1.7.2</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>io.micrometer</groupId>
|
||||
<artifactId>micrometer-registry-prometheus</artifactId>
|
||||
<version>1.7.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!-- << Enable micrometer -->
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
|
||||
<localRepository>${env.HOME}/.m2/repository-dnet45</localRepository>
|
||||
<pluginGroups>
|
||||
<pluginGroup>org.apache.tomcat.maven</pluginGroup>
|
||||
</pluginGroups>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>dnet4.0</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>dnet45-bootstrap-snapshot</id>
|
||||
<name>D-Net 45 Bootstrap Snapshot</name>
|
||||
<url>https://maven.research-infrastructures.eu/nexus/content/repositories/dnet45-bootstrap-snapshot</url>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<layout>default</layout>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>dnet45-bootstrap-release</id>
|
||||
<name>D-Net 45 Bootstrap Release</name>
|
||||
<url>https://maven.research-infrastructures.eu/nexus/content/repositories/dnet45-bootstrap-release</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
<layout>default</layout>
|
||||
</repository>
|
||||
</repositories>
|
||||
</profile>
|
||||
</profiles>
|
||||
</settings>
|
|
@ -1,6 +1,7 @@
|
|||
package eu.dnetlib.repo.manager.config;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.annotation.AsyncConfigurer;
|
||||
|
@ -15,7 +16,7 @@ public class AsyncConfiguration implements AsyncConfigurer {
|
|||
@Override
|
||||
public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
|
||||
return new AsyncUncaughtExceptionHandler() {
|
||||
private final Logger logger = Logger.getLogger(getClass());
|
||||
private final Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Override
|
||||
public void handleUncaughtException(Throwable throwable, Method method, Object... objects) {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package eu.dnetlib.repo.manager.config;
|
||||
|
||||
import org.apache.commons.dbcp.BasicDataSource;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
@ -12,7 +13,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
|
|||
@EnableTransactionManagement
|
||||
public class DatasourceConfiguration {
|
||||
|
||||
private static Logger logger = Logger.getLogger(DatasourceConfiguration.class);
|
||||
private static Logger logger = LoggerFactory.getLogger(DatasourceConfiguration.class);
|
||||
|
||||
@Value("${services.provide.db.driverClassName}")
|
||||
private String driverClassname;
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package eu.dnetlib.repo.manager.config;
|
||||
|
||||
import com.google.gson.JsonParser;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.mitre.openid.connect.model.OIDCAuthenticationToken;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
|
||||
|
@ -22,7 +23,7 @@ public class FrontEndLinkURIAuthenticationSuccessHandler implements Authenticati
|
|||
|
||||
private String frontEndURI;
|
||||
|
||||
private static final Logger logger = Logger.getLogger(FrontEndLinkURIAuthenticationSuccessHandler.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(FrontEndLinkURIAuthenticationSuccessHandler.class);
|
||||
|
||||
public void init() {
|
||||
logger.debug("Front end uri : " + frontEndURI);
|
||||
|
|
|
@ -3,9 +3,10 @@ package eu.dnetlib.repo.manager.config;
|
|||
import com.google.gson.JsonArray;
|
||||
import com.nimbusds.jwt.JWT;
|
||||
import eu.dnetlib.repo.manager.service.security.AuthoritiesMapper;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.mitre.openid.connect.client.OIDCAuthoritiesMapper;
|
||||
import org.mitre.openid.connect.model.UserInfo;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
||||
|
@ -18,7 +19,7 @@ import java.util.Set;
|
|||
@Component
|
||||
public class OpenAIREAuthoritiesMapper implements OIDCAuthoritiesMapper {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(OpenAIREAuthoritiesMapper.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(OpenAIREAuthoritiesMapper.class);
|
||||
|
||||
@Value("${services.provide.adminEmail}")
|
||||
String adminEmail;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package eu.dnetlib.repo.manager.config;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
@ -15,7 +16,7 @@ import javax.annotation.PostConstruct;
|
|||
@EnableRedisHttpSession
|
||||
public class RedisConfiguration {
|
||||
|
||||
private static Logger logger = Logger.getLogger(RedisConfiguration.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(RedisConfiguration.class);
|
||||
|
||||
@Value("${services.provide.redis.host}")
|
||||
private String host;
|
||||
|
|
|
@ -6,9 +6,9 @@ import eu.dnetlib.repo.manager.exception.BrokerException;
|
|||
import eu.dnetlib.repo.manager.exception.EndPointException;
|
||||
import eu.dnetlib.repo.manager.exception.ResourceNotFoundException;
|
||||
import eu.dnetlib.repo.manager.exception.ServerError;
|
||||
import org.apache.log4j.LogManager;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.json.JSONException;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
@ -26,7 +26,7 @@ import java.net.UnknownHostException;
|
|||
@Order(Ordered.HIGHEST_PRECEDENCE)
|
||||
public class GenericControllerAdvice {
|
||||
|
||||
private Logger logger = LogManager.getLogger(GenericControllerAdvice.class);
|
||||
private Logger logger = LoggerFactory.getLogger(GenericControllerAdvice.class);
|
||||
|
||||
|
||||
@ResponseStatus(HttpStatus.NOT_FOUND)
|
||||
|
|
|
@ -6,9 +6,10 @@ import eu.dnetlib.repo.manager.domain.JobsOfUser;
|
|||
import eu.dnetlib.repo.manager.service.MonitorServiceImpl;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.json.JSONException;
|
||||
import org.mitre.openid.connect.model.OIDCAuthenticationToken;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
|
@ -20,7 +21,7 @@ import org.springframework.web.bind.annotation.*;
|
|||
@Api(description = "Monitor API", tags = {"monitor"})
|
||||
public class MonitorController {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(MonitorController.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(MonitorController.class);
|
||||
|
||||
@Autowired
|
||||
private MonitorServiceImpl monitorService;
|
||||
|
|
|
@ -9,7 +9,8 @@ import eu.dnetlib.repo.manager.service.PiWikServiceImpl;
|
|||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.io.FileSystemResource;
|
||||
import org.springframework.http.MediaType;
|
||||
|
@ -33,7 +34,7 @@ import java.util.List;
|
|||
@Api(description = "Piwik API", tags = {"piwik"})
|
||||
public class PiWikController {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(PiWikController.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(PiWikController.class);
|
||||
|
||||
@Autowired
|
||||
private PiWikServiceImpl piWikService;
|
||||
|
|
|
@ -11,7 +11,8 @@ import io.micrometer.core.instrument.binder.system.UptimeMetrics;
|
|||
import io.micrometer.prometheus.PrometheusConfig;
|
||||
import io.micrometer.prometheus.PrometheusMeterRegistry;
|
||||
import io.prometheus.client.exporter.common.TextFormat;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
@ -24,7 +25,7 @@ import java.io.File;
|
|||
@RestController
|
||||
@RequestMapping("/actuator/prometheus")
|
||||
public class PrometheusController { // TODO: remove this with migration to Spring Boot 2
|
||||
private static final Logger logger = Logger.getLogger(PrometheusController.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(PrometheusController.class);
|
||||
|
||||
private final PiWikService piWikService;
|
||||
private final RepositoryService repositoryService;
|
||||
|
|
|
@ -11,9 +11,10 @@ import eu.dnetlib.repo.manager.service.RepositoryService;
|
|||
import eu.dnetlib.repo.manager.service.security.AuthorizationService;
|
||||
import eu.dnetlib.repo.manager.utils.JsonUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.json.JSONException;
|
||||
import org.mitre.openid.connect.model.OIDCAuthenticationToken;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
|
@ -35,7 +36,7 @@ import java.util.Map;
|
|||
@Api(description = "Repository API", tags = {"repositories"})
|
||||
public class RepositoryController {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(RepositoryController.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(RepositoryController.class);
|
||||
|
||||
private final RepositoryService repositoryService;
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@ package eu.dnetlib.repo.manager.service;
|
|||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import eu.dnetlib.enabling.datasources.common.AggregationInfo;
|
||||
import eu.dnetlib.repo.manager.domain.AggregationHistoryResponse;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.client.RestClientException;
|
||||
|
@ -22,7 +23,7 @@ import static eu.dnetlib.repo.manager.utils.DateUtils.getYear;
|
|||
@Service("aggregationService")
|
||||
public class AggregationServiceImpl implements AggregationService {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(AggregationServiceImpl.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(AggregationServiceImpl.class);
|
||||
|
||||
|
||||
@Value("${services.provide.clients.dsm}")
|
||||
|
|
|
@ -9,6 +9,8 @@ import eu.dnetlib.repo.manager.domain.broker.*;
|
|||
import eu.dnetlib.repo.manager.exception.BrokerException;
|
||||
import org.apache.commons.lang.NotImplementedException;
|
||||
import org.json.JSONException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.core.ParameterizedTypeReference;
|
||||
|
@ -40,7 +42,7 @@ public class BrokerServiceImpl implements BrokerService {
|
|||
@Value("${services.provide.topic_types.url}")
|
||||
private String topicsURL;
|
||||
|
||||
private static final org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(BrokerServiceImpl.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(BrokerServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
RestTemplate restTemplate;
|
||||
|
@ -212,7 +214,7 @@ public class BrokerServiceImpl implements BrokerService {
|
|||
UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(openairePath + service)
|
||||
.queryParam("email", userEmail);
|
||||
|
||||
logger.debug(builder.build().encode().toUri());
|
||||
logger.debug("{}", builder.build().encode().toUri());
|
||||
ResponseEntity<Map<String, List<SimpleSubscriptionDesc>>> resp;
|
||||
try {
|
||||
resp = restTemplate.exchange(
|
||||
|
|
|
@ -8,7 +8,8 @@ import eu.dnetlib.repo.manager.domain.broker.BrowseEntry;
|
|||
import eu.dnetlib.repo.manager.exception.BrokerException;
|
||||
import eu.dnetlib.repo.manager.exception.RepositoryServiceException;
|
||||
import eu.dnetlib.repo.manager.utils.DateUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
@ -18,7 +19,7 @@ import java.util.List;
|
|||
@Service("dashboardService")
|
||||
public class DashboardServiceImpl implements DashboardService {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(DashboardServiceImpl.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(DashboardServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private RepositoryService repositoryService;
|
||||
|
|
|
@ -6,8 +6,9 @@ import eu.dnetlib.repo.manager.domain.Repository;
|
|||
import eu.dnetlib.repo.manager.domain.RepositoryInterface;
|
||||
import eu.dnetlib.repo.manager.exception.ValidationServiceException;
|
||||
import eu.dnetlib.utils.MailLibrary;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.mitre.openid.connect.model.OIDCAuthenticationToken;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
@ -21,7 +22,7 @@ import java.util.stream.Collectors;
|
|||
@Component("emailUtils")
|
||||
public class EmailUtilsImpl implements EmailUtils {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(EmailUtilsImpl.class);
|
||||
private final static Logger logger = LoggerFactory.getLogger(EmailUtilsImpl.class);
|
||||
|
||||
private final MailLibrary mailLibrary;
|
||||
private final RepositoryService repositoryService;
|
||||
|
|
|
@ -7,10 +7,11 @@ import eu.dnetlib.repo.manager.domain.Constants;
|
|||
import eu.dnetlib.repo.manager.domain.JobsOfUser;
|
||||
import eu.dnetlib.repo.manager.utils.CrisValidatorUtils;
|
||||
import gr.uoa.di.driver.util.ServiceLocator;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.eurocris.openaire.cris.validator.model.Job;
|
||||
import org.eurocris.openaire.cris.validator.service.MapJobDao;
|
||||
import org.json.JSONException;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
@ -22,7 +23,7 @@ import java.util.stream.Collectors;
|
|||
@Service("monitorService")
|
||||
public class MonitorServiceImpl implements MonitorService {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(MonitorServiceImpl.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(MonitorServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private MapJobDao crisJobs;
|
||||
|
@ -53,9 +54,6 @@ public class MonitorServiceImpl implements MonitorService {
|
|||
String validationStatus,
|
||||
String includeJobsTotal) throws JSONException, ValidatorServiceException {
|
||||
|
||||
logger.debug("Getting jobs of user : " + user
|
||||
+ "\n" + user + "/" + jobType + "/" + offset + "/" + dateFrom + "/" + dateTo + "/" + validationStatus + "/" + includeJobsTotal);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
// FIXME: this is a hack for CRIS Jan Dvorak Validator, should be implemented properly //
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -162,7 +160,7 @@ public class MonitorServiceImpl implements MonitorService {
|
|||
try {
|
||||
return getValidationService().getStoredJobsTotalNumberNew(user, jobType, validationStatus);
|
||||
} catch (ValidatorServiceException e) {
|
||||
logger.error(e);
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -175,7 +173,7 @@ public class MonitorServiceImpl implements MonitorService {
|
|||
try {
|
||||
job = getValidationService().getStoredJob(Integer.parseInt(jobId), groupBy);
|
||||
} catch (ValidatorServiceException e) {
|
||||
logger.error(e);
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
// FIXME: this is a hack for CRIS Jan Dvorak Validator, should be implemented properly //
|
||||
|
|
|
@ -7,7 +7,8 @@ import eu.dnetlib.repo.manager.domain.OrderByType;
|
|||
import eu.dnetlib.repo.manager.domain.Repository;
|
||||
import eu.dnetlib.repo.manager.exception.RepositoryServiceException;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
@ -32,7 +33,7 @@ import java.util.Map;
|
|||
@Service("piwikService")
|
||||
public class PiWikServiceImpl implements PiWikService {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(PiWikServiceImpl.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(PiWikServiceImpl.class);
|
||||
|
||||
|
||||
@Autowired
|
||||
|
|
|
@ -26,11 +26,12 @@ import eu.dnetlib.repo.manager.utils.Converter;
|
|||
import eu.dnetlib.repo.manager.utils.DateUtils;
|
||||
import gr.uoa.di.driver.enabling.vocabulary.VocabularyLoader;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.mitre.openid.connect.model.OIDCAuthenticationToken;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
|
@ -54,7 +55,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
@Service("repositoryService")
|
||||
public class RepositoryServiceImpl implements RepositoryService {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(RepositoryServiceImpl.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(RepositoryServiceImpl.class);
|
||||
|
||||
private final AuthorizationService authorizationService;
|
||||
private final RoleMappingService roleMappingService;
|
||||
|
@ -625,7 +626,7 @@ public class RepositoryServiceImpl implements RepositoryService {
|
|||
.fromHttpUrl(baseAddress + "/ds/api/")
|
||||
.path("/{id}")
|
||||
.build().expand(id).encode();
|
||||
logger.debug(uriComponents.toUri());
|
||||
logger.debug("{}", uriComponents.toUri());
|
||||
restTemplate.delete(uriComponents.toUri());
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package eu.dnetlib.repo.manager.service;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.HttpMethod;
|
||||
|
@ -19,7 +20,7 @@ import java.util.Objects;
|
|||
@Service("statsService")
|
||||
public class StatsServiceImpl implements StatsService {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(StatsServiceImpl.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(StatsServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
RestTemplate restTemplate;
|
||||
|
|
|
@ -2,6 +2,8 @@ package eu.dnetlib.repo.manager.service;
|
|||
|
||||
import eu.dnetlib.usagestats.sushilite.domain.ReportItem;
|
||||
import eu.dnetlib.usagestats.sushilite.domain.ReportResponseWrapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.core.ParameterizedTypeReference;
|
||||
import org.springframework.http.HttpMethod;
|
||||
|
@ -22,7 +24,7 @@ public class SushiliteServiceImpl implements SushiliteService {
|
|||
@Value("${services.provide.usagestats.sushiliteEndpoint}")
|
||||
private String usagestatsSushiliteEndpoint;
|
||||
|
||||
private static final org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(SushiliteServiceImpl.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(SushiliteServiceImpl.class);
|
||||
|
||||
|
||||
@Override
|
||||
|
|
|
@ -2,6 +2,8 @@ package eu.dnetlib.repo.manager.service;
|
|||
|
||||
import org.mitre.openid.connect.model.OIDCAuthenticationToken;
|
||||
import org.mitre.openid.connect.model.UserInfo;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
|
@ -16,8 +18,7 @@ import java.util.stream.Collectors;
|
|||
@Service("userService")
|
||||
public class UserServiceImpl implements UserService {
|
||||
|
||||
private static final org.apache.log4j.Logger logger = org.apache.log4j.Logger
|
||||
.getLogger(UserServiceImpl.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(UserServiceImpl.class);
|
||||
|
||||
@Override
|
||||
public ResponseEntity<Object> login() {
|
||||
|
|
|
@ -12,11 +12,12 @@ import eu.dnetlib.repo.manager.exception.ValidationServiceException;
|
|||
import eu.dnetlib.repo.manager.utils.CrisValidatorUtils;
|
||||
import eu.dnetlib.repo.manager.utils.OaiTools;
|
||||
import gr.uoa.di.driver.util.ServiceLocator;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.eurocris.openaire.cris.validator.model.Job;
|
||||
import org.eurocris.openaire.cris.validator.service.JobExecutor;
|
||||
import org.eurocris.openaire.cris.validator.service.MapJobDao;
|
||||
import org.json.JSONException;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
@ -57,7 +58,7 @@ public class ValidatorServiceImpl implements ValidatorService {
|
|||
|
||||
private Map<String, List<RuleSet>> rulesetMap = new ConcurrentHashMap<String, List<RuleSet>>();
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ValidatorServiceImpl.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(ValidatorServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private EmailUtils emailUtils;
|
||||
|
@ -123,7 +124,7 @@ public class ValidatorServiceImpl implements ValidatorService {
|
|||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
} catch (ValidatorServiceException e) {
|
||||
logger.error(e);
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -153,7 +154,7 @@ public class ValidatorServiceImpl implements ValidatorService {
|
|||
// this.getValidationService().submitValidationJob(jobForValidation);
|
||||
} catch (Exception e) { // FIXME: replaced exception with log
|
||||
// throw new ValidatorServiceException(e);
|
||||
logger.error(e);
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return jobForValidation;
|
||||
|
|
|
@ -7,8 +7,9 @@ import eu.dnetlib.repo.manager.domain.dto.Role;
|
|||
import eu.dnetlib.repo.manager.domain.dto.User;
|
||||
import eu.dnetlib.repo.manager.service.aai.registry.utils.RegistryUtils;
|
||||
import eu.dnetlib.repo.manager.utils.HttpUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.mitre.openid.connect.model.OIDCAuthenticationToken;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
|
@ -23,7 +24,7 @@ import java.util.Map;
|
|||
@Service
|
||||
public class RegistryCalls implements AaiRegistryService {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(RegistryCalls.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(RegistryCalls.class);
|
||||
|
||||
private final String coid;
|
||||
public final HttpUtils httpUtils;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package eu.dnetlib.repo.manager.service.security;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
||||
|
@ -14,7 +15,7 @@ import java.util.stream.Collectors;
|
|||
@Service("roleMappingService")
|
||||
public class AaiRoleMappingService implements RoleMappingService {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(AaiRoleMappingService.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(AaiRoleMappingService.class);
|
||||
|
||||
@Value("${services.provide.aai.registry.production:true}")
|
||||
private boolean production;
|
||||
|
|
|
@ -2,7 +2,8 @@ package eu.dnetlib.repo.manager.service.security;
|
|||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
||||
|
||||
|
@ -13,7 +14,7 @@ import java.util.regex.Pattern;
|
|||
|
||||
public class AuthoritiesMapper {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(AuthoritiesMapper.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(AuthoritiesMapper.class);
|
||||
private static final String ENTITLEMENT_REGEX = "urn:geant:openaire[.]eu:group:([^:]*):?(.*)?:role=member#aai[.]openaire[.]eu";
|
||||
|
||||
private AuthoritiesMapper() {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package eu.dnetlib.repo.manager.service.security;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.mitre.openid.connect.model.OIDCAuthenticationToken;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
|
@ -21,7 +22,7 @@ import java.util.Map;
|
|||
@Service
|
||||
public class AuthoritiesUpdater extends HttpSessionSecurityContextRepository {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(AuthoritiesUpdater.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(AuthoritiesUpdater.class);
|
||||
|
||||
@Autowired
|
||||
FindByIndexNameSessionRepository sessions;
|
||||
|
@ -31,7 +32,6 @@ public class AuthoritiesUpdater extends HttpSessionSecurityContextRepository {
|
|||
Map<String, Session> map = sessions.
|
||||
findByIndexNameAndIndexValue(FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME, id);
|
||||
if (map != null) {
|
||||
logger.debug(map.values().toArray().length);
|
||||
for (Session session : map.values()) {
|
||||
logger.debug(session.getId());
|
||||
if (!session.isExpired()) {
|
||||
|
@ -39,7 +39,6 @@ public class AuthoritiesUpdater extends HttpSessionSecurityContextRepository {
|
|||
Authentication authentication = securityContext.getAuthentication();
|
||||
if (authentication instanceof OIDCAuthenticationToken) {
|
||||
OIDCAuthenticationToken authOIDC = (OIDCAuthenticationToken) authentication;
|
||||
logger.debug(update.authorities(authOIDC.getAuthorities()));
|
||||
securityContext.setAuthentication(new OIDCAuthenticationToken(authOIDC.getSub(), authOIDC.getIssuer(),
|
||||
authOIDC.getUserInfo(), update.authorities(authOIDC.getAuthorities()), authOIDC.getIdToken(),
|
||||
authOIDC.getAccessTokenValue(), authOIDC.getRefreshTokenValue()));
|
||||
|
|
|
@ -4,10 +4,10 @@ import com.google.gson.JsonElement;
|
|||
import eu.dnetlib.repo.manager.domain.dto.User;
|
||||
import eu.dnetlib.repo.manager.exception.ResourceNotFoundException;
|
||||
import eu.dnetlib.repo.manager.service.aai.registry.AaiRegistryService;
|
||||
import org.apache.log4j.LogManager;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.mitre.openid.connect.model.OIDCAuthenticationToken;
|
||||
import org.mitre.openid.connect.model.UserInfo;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -19,7 +19,7 @@ import java.util.List;
|
|||
@Service("authorizationService")
|
||||
public class AuthorizationServiceImpl implements AuthorizationService {
|
||||
|
||||
private static final Logger logger = LogManager.getLogger(AuthorizationServiceImpl.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(AuthorizationServiceImpl.class);
|
||||
|
||||
public static final String SUPER_ADMINISTRATOR = "SUPER_ADMINISTRATOR";
|
||||
public static final String CONTENT_PROVIDER_DASHBOARD_ADMINISTRATOR = "CONTENT_PROVIDER_DASHBOARD_ADMINISTRATOR";
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
package eu.dnetlib.repo.manager.utils;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import eu.dnetlib.repo.manager.domain.*;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
|
@ -20,12 +23,12 @@ import java.util.Objects;
|
|||
@Component
|
||||
public class Converter {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(Converter.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(Converter.class);
|
||||
|
||||
private final ObjectMapper objectMapper;
|
||||
|
||||
public Converter() {
|
||||
objectMapper = new ObjectMapper();
|
||||
objectMapper = new ObjectMapper()/*.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)*/;
|
||||
}
|
||||
public Repository toRepository(Object repositoryObject) {
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@ package eu.dnetlib.repo.manager.utils;
|
|||
|
||||
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
@ -12,7 +13,7 @@ import java.util.Objects;
|
|||
|
||||
public class DateUtils {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(DateUtils.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(DateUtils.class);
|
||||
|
||||
public static Date toDate(String date) {
|
||||
|
||||
|
@ -23,7 +24,7 @@ public class DateUtils {
|
|||
try {
|
||||
return formatter.parse(date);
|
||||
} catch (ParseException e) {
|
||||
logger.error(e);
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,8 @@ import com.google.gson.JsonElement;
|
|||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
@ -16,7 +17,7 @@ import java.util.Map;
|
|||
@Component
|
||||
public class HttpUtils {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(HttpUtils.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(HttpUtils.class);
|
||||
|
||||
@Value("${services.provide.aai.registry.url}")
|
||||
private String registryUrl;
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package eu.dnetlib.repo.manager.utils;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.dom4j.io.DOMWriter;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.w3c.dom.Document;
|
||||
import se.kb.oai.pmh.*;
|
||||
|
||||
|
@ -24,7 +25,7 @@ public class OaiTools {
|
|||
disableSslVerification();
|
||||
}
|
||||
|
||||
private static Logger logger = Logger.getLogger(OaiTools.class);
|
||||
private static Logger logger = LoggerFactory.getLogger(OaiTools.class);
|
||||
|
||||
public static List<String> getSetsOfRepo(String baseUrl) throws Exception {
|
||||
try {
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
</Console>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="info">
|
||||
<AppenderRef ref="LogToConsole"/>
|
||||
</Root>
|
||||
<Logger name="org.springframework.boot" level="error" additivity="false">
|
||||
<AppenderRef ref="LogToConsole"/>
|
||||
</Logger>
|
||||
<Root level="error">
|
||||
<AppenderRef ref="LogToConsole"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
|
|
Loading…
Reference in New Issue