From cca8fbd3dec88c88da8669ff0cfffa755a82aebd Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Fri, 2 Jun 2023 23:25:08 +0200 Subject: [PATCH] Log warning in case of standard Commons Logging discovery Closes gh-30575 --- .../org/apache/commons/logging/LogFactoryService.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/spring-jcl/src/main/java/org/apache/commons/logging/LogFactoryService.java b/spring-jcl/src/main/java/org/apache/commons/logging/LogFactoryService.java index ef82eb90c777..68561d67b5d6 100644 --- a/spring-jcl/src/main/java/org/apache/commons/logging/LogFactoryService.java +++ b/spring-jcl/src/main/java/org/apache/commons/logging/LogFactoryService.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,6 +36,12 @@ public class LogFactoryService extends LogFactory { private final Map attributes = new ConcurrentHashMap<>(); + public LogFactoryService() { + System.out.println("Standard Commons Logging discovery in action with spring-jcl: " + + "please remove commons-logging.jar from classpath in order to avoid potential conflicts"); + } + + @Override public Log getInstance(Class clazz) { return getInstance(clazz.getName());