本文整理了Java中reactor.util.Logger.debug()
方法的一些代码示例,展示了Logger.debug()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.debug()
方法的具体详情如下:
包路径:reactor.util.Logger
类名称:Logger
方法名:debug
[英]Log a message at the DEBUG level.
[中]在调试级别记录消息。
代码示例来源:origin: reactor/reactor-core
public void run() {
LOGGER.debug("expired {}", state);
@SuppressWarnings("unchecked")
Signal<T> emptyState = (Signal<T>) EMPTY;
state = emptyState;
}
代码示例来源:origin: reactor/reactor-core
/**
* Reset global error dropped strategy to bubbling back the error.
*/
public static void resetOnErrorDropped() {
log.debug("Reset to factory defaults : onErrorDropped");
synchronized (log) {
onErrorDroppedHook = null;
}
}
代码示例来源:origin: reactor/reactor-core
/**
* Reset global data dropped strategy to throwing via {@link
* reactor.core.Exceptions#failWithCancel()}
*/
public static void resetOnNextDropped() {
log.debug("Reset to factory defaults : onNextDropped");
synchronized (log) {
onNextDroppedHook = null;
}
}
代码示例来源:origin: reactor/reactor-core
/**
* Reset global onNext error handling strategy to terminating the sequence with
* an onError and cancelling upstream ({@link OnNextFailureStrategy#STOP}).
*/
public static void resetOnNextError() {
log.debug("Reset to factory defaults : onNextError");
synchronized (log) {
onNextErrorHook = null;
}
}
代码示例来源:origin: reactor/reactor-core
/**
* Enable operator stack recorder that captures a declaration stack whenever an
* operator is instantiated. When errors are observed later on, they will be
* enriched with a Suppressed Exception detailing the original assembly line stack.
* Must be called before producers (e.g. Flux.map, Mono.fromCallable) are actually
* called to intercept the right stack information.
* <p>
* This is added as a specifically-keyed sub-hook in {@link #onEachOperator(String, Function)}.
*/
public static void onOperatorDebug() {
log.debug("Enabling stacktrace debugging via onOperatorDebug");
GLOBAL_TRACE = true;
}
代码示例来源:origin: reactor/reactor-core
/**
* Reset global "assembly" hook tracking
*/
public static void resetOnEachOperator() {
log.debug("Reset to factory defaults : onEachOperator");
synchronized (log) {
onEachOperatorHooks.clear();
onEachOperatorHook = null;
}
}
代码示例来源:origin: reactor/reactor-core
/**
* Reset global "subscriber" hook tracking
*/
public static void resetOnLastOperator() {
log.debug("Reset to factory defaults : onLastOperator");
synchronized (log) {
onLastOperatorHooks.clear();
onLastOperatorHook = null;
}
}
代码示例来源:origin: reactor/reactor-core
/**
* Reset global operator error mapping to the default behavior.
* <p>
* For reference, the default mapping is to unwrap the exception and, if the second
* parameter is another exception, to add it to the first as a suppressed.
*/
public static void resetOnOperatorError() {
log.debug("Reset to factory defaults : onOperatorError");
synchronized (log) {
onOperatorErrorHooks.clear();
onOperatorErrorHook = null;
}
}
代码示例来源:origin: reactor/reactor-core
/**
* Resets {@link #resetOnNextDropped() onNextDropped hook(s)} and
* apply a strategy of throwing {@link Exceptions#failWithCancel()} instead.
* <p>
* Use {@link #resetOnNextDropped()} to reset to the default strategy of logging.
*/
public static void onNextDroppedFail() {
log.debug("Enabling failure mode for onNextDropped");
synchronized(log) {
onNextDroppedHook = n -> {throw Exceptions.failWithCancel();};
}
}
代码示例来源:origin: reactor/reactor-core
/**
* Reset the {@link #onHandleError(BiConsumer)} hook to the default no-op behavior.
*/
public static void resetOnHandleError() {
if (log.isDebugEnabled()) {
log.debug("Reset to factory defaults: onHandleError");
}
onHandleErrorHook = null;
}
代码示例来源:origin: reactor/reactor-core
@Override
public void debug(String msg, Throwable t) {
delegate.debug(msg, t);
}
代码示例来源:origin: reactor/reactor-core
/**
* Force the usage of JDK-based {@link Logger Loggers}, even if SLF4J is available
* on the classpath.
* <p>
* The previously active logger factory is simply replaced without
* any particular clean-up.
*/
public static final void useJdkLoggers() {
String name = LoggerFactory.class.getName();
LoggerFactory loggerFactory = new JdkLoggerFactory();
loggerFactory.getLogger(name).debug("Using JDK logging framework");
LOGGER_FACTORY = loggerFactory;
}
代码示例来源:origin: reactor/reactor-core
/**
* Log an {@link IllegalStateException} that indicates more than the requested
* amount was produced.
*
* @see Exceptions#failWithOverflow()
*/
public static void reportMoreProduced() {
if (log.isDebugEnabled()) {
log.debug("More data produced than requested",
Exceptions.failWithOverflow());
}
}
代码示例来源:origin: reactor/reactor-core
/**
* Log a {@link Exceptions#duplicateOnSubscribeException() duplicate subscription} error.
*
* @see Exceptions#duplicateOnSubscribeException()
*/
public static void reportSubscriptionSet() {
if (log.isDebugEnabled()) {
log.debug("Duplicate Subscription has been detected",
Exceptions.duplicateOnSubscribeException());
}
}
代码示例来源:origin: reactor/reactor-core
/**
* Log an {@link IllegalArgumentException} if the request is null or negative.
*
* @param n the failing demand
*
* @see Exceptions#nullOrNegativeRequestException(long)
*/
public static void reportBadRequest(long n) {
if (log.isDebugEnabled()) {
log.debug("Negative request",
Exceptions.nullOrNegativeRequestException(n));
}
}
代码示例来源:origin: reactor/reactor-core
@Test
public void debug1() throws Exception {
logger.debug("message {} {} format", "with", 1);
assertThat(errContent.size()).isZero();
assertThat(outContent.toString()).isEqualTo("[DEBUG] (" + Thread.currentThread().getName() + ") message with 1 format\n");
}
代码示例来源:origin: reactor/reactor-core
@Test
public void debug() throws Exception {
logger.debug("message");
assertThat(errContent.size()).isZero();
assertThat(outContent.toString()).isEqualTo("[DEBUG] (" + Thread.currentThread().getName() + ") message\n");
}
代码示例来源:origin: reactor/reactor-core
@Test
public void debugDismissedInNonVerboseMode() {
Logger log = new Loggers.ConsoleLogger("test", new PrintStream(outContent), new PrintStream(errContent), false);
log.debug("foo");
log.debug("foo", new IllegalArgumentException("foo"));
log.debug("foo {}", "foo");
assertThat(outContent.toString()).doesNotContain("foo");
assertThat(errContent.toString()).doesNotContain("foo");
assertThat(log.isDebugEnabled()).as("isDebugEnabled").isFalse();
}
代码示例来源:origin: reactor/reactor-core
@Test
public void debug2() throws Exception {
logger.debug("with cause", CAUSE);
assertThat(errContent.size()).isZero();
assertThat(outContent.toString())
.startsWith("[DEBUG] (" + Thread.currentThread().getName() + ") with cause - java.lang.IllegalStateException: cause" +
"\njava.lang.IllegalStateException: cause\n" +
"\tat reactor.util.ConsoleLoggerTest");
}
代码示例来源:origin: reactor/reactor-core
@Test
public void debugNulls() {
logger.debug("vararg {} is {}", (Object[]) null);
logger.debug("param {} is {}", null, null);
assertThat(errContent.size()).isZero();
assertThat(outContent.toString())
.contains("vararg {} is {}")
.contains("param null is null");
}
内容来源于网络,如有侵权,请联系作者删除!