本文整理了Java中io.druid.java.util.common.logger.Logger.error()
方法的一些代码示例,展示了Logger.error()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.error()
方法的具体详情如下:
包路径:io.druid.java.util.common.logger.Logger
类名称:Logger
方法名:error
[英]Protect against assuming slf4j convention. use error(Throwable t, String message, Object... formatArgs)
instead
[中]防止采用slf4j公约。使用“error(Throwable t,String message,Object…formatArgs)`代替
代码示例来源:origin: io.druid.extensions/druid-examples
@Override
public void onException(Exception ex)
{
log.error(ex, "Got exception");
}
代码示例来源:origin: io.druid.extensions/druid-basic-security
@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: io.druid/druid-server
@Override
public void onFailure(Exception e)
{
log.error(e, "Unable to connect to irc server [%s]", host);
throw new RuntimeException("Unable to connect to server", e);
}
}
代码示例来源:origin: io.druid/druid-server
public static void sendJsonError(HttpServletResponse resp, int error, String errorJson, OutputStream outputStream)
{
resp.setStatus(error);
resp.setContentType("application/json");
resp.setCharacterEncoding("UTF-8");
try {
outputStream.write(errorJson.getBytes(StandardCharsets.UTF_8));
}
catch (IOException ioe) {
log.error("WTF? Can't get writer from HTTP response.");
}
}
}
代码示例来源:origin: io.druid/druid-server
public void stop()
{
try {
cache.close();
cacheExecutor.shutdownNow();
}
catch (Exception ex) {
log.error(ex, "Failed to stop node watcher for type [%s].", nodeType);
}
}
}
代码示例来源:origin: io.druid/druid-server
@Override
public MemcachedClientIF get()
{
try {
return new MemcachedClient(connectionFactory, hosts);
}
catch (IOException e) {
log.error(e, "Unable to create memcached client");
throw Throwables.propagate(e);
}
}
}
代码示例来源:origin: io.druid/java-util
@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: io.druid/java-util
@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: io.druid.extensions/druid-s3-extensions
private void deleteWithRetriesSilent(final String s3Bucket, final String s3Path)
{
try {
deleteWithRetries(s3Bucket, s3Path);
}
catch (Exception e) {
log.error(e, "Failed to delete file [s3://%s/%s], giving up", s3Bucket, s3Path);
}
}
代码示例来源:origin: io.druid/druid-server
@Override
public void run()
{
try {
CacheUtil.populate(cache, mapper, key, Futures.allAsList(cacheFutures).get());
}
catch (Exception e) {
log.error(e, "Error while getting future for cache task");
throw Throwables.propagate(e);
}
}
},
代码示例来源:origin: io.druid.extensions/druid-kafka-extraction-namespace
@Override
public void onFailure(Throwable t)
{
if (t instanceof CancellationException) {
LOG.debug("Topic [%s] cancelled", topic);
} else {
LOG.error(t, "Error in listening to [%s]", topic);
}
}
},
代码示例来源:origin: io.druid/druid-server
@GET
@Produces({MediaType.APPLICATION_JSON, SmileMediaTypes.APPLICATION_JACKSON_SMILE})
public Response getAll()
{
try {
return handler.handleGETAll();
}
catch (Exception e) {
LOG.error(e, "Exception in handling GETAll request");
return Response.serverError().entity(ServletResourceUtils.sanitizeException(e)).build();
}
}
代码示例来源:origin: io.druid/druid-indexing-service
@Override
public void run()
{
try {
taskLogKiller.killOlderThan(System.currentTimeMillis() - config.getDurationToRetain());
}
catch (Exception ex) {
log.error(ex, "Failed to clean-up the task logs");
}
}
}
代码示例来源:origin: io.druid/java-util
private void limitFailedBuffersSize()
{
if (failedBuffers.size() >= config.getBatchQueueSizeLimit()) {
failedBuffers.removeFirst();
approximateFailedBuffersCount.decrementAndGet();
droppedBuffers.incrementAndGet();
log.error(
"failedBuffers queue size reached the limit [%d], dropping the oldest failed buffer",
config.getBatchQueueSizeLimit()
);
}
}
代码示例来源:origin: io.druid/druid-server
@Override
public <T> QueryRunner<T> getQueryRunner(DruidServer server)
{
synchronized (lock) {
QueryableDruidServer queryableDruidServer = clients.get(server.getName());
if (queryableDruidServer == null) {
log.error("WTF?! No QueryableDruidServer found for %s", server.getName());
return null;
}
return queryableDruidServer.getClient();
}
}
代码示例来源:origin: io.druid/java-util
private SwapStats()
{
try {
Swap swap = sigar.getSwap();
this.prevPageIn = swap.getPageIn();
this.prevPageOut = swap.getPageOut();
}
catch (SigarException e) {
log.error(e, "Failed to get Swap");
}
}
代码示例来源:origin: io.druid/druid-indexing-service
@Override
public TaskStatus run(TaskToolbox toolbox) throws Exception
{
log.info("Subs are good! Italian BMT and Meatball are probably my favorite.");
try {
convertSegment(toolbox);
}
catch (Exception e) {
log.error(e, "Conversion failed.");
throw e;
}
return success();
}
代码示例来源:origin: io.druid/druid-server
@Provides
@Processing
@ManageLifecycle
public ExecutorService getProcessingExecutorService(DruidProcessingConfig config)
{
if (config.getNumThreadsConfigured() != ExecutorServiceConfig.DEFAULT_NUM_THREADS) {
log.error("numThreads[%d] configured, that is ignored on Router", config.getNumThreadsConfigured());
}
return Execs.dummy();
}
代码示例来源:origin: io.druid/druid-server
@Provides
@BackgroundCaching
@LazySingleton
public ExecutorService getBackgroundExecutorService(CacheConfig cacheConfig)
{
if (cacheConfig.getNumBackgroundThreads() > 0) {
log.error(
"numBackgroundThreads[%d] configured, that is ignored on Router",
cacheConfig.getNumBackgroundThreads()
);
}
return Execs.dummy();
}
代码示例来源:origin: io.druid/druid-server
@Provides
@LazySingleton
@Merging
public BlockingPool<ByteBuffer> getMergeBufferPool(DruidProcessingConfig config)
{
if (config.getNumMergeBuffersConfigured() != DruidProcessingConfig.DEFAULT_NUM_MERGE_BUFFERS) {
log.error(
"numMergeBuffers[%d] configured, that is ignored on Router",
config.getNumMergeBuffersConfigured()
);
}
return DummyBlockingPool.instance();
}
}
内容来源于网络,如有侵权,请联系作者删除!