com.metamx.common.logger.Logger.wtf()方法的使用及代码示例

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

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

Logger.wtf介绍

暂无

代码示例

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

log.wtf(e, "This can only happen if the .exists() call lied.  That's f'd up.");

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

@LifecycleStop
public void stop() throws IOException
{
 synchronized (lock) {
  if (childrenCache == null) {
   return;
  }
  // This close() call actually calls shutdownNow() on the executor registered with the Cache object...
  childrenCache.close();
  childrenCache = null;
 }
 for (String containerKey : Lists.newArrayList(containers.keySet())) {
  final ContainerHolder containerHolder = containers.remove(containerKey);
  if (containerHolder == null) {
   log.wtf("!?  Got key[%s] from keySet() but it didn't have a value!?", containerKey);
  } else {
   // This close() call actually calls shutdownNow() on the executor registered with the Cache object...
   containerHolder.getCache().close();
  }
 }
}

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

@Override
public InputRow nextRow()
{
 if (delivery == null) {
  //Just making sure.
  log.wtf("I have nothing in delivery. Method hasMore() should have returned false.");
  return null;
 }
 return stringParser.parse(StringUtils.fromUtf8(delivery.getBody()));
}

代码示例来源:origin: metamx/java-util

@Override
public ClientResponse<InputStream> done(ClientResponse<InputStream> clientResponse)
{
 synchronized (done) {
  try {
   // An empty byte array is put at the end to give the SequenceInputStream.close() as something to close out
   // after done is set to true, regardless of the rest of the stream's state.
   queue.put(ByteSource.empty().openStream());
   log.debug("Added terminal empty stream");
  }
  catch (InterruptedException e) {
   log.warn(e, "Thread interrupted while adding to queue");
   Thread.currentThread().interrupt();
   throw Throwables.propagate(e);
  }
  catch (IOException e) {
   // This should never happen
   log.wtf(e, "The empty stream threw an IOException");
   throw Throwables.propagate(e);
  }
  finally {
   log.debug("Done after adding %d bytes of streams", byteCount.get());
   done.set(true);
  }
 }
 return ClientResponse.<InputStream>finished(clientResponse.getObj());
}

代码示例来源:origin: com.metamx/http-client

@Override
public ClientResponse<InputStream> done(ClientResponse<InputStream> clientResponse)
{
 synchronized (done) {
  try {
   // An empty byte array is put at the end to give the SequenceInputStream.close() as something to close out
   // after done is set to true, regardless of the rest of the stream's state.
   queue.put(ByteSource.empty().openStream());
   log.debug("Added terminal empty stream");
  }
  catch (InterruptedException e) {
   log.warn(e, "Thread interrupted while adding to queue");
   Thread.currentThread().interrupt();
   throw Throwables.propagate(e);
  }
  catch (IOException e) {
   // This should never happen
   log.wtf(e, "The empty stream threw an IOException");
   throw Throwables.propagate(e);
  }
  finally {
   log.debug("Done after adding %d bytes of streams", byteCount.get());
   done.set(true);
  }
 }
 return ClientResponse.<InputStream>finished(clientResponse.getObj());
}

代码示例来源:origin: com.metamx/java-util

@Override
public ClientResponse<InputStream> done(ClientResponse<InputStream> clientResponse)
{
 synchronized (done) {
  try {
   // An empty byte array is put at the end to give the SequenceInputStream.close() as something to close out
   // after done is set to true, regardless of the rest of the stream's state.
   queue.put(ByteSource.empty().openStream());
   log.debug("Added terminal empty stream");
  }
  catch (InterruptedException e) {
   log.warn(e, "Thread interrupted while adding to queue");
   Thread.currentThread().interrupt();
   throw Throwables.propagate(e);
  }
  catch (IOException e) {
   // This should never happen
   log.wtf(e, "The empty stream threw an IOException");
   throw Throwables.propagate(e);
  }
  finally {
   log.debug("Done after adding %d bytes of streams", byteCount.get());
   done.set(true);
  }
 }
 return ClientResponse.<InputStream>finished(clientResponse.getObj());
}

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

@Override
public boolean hasMore()
{
 delivery = null;
 try {
  // Wait for the next delivery. This will block until something is available.
  delivery = consumer.nextDelivery();
  if (delivery != null) {
   lastDeliveryTag = delivery.getEnvelope().getDeliveryTag();
   // If delivery is non-null, we report that there is something more to process.
   return true;
  }
 }
 catch (InterruptedException e) {
  // A little unclear on how we should handle this.
  // At any rate, we're in an unknown state now so let's log something and return false.
  log.wtf(e, "Got interrupted while waiting for next delivery. Doubt this should ever happen.");
 }
 // This means that delivery is null or we caught the exception above so we report that we have
 // nothing more to process.
 return false;
}

相关文章