reactor.util.Logger.isInfoEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(227)

本文整理了Java中reactor.util.Logger.isInfoEnabled()方法的一些代码示例,展示了Logger.isInfoEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.isInfoEnabled()方法的具体详情如下:
包路径:reactor.util.Logger
类名称:Logger
方法名:isInfoEnabled

Logger.isInfoEnabled介绍

[英]Is the logger instance enabled for the INFO level?
[中]是否为信息级别启用了记录器实例?

代码示例

代码示例来源:origin: reactor/reactor-core

  1. @Override
  2. public boolean isInfoEnabled() {
  3. return delegate.isInfoEnabled();
  4. }

代码示例来源:origin: reactor/reactor-core

  1. @Override
  2. @Nullable
  3. public Runnable onAfterTerminateCall() {
  4. if ((options & AFTER_TERMINATE) == AFTER_TERMINATE && (level != Level.INFO || log.isInfoEnabled())) {
  5. return () -> log(SignalType.AFTER_TERMINATE, "");
  6. }
  7. return null;
  8. }

代码示例来源:origin: reactor/reactor-core

  1. @Override
  2. @Nullable
  3. public Runnable onCancelCall() {
  4. if ((options & CANCEL) == CANCEL && (level != Level.INFO || log.isInfoEnabled())) {
  5. return () -> log(SignalType.CANCEL, "");
  6. }
  7. return null;
  8. }

代码示例来源:origin: reactor/reactor-core

  1. @Override
  2. @Nullable
  3. public LongConsumer onRequestCall() {
  4. if ((options & REQUEST) == REQUEST && (level != Level.INFO || log.isInfoEnabled())) {
  5. return n -> log(SignalType.REQUEST,
  6. Long.MAX_VALUE == n ? "unbounded" : n);
  7. }
  8. return null;
  9. }

代码示例来源:origin: reactor/reactor-core

  1. @Nullable
  2. @Override
  3. public Consumer<? super Context> onCurrentContextCall() {
  4. if ((options & CONTEXT_PARENT) == CONTEXT_PARENT && (level != Level.INFO || log
  5. .isInfoEnabled())) {
  6. return c -> log(SignalType.ON_CONTEXT, c);
  7. }
  8. return null;
  9. }

代码示例来源:origin: reactor/reactor-core

  1. @Override
  2. @Nullable
  3. public Consumer<? super IN> onNextCall() {
  4. if ((options & ON_NEXT) == ON_NEXT && (level != Level.INFO || log.isInfoEnabled())) {
  5. return d -> safeLog(SignalType.ON_NEXT, d);
  6. }
  7. return null;
  8. }

代码示例来源:origin: reactor/reactor-core

  1. @Override
  2. @Nullable
  3. public Runnable onCompleteCall() {
  4. if ((options & ON_COMPLETE) == ON_COMPLETE && (level != Level.INFO || log.isInfoEnabled())) {
  5. return () -> log(SignalType.ON_COMPLETE, "");
  6. }
  7. return null;
  8. }

代码示例来源:origin: reactor/reactor-core

  1. @Override
  2. @Nullable
  3. public Consumer<? super Subscription> onSubscribeCall() {
  4. if ((options & ON_SUBSCRIBE) == ON_SUBSCRIBE && (level != Level.INFO || log.isInfoEnabled())) {
  5. return s -> log(SignalType.ON_SUBSCRIBE, subscriptionAsString(s));
  6. }
  7. return null;
  8. }

代码示例来源:origin: reactor/reactor-core

  1. @Test
  2. public void isInfoEnabled() throws Exception {
  3. assertThat(logger.isInfoEnabled()).isTrue();
  4. }

代码示例来源:origin: io.projectreactor/reactor-netty

  1. @Override
  2. protected void doComplete(ChannelFuture future, Subscriber<? super Void> s) {
  3. if(log.isInfoEnabled()) {
  4. log.info("BIND {} {}",
  5. future.isSuccess() ? "OK" : "FAILED",
  6. future.channel()
  7. .localAddress());
  8. }
  9. if (listenAddress.getPort() == 0) {
  10. listenAddress = (InetSocketAddress) future.channel()
  11. .localAddress();
  12. }
  13. super.doComplete(future, s);
  14. }
  15. };

代码示例来源:origin: io.projectreactor/reactor-core

  1. @Override
  2. @Nullable
  3. public Runnable onCompleteCall() {
  4. if ((options & ON_COMPLETE) == ON_COMPLETE && (level != Level.INFO || log.isInfoEnabled())) {
  5. return () -> log(SignalType.ON_COMPLETE, "");
  6. }
  7. return null;
  8. }

代码示例来源:origin: io.projectreactor/reactor-core

  1. @Nullable
  2. @Override
  3. public Consumer<? super Context> onCurrentContextCall() {
  4. if ((options & CONTEXT_PARENT) == CONTEXT_PARENT && (level != Level.INFO || log
  5. .isInfoEnabled())) {
  6. return c -> log(SignalType.ON_CONTEXT, c);
  7. }
  8. return null;
  9. }

代码示例来源:origin: io.projectreactor/reactor-core

  1. @Override
  2. @Nullable
  3. public Consumer<? super IN> onNextCall() {
  4. if ((options & ON_NEXT) == ON_NEXT && (level != Level.INFO || log.isInfoEnabled())) {
  5. return d -> safeLog(SignalType.ON_NEXT, d);
  6. }
  7. return null;
  8. }

代码示例来源:origin: reactor/reactor-netty

  1. void log() {
  2. if (log.isInfoEnabled()) {
  3. log.info(COMMON_LOG_FORMAT, address, user, zonedDateTime,
  4. method, uri, protocol, status, (contentLength > -1 ? contentLength : MISSING), port, duration());
  5. }
  6. }
  7. }

代码示例来源:origin: io.projectreactor/reactor-core

  1. @Override
  2. @Nullable
  3. public Runnable onCancelCall() {
  4. if ((options & CANCEL) == CANCEL && (level != Level.INFO || log.isInfoEnabled())) {
  5. return () -> log(SignalType.CANCEL, "");
  6. }
  7. return null;
  8. }

代码示例来源:origin: io.projectreactor/reactor-core

  1. @Override
  2. @Nullable
  3. public Runnable onAfterTerminateCall() {
  4. if ((options & AFTER_TERMINATE) == AFTER_TERMINATE && (level != Level.INFO || log.isInfoEnabled())) {
  5. return () -> log(SignalType.AFTER_TERMINATE, "");
  6. }
  7. return null;
  8. }

代码示例来源:origin: io.projectreactor/reactor-core

  1. @Override
  2. @Nullable
  3. public LongConsumer onRequestCall() {
  4. if ((options & REQUEST) == REQUEST && (level != Level.INFO || log.isInfoEnabled())) {
  5. return n -> log(SignalType.REQUEST,
  6. Long.MAX_VALUE == n ? "unbounded" : n);
  7. }
  8. return null;
  9. }

代码示例来源:origin: io.projectreactor.netty/reactor-netty

  1. void log() {
  2. if (log.isInfoEnabled()) {
  3. log.info(COMMON_LOG_FORMAT, address, user, zonedDateTime,
  4. method, uri, protocol, status, (contentLength > -1 ? contentLength : MISSING), port, duration());
  5. }
  6. }
  7. }

代码示例来源:origin: io.projectreactor.ipc/reactor-netty

  1. void log() {
  2. if (log.isInfoEnabled()) {
  3. log.info(COMMON_LOG_FORMAT, address, user, zonedDateTime,
  4. method, uri, protocol, status, (contentLength > -1 ? contentLength : MISSING), port, duration());
  5. }
  6. }
  7. }

代码示例来源:origin: io.projectreactor/reactor-core

  1. @Override
  2. @Nullable
  3. public Consumer<? super Subscription> onSubscribeCall() {
  4. if ((options & ON_SUBSCRIBE) == ON_SUBSCRIBE && (level != Level.INFO || log.isInfoEnabled())) {
  5. return s -> log(SignalType.ON_SUBSCRIBE, subscriptionAsString(s));
  6. }
  7. return null;
  8. }

相关文章