io.druid.java.util.common.logger.Logger.isDebugEnabled()方法的使用及代码示例

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

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

Logger.isDebugEnabled介绍

暂无

代码示例

代码示例来源:origin: io.druid/druid-server

  1. @Override
  2. public void addCounter(String name)
  3. {
  4. if (!interesting.apply(name)) {
  5. return;
  6. }
  7. counters.putIfAbsent(name, new AtomicLong(0L));
  8. if (log.isDebugEnabled()) {
  9. log.debug("Add Counter [%s]", name);
  10. }
  11. }

代码示例来源:origin: io.druid/druid-server

  1. @Override
  2. public void removeMeter(String name)
  3. {
  4. if (!interesting.apply(name)) {
  5. return;
  6. }
  7. if (log.isDebugEnabled()) {
  8. log.debug("Ignoring request to remove meter [%s]", name);
  9. }
  10. }

代码示例来源:origin: io.druid/druid-server

  1. @Override
  2. public void removeCounter(String name)
  3. {
  4. if (log.isDebugEnabled()) {
  5. log.debug("Ignoring request to remove [%s]", name);
  6. }
  7. }

代码示例来源:origin: io.druid/druid-server

  1. @Override
  2. public void addMeter(String name)
  3. {
  4. if (!interesting.apply(name)) {
  5. return;
  6. }
  7. meters.putIfAbsent(name, new AtomicLong(0L));
  8. if (log.isDebugEnabled()) {
  9. log.debug("Adding meter [%s]", name);
  10. }
  11. }

代码示例来源:origin: io.druid/druid-server

  1. @Override
  2. public void incrementCounter(String name)
  3. {
  4. if (!interesting.apply(name)) {
  5. return;
  6. }
  7. AtomicLong counter = counters.get(name);
  8. if (counter == null) {
  9. counters.putIfAbsent(name, new AtomicLong(0));
  10. counter = counters.get(name);
  11. }
  12. counter.incrementAndGet();
  13. if (log.isDebugEnabled()) {
  14. log.debug("Increment [%s]", name);
  15. }
  16. }

代码示例来源:origin: io.druid/druid-server

  1. @Override
  2. public void decrementCounter(String name)
  3. {
  4. if (!interesting.apply(name)) {
  5. return;
  6. }
  7. AtomicLong counter = counters.get(name);
  8. if (counter == null) {
  9. counters.putIfAbsent(name, new AtomicLong(0));
  10. counter = counters.get(name);
  11. }
  12. counter.decrementAndGet();
  13. if (log.isDebugEnabled()) {
  14. log.debug("Decrement [%s]", name);
  15. }
  16. }

代码示例来源:origin: io.druid/druid-server

  1. @Override
  2. public void decrementCounter(String name, int amount)
  3. {
  4. if (!interesting.apply(name)) {
  5. return;
  6. }
  7. AtomicLong counter = counters.get(name);
  8. if (counter == null) {
  9. counters.putIfAbsent(name, new AtomicLong(0L));
  10. counter = counters.get(name);
  11. }
  12. counter.addAndGet(-amount);
  13. if (log.isDebugEnabled()) {
  14. log.debug("Decrement [%s] %d", name, amount);
  15. }
  16. }

代码示例来源:origin: io.druid/druid-server

  1. @Override
  2. public void incrementCounter(String name, int amount)
  3. {
  4. if (!interesting.apply(name)) {
  5. return;
  6. }
  7. AtomicLong counter = counters.get(name);
  8. if (counter == null) {
  9. counters.putIfAbsent(name, new AtomicLong(0));
  10. counter = counters.get(name);
  11. }
  12. counter.addAndGet(amount);
  13. if (log.isDebugEnabled()) {
  14. log.debug("Increment [%s] %d", name, amount);
  15. }
  16. }

代码示例来源:origin: io.druid/druid-server

  1. @Override
  2. public void markMeter(String name)
  3. {
  4. if (!interesting.apply(name)) {
  5. return;
  6. }
  7. AtomicLong meter = meters.get(name);
  8. if (meter == null) {
  9. meters.putIfAbsent(name, new AtomicLong(0L));
  10. meter = meters.get(name);
  11. }
  12. meter.incrementAndGet();
  13. if (log.isDebugEnabled()) {
  14. log.debug("Increment counter [%s]", name);
  15. }
  16. }

代码示例来源:origin: io.druid/druid-services

  1. if (log.isTraceEnabled() || log.isDebugEnabled()) {
  2. return new DefaultTeslaAether(
  3. localRepository,

代码示例来源:origin: io.druid/java-util

  1. private static void debugLogState(String name, long state)
  2. {
  3. if (log.isDebugEnabled()) {
  4. log.debug(
  5. "%s[bufferWatermark=%d, parties=%d, isSealed=%s]",
  6. name,
  7. bufferWatermark(state),
  8. parties(state),
  9. isSealed(state)
  10. );
  11. }
  12. }
  13. }

代码示例来源:origin: io.druid/java-util

  1. if (log.isDebugEnabled()) {
  2. log.debug(message, started.get());

代码示例来源:origin: io.druid/java-util

  1. if (log.isDebugEnabled()) {
  2. log.debug(message, jsonMapper.writeValueAsString(event));

代码示例来源:origin: io.druid/java-util

  1. if (log.isDebugEnabled()) {
  2. log.debug(message, started.get());

代码示例来源:origin: io.druid/druid-server

  1. @Override
  2. public void log(Request request, Response response)
  3. {
  4. if (logger.isDebugEnabled()) {
  5. logger.debug(
  6. "%s %s %s %s",
  7. request.getRemoteAddr(),
  8. request.getMethod(),
  9. request.getHttpURI().toString(),
  10. request.getProtocol()
  11. );
  12. }
  13. }
  14. }

代码示例来源:origin: io.druid/druid-server

  1. @Override
  2. public DruidCoordinatorRuntimeParams run(DruidCoordinatorRuntimeParams params)
  3. {
  4. log.info("Starting coordination. Getting available segments.");
  5. // Display info about all available segments
  6. final Set<DataSegment> availableSegments = coordinator.getOrderedAvailableDataSegments();
  7. if (log.isDebugEnabled()) {
  8. log.debug("Available DataSegments");
  9. for (DataSegment dataSegment : availableSegments) {
  10. log.debug(" %s", dataSegment);
  11. }
  12. }
  13. log.info("Found [%,d] available segments.", availableSegments.size());
  14. return params.buildFromExisting()
  15. .withAvailableSegments(availableSegments)
  16. .build();
  17. }
  18. }

代码示例来源:origin: io.druid/java-util

  1. @Override
  2. public void channelDisconnected(ChannelHandlerContext context, ChannelStateEvent event) throws Exception
  3. {
  4. if (log.isDebugEnabled()) {
  5. log.debug("[%s] Channel disconnected", requestDesc);
  6. }
  7. // response is non-null if we received initial chunk and then exception occurs
  8. if (response != null) {
  9. handler.exceptionCaught(response, new ChannelException("Channel disconnected"));
  10. }
  11. channel.close();
  12. channelResourceContainer.returnResource();
  13. if (!retVal.isDone()) {
  14. log.warn("[%s] Channel disconnected before response complete", requestDesc);
  15. retVal.setException(new ChannelException("Channel disconnected"));
  16. }
  17. context.sendUpstream(event);
  18. }

代码示例来源:origin: io.druid/java-util

  1. @Override
  2. public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception
  3. if (log.isDebugEnabled()) {
  4. log.debug("[%s] messageReceived: %s", requestDesc, e.getMessage());
  5. if (log.isDebugEnabled()) {
  6. log.debug("[%s] Got response: %s", requestDesc, httpResponse.getStatus());
  7. if (log.isDebugEnabled()) {
  8. log.debug(
  9. "[%s] Got chunk: %sB, last=%s",

代码示例来源:origin: io.druid/java-util

  1. @Override
  2. public void exceptionCaught(ChannelHandlerContext context, ExceptionEvent event) throws Exception
  3. {
  4. if (log.isDebugEnabled()) {
  5. final Throwable cause = event.getCause();
  6. if (cause == null) {
  7. log.debug("[%s] Caught exception", requestDesc);
  8. } else {
  9. log.debug(cause, "[%s] Caught exception", requestDesc);
  10. }
  11. }
  12. retVal.setException(event.getCause());
  13. // response is non-null if we received initial chunk and then exception occurs
  14. if (response != null) {
  15. handler.exceptionCaught(response, event.getCause());
  16. }
  17. removeHandlers();
  18. try {
  19. channel.close();
  20. }
  21. catch (Exception e) {
  22. // ignore
  23. }
  24. finally {
  25. channelResourceContainer.returnResource();
  26. }
  27. context.sendUpstream(event);
  28. }

代码示例来源:origin: io.druid/java-util

  1. if (log.isDebugEnabled()) {
  2. log.debug("[%s] starting", requestDesc);

相关文章