Browse Source

Log warning in case of standard Commons Logging discovery

Closes gh-30575
pull/30619/head
Juergen Hoeller 3 years ago
parent
commit
cca8fbd3de
  1. 8
      spring-jcl/src/main/java/org/apache/commons/logging/LogFactoryService.java

8
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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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<String, Object> attributes = new ConcurrentHashMap<>(); private final Map<String, Object> 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 @Override
public Log getInstance(Class<?> clazz) { public Log getInstance(Class<?> clazz) {
return getInstance(clazz.getName()); return getInstance(clazz.getName());

Loading…
Cancel
Save