org.apache.druid.java.util.common.logger.Logger类的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(211)

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

Logger介绍

暂无

代码示例

代码示例来源:origin: apache/incubator-druid

@Override
public void killAll()
{
 log.info("Noop: No task logs are deleted.");
}

代码示例来源:origin: apache/incubator-druid

@Override
 public void shutdownCompleted(ShutdownSignalException cause)
 {
  log.warn(cause, "Channel closed!");
 }
}

代码示例来源:origin: apache/incubator-druid

@Override
public void onException(Exception ex)
{
 log.error(ex, "Got exception");
}

代码示例来源:origin: apache/incubator-druid

@Override
public void removeCounter(String name)
{
 if (log.isDebugEnabled()) {
  log.debug("Ignoring request to remove [%s]", name);
 }
}

代码示例来源:origin: apache/incubator-druid

public void unregister(String serviceName)
 {
  log.info("Unregistering EventReceiverFirehoseMetric for service [%s]", serviceName);
  if (metrics.remove(serviceName) == null) {
   log.warn("Unregistering a non-exist service. Service [%s] never exists.", serviceName);
  }
 }
}

代码示例来源:origin: apache/incubator-druid

@Override
 public void stop()
 {
  log.info("Closing object[%s]", o);
  try {
   o.close();
  }
  catch (Exception e) {
   log.error(e, "Exception when closing object [%s]", o);
  }
 }
}

代码示例来源:origin: apache/incubator-druid

@Override
public void removeHistogram(String name)
{
 log.debug("Ignoring remove histogram [%s]", name);
}

代码示例来源:origin: apache/incubator-druid

@Override
 public void close()
 {
  long mergeBufferTotalSize = 0;
  for (Pair<ByteBuffer, Integer> bufferAllocation : directBufferAllocations) {
   log.debug("Freeing dictionary merging direct buffer with size[%,d]", bufferAllocation.rhs);
   mergeBufferTotalSize += bufferAllocation.rhs;
   ByteBufferUtils.free(bufferAllocation.lhs);
  }
  log.info("Freed [%,d] bytes of dictionary merging direct buffers", mergeBufferTotalSize);
 }
}

代码示例来源:origin: apache/incubator-druid

@SuppressWarnings("MalformedFormatString")
 @Test
 public void testLegacyLogging()
 {
  final Logger log = new Logger(LoggerTest.class);
  final Throwable throwable = new Throwable();
  // These should show up in an IDE as deprecated, but shouldn't actually fail.
  log.error("foo", throwable);
  log.warn("foo", throwable);
 }
}

代码示例来源:origin: apache/incubator-druid

@LifecycleStop
 public void stop()
 {
  if (log4jShutdown != null) {
   log.debug("Shutting down log4j");
   log4jShutdown.stop();
  } else {
   log.warn("Log4j shutdown was registered in lifecycle but no shutdown object exists!");
  }
 }
}

代码示例来源:origin: apache/incubator-druid

@SuppressWarnings("MalformedFormatString")
@Test
public void testLogWithCrazyMessages()
{
 final String message = "this % might %d kill %*.s the %s parser";
 final Logger log = new Logger(LoggerTest.class);
 log.warn(message);
}

代码示例来源:origin: apache/incubator-druid

public LoggingEmitter(LoggingEmitterConfig config, ObjectMapper jsonMapper)
{
 this(new Logger(config.getLoggerClass()), Level.toLevel(config.getLogLevel()), jsonMapper);
}

代码示例来源:origin: apache/incubator-druid

@Override
 public void stop()
 {
  log.info("Stopping object[%s]", o);
  try {
   stopMethod.invoke(o);
  }
  catch (Exception e) {
   log.error(e, "Unable to invoke stopMethod() on %s", o.getClass());
  }
 }
}

代码示例来源:origin: apache/incubator-druid

private void poll()
{
 for (Map.Entry<String, ConfigHolder> entry : watchedConfigs.entrySet()) {
  try {
   if (entry.getValue().swapIfNew(dbConnector.lookup(configTable, "name", "payload", entry.getKey()))) {
    log.info("New value for key[%s] seen.", entry.getKey());
   }
  }
  catch (Exception e) {
   log.warn(e, "Exception when checking property[%s]", entry.getKey());
  }
 }
}

代码示例来源:origin: apache/incubator-druid

@Override
public void removeMeter(String name)
{
 if (!interesting.apply(name)) {
  return;
 }
 if (log.isDebugEnabled()) {
  log.debug("Ignoring request to remove meter [%s]", name);
 }
}

代码示例来源:origin: apache/incubator-druid

@Override
 public void updateHistogram(String name, int amount)
 {
  log.debug("Ignoring update histogram [%s]: %d", name, amount);
 }
};

代码示例来源:origin: apache/incubator-druid

@Override
public void pushTaskLog(String taskid, File logFile)
{
 log.info("Not pushing logs for task: %s", taskid);
}

代码示例来源:origin: apache/incubator-druid

@Override
 public void abortTask(TaskAttemptContext taskContext)
 {
  log.warn("Aborting task. Nothing to clean up.");
 }
};

代码示例来源:origin: apache/incubator-druid

@Override
 public void exceptionCaught(ClientResponse<StatusResponseHolder> clientResponse, Throwable e)
 {
  // Its safe to Ignore as the ClientResponse returned in handleChunk were unfinished
  log.error(e, "exceptionCaught in CommonCacheNotifier ResponseHandler.");
 }
}

代码示例来源:origin: apache/incubator-druid

private void deleteAllSegmentFiles(Injector injector)
{
 try {
  log.info("===========================================================================");
  log.info("Deleting all Segment Files.");
  log.info("===========================================================================");
  DataSegmentKiller segmentKiller = injector.getInstance(DataSegmentKiller.class);
  segmentKiller.killAll();
 }
 catch (Exception ex) {
  log.error(ex, "Failed to cleanup Segment Files.");
 }
}

相关文章