Refactor util.log.LogUtils into core.log.LogDelegateFactory
Issue: SPR-17012
This commit is contained in:
@@ -13,12 +13,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.http;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.util.log.LogUtils;
|
||||
import org.springframework.core.log.LogDelegateFactory;
|
||||
|
||||
/**
|
||||
* Holds the shared logger named "org.springframework.web.HttpLogging" for HTTP
|
||||
@@ -36,6 +37,7 @@ import org.springframework.util.log.LogUtils;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.1
|
||||
* @see LogDelegateFactory
|
||||
*/
|
||||
public abstract class HttpLogging {
|
||||
|
||||
@@ -63,7 +65,7 @@ public abstract class HttpLogging {
|
||||
* @return the resulting composite logger
|
||||
*/
|
||||
public static Log forLog(Log primaryLogger) {
|
||||
return LogUtils.getCompositeLog(primaryLogger, fallbackLogger);
|
||||
return LogDelegateFactory.getCompositeLog(primaryLogger, fallbackLogger);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,9 +26,9 @@ import org.reactivestreams.Subscriber;
|
||||
import org.reactivestreams.Subscription;
|
||||
import reactor.core.publisher.Operators;
|
||||
|
||||
import org.springframework.core.log.LogDelegateFactory;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.log.LogUtils;
|
||||
|
||||
/**
|
||||
* Abstract base class for {@code Publisher} implementations that bridge between
|
||||
@@ -49,12 +49,12 @@ public abstract class AbstractListenerReadPublisher<T> implements Publisher<T> {
|
||||
|
||||
/**
|
||||
* Special logger for debugging Reactive Streams signals.
|
||||
* @see LogUtils#getHiddenLog(Class)
|
||||
* @see LogDelegateFactory#getHiddenLog(Class)
|
||||
* @see AbstractListenerWriteProcessor#rsWriteLogger
|
||||
* @see AbstractListenerWriteFlushProcessor#rsWriteFlushLogger
|
||||
* @see WriteResultPublisher#rsWriteResultLogger
|
||||
*/
|
||||
protected static Log rsReadLogger = LogUtils.getHiddenLog(AbstractListenerReadPublisher.class);
|
||||
protected static Log rsReadLogger = LogDelegateFactory.getHiddenLog(AbstractListenerReadPublisher.class);
|
||||
|
||||
|
||||
private final AtomicReference<State> state = new AtomicReference<>(State.UNSUBSCRIBED);
|
||||
|
||||
@@ -25,9 +25,9 @@ import org.reactivestreams.Publisher;
|
||||
import org.reactivestreams.Subscriber;
|
||||
import org.reactivestreams.Subscription;
|
||||
|
||||
import org.springframework.core.log.LogDelegateFactory;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.log.LogUtils;
|
||||
|
||||
/**
|
||||
* An alternative to {@link AbstractListenerWriteProcessor} but instead writing
|
||||
@@ -44,12 +44,12 @@ public abstract class AbstractListenerWriteFlushProcessor<T> implements Processo
|
||||
|
||||
/**
|
||||
* Special logger for debugging Reactive Streams signals.
|
||||
* @see LogUtils#getHiddenLog(Class)
|
||||
* @see LogDelegateFactory#getHiddenLog(Class)
|
||||
* @see AbstractListenerReadPublisher#rsReadLogger
|
||||
* @see AbstractListenerWriteProcessor#rsWriteLogger
|
||||
* @see WriteResultPublisher#rsWriteResultLogger
|
||||
*/
|
||||
protected static final Log rsWriteFlushLogger = LogUtils.getHiddenLog(AbstractListenerWriteFlushProcessor.class);
|
||||
protected static final Log rsWriteFlushLogger = LogDelegateFactory.getHiddenLog(AbstractListenerWriteFlushProcessor.class);
|
||||
|
||||
|
||||
private final AtomicReference<State> state = new AtomicReference<>(State.UNSUBSCRIBED);
|
||||
|
||||
@@ -24,9 +24,9 @@ import org.reactivestreams.Processor;
|
||||
import org.reactivestreams.Subscriber;
|
||||
import org.reactivestreams.Subscription;
|
||||
|
||||
import org.springframework.core.log.LogDelegateFactory;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.log.LogUtils;
|
||||
|
||||
/**
|
||||
* Abstract base class for {@code Processor} implementations that bridge between
|
||||
@@ -46,12 +46,12 @@ public abstract class AbstractListenerWriteProcessor<T> implements Processor<T,
|
||||
|
||||
/**
|
||||
* Special logger for debugging Reactive Streams signals.
|
||||
* @see LogUtils#getHiddenLog(Class)
|
||||
* @see LogDelegateFactory#getHiddenLog(Class)
|
||||
* @see AbstractListenerReadPublisher#rsReadLogger
|
||||
* @see AbstractListenerWriteFlushProcessor#rsWriteFlushLogger
|
||||
* @see WriteResultPublisher#rsWriteResultLogger
|
||||
*/
|
||||
protected static final Log rsWriteLogger = LogUtils.getHiddenLog(AbstractListenerWriteProcessor.class);
|
||||
protected static final Log rsWriteLogger = LogDelegateFactory.getHiddenLog(AbstractListenerWriteProcessor.class);
|
||||
|
||||
|
||||
private final AtomicReference<State> state = new AtomicReference<>(State.UNSUBSCRIBED);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 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.
|
||||
@@ -24,9 +24,9 @@ import org.reactivestreams.Subscriber;
|
||||
import org.reactivestreams.Subscription;
|
||||
import reactor.core.publisher.Operators;
|
||||
|
||||
import org.springframework.core.log.LogDelegateFactory;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.log.LogUtils;
|
||||
|
||||
/**
|
||||
* Publisher returned from {@link ServerHttpResponse#writeWith(Publisher)}.
|
||||
@@ -40,12 +40,12 @@ class WriteResultPublisher implements Publisher<Void> {
|
||||
|
||||
/**
|
||||
* Special logger for debugging Reactive Streams signals.
|
||||
* @see LogUtils#getHiddenLog(Class)
|
||||
* @see LogDelegateFactory#getHiddenLog(Class)
|
||||
* @see AbstractListenerReadPublisher#rsReadLogger
|
||||
* @see AbstractListenerWriteProcessor#rsWriteLogger
|
||||
* @see AbstractListenerWriteFlushProcessor#rsWriteFlushLogger
|
||||
*/
|
||||
private static final Log rsWriteResultLogger = LogUtils.getHiddenLog(WriteResultPublisher.class);
|
||||
private static final Log rsWriteResultLogger = LogDelegateFactory.getHiddenLog(WriteResultPublisher.class);
|
||||
|
||||
|
||||
private final AtomicReference<State> state = new AtomicReference<>(State.UNSUBSCRIBED);
|
||||
|
||||
Reference in New Issue
Block a user