io.vertx.core.logging.Logger.fatal()方法的使用及代码示例

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

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

Logger.fatal介绍

暂无

代码示例

代码示例来源:origin: io.vertx/vertx-lang-scala

public void fatal(String message) {
  log.fatal(message);
}

代码示例来源:origin: io.vertx/vertx-lang-scala

public void fatal(String message, Throwable t) {
  log.fatal(message, t);
}

代码示例来源:origin: io.vertx/vertx-lang-scala_2.12

public void fatal(String message) {
  log.fatal(message);
}

代码示例来源:origin: io.vertx/vertx-lang-scala_2.12

public void fatal(String message, Throwable t) {
  log.fatal(message, t);
}

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

private String encode(String value) {
 try {
  return URLEncoder.encode(value, "UTF-8").replace("+", "%20").replace("%2F", "/");
 } catch (UnsupportedEncodingException ex) {
  LOGGER.fatal("Unexpected Exception - Unsupported encoding UTF-8", ex);
  throw new UnsupportedCharsetException("UTF-8");
 }
}

代码示例来源:origin: io.knotx/knotx-databridge-adapter-http

private static String encodeValue(String value) {
  try {
   return URLEncoder.encode(value, "UTF-8").replace("+", "%20").replace("%2F", "/");
  } catch (UnsupportedEncodingException ex) {
   LOGGER.fatal("Unexpected Exception - Unsupported encoding UTF-8", ex);
   throw new UnsupportedCharsetException("UTF-8");
  }
 }
}

代码示例来源:origin: Cognifide/knotx

private String encode(String value) {
 try {
  return URLEncoder.encode(value, "UTF-8").replace("+", "%20").replace("%2F", "/");
 } catch (UnsupportedEncodingException ex) {
  LOGGER.fatal("Unexpected Exception - Unsupported encoding UTF-8", ex);
  throw new UnsupportedCharsetException("UTF-8");
 }
}

代码示例来源:origin: io.vertx/vertx-infinispan

@Override
public void fatal(String msg) {
 logger.fatal(msg);
}

代码示例来源:origin: Cognifide/knotx

private static String encodeValue(String value) {
  try {
   return URLEncoder.encode(value, "UTF-8").replace("+", "%20").replace("%2F", "/");
  } catch (UnsupportedEncodingException ex) {
   LOGGER.fatal("Unexpected Exception - Unsupported encoding UTF-8", ex);
   throw new UnsupportedCharsetException("UTF-8");
  }
 }
}

代码示例来源:origin: io.vertx/vertx-infinispan

@Override
public void fatal(String msg, Throwable throwable) {
 logger.fatal(msg, throwable);
}

代码示例来源:origin: pmlopes/yoke

protected void logMessage(int status, String message)
{
  if (status >= 500) {
    logger.fatal(message);
  } else if (status >= 400) {
    logger.error(message);
  } else if (status >= 300) {
    logger.warn(message);
  } else {
    logger.info(message);
  }
}

代码示例来源:origin: folio-org/okapi

private void startModmanager(Future<Void> fut) {
 moduleManager.init(vertx, res -> {
  if (res.succeeded()) {
   startTenants(fut);
  } else {
   logger.fatal("ModuleManager init: " + res.cause().getMessage());
   fut.fail(res.cause());
  }
 });
}

代码示例来源:origin: folio-org/okapi

private void startTenants(Future<Void> fut) {
 tenantManager.init(vertx, res -> {
  if (res.succeeded()) {
   checkInternalModules(fut);
  } else {
   logger.fatal("load tenants failed: " + res.cause().getMessage());
   fut.fail(res.cause());
  }
 });
}

代码示例来源:origin: folio-org/okapi

public void queryWithParams(String sql, JsonArray jsa,
 Handler<ExtendedAsyncResult<ResultSet>> fut) {
 getCon(gres -> {
  if (gres.failed()) {
   fut.handle(new Failure<>(gres.getType(), gres.cause()));
  } else {
   logger.debug("queryWithParams sql: " + sql);
   conn.queryWithParams(sql, jsa, qres -> {
    if (qres.failed()) {
     logger.fatal("queryWithParams failed: "
      + qres.cause() + " sql: " + sql);
     close();
     fut.handle(new Failure<>(INTERNAL, qres.cause()));
    } else {
     fut.handle(new Success<>(qres.result()));
    }
   });
  }
 });
}

代码示例来源:origin: folio-org/okapi

public void query(String sql,
 Handler<ExtendedAsyncResult<ResultSet>> fut) {
 getCon(gres -> {
  if (gres.failed()) {
   fut.handle(new Failure<>(gres.getType(), gres.cause()));
  } else {
   logger.debug("query sql: " + sql);
   conn.query(sql, qres -> {
    if (qres.failed()) {
     logger.fatal("query failed: "
      + qres.cause() + " sql: " + sql);
     close();
     fut.handle(new Failure<>(INTERNAL, qres.cause()));
    } else {
     fut.handle(new Success<>(qres.result()));
    }
   });
  }
 });
}

代码示例来源:origin: apiman/apiman

@Override
public void start(Future<Void> start) {
  super.start(start);
  base = new DeploymentOptions().setConfig(config());
  @SuppressWarnings({ "rawtypes" }) // CompositeFuture doesn't accept generic type
  List<Future> deployList = new ArrayList<>();
  deploy(ApiVerticle.class.getCanonicalName(), ApiVerticle.VERTICLE_TYPE, deployList);
  deploy(HttpGatewayVerticle.class.getCanonicalName(), HttpGatewayVerticle.VERTICLE_TYPE, deployList);
  deploy(HttpsGatewayVerticle.class.getCanonicalName(), HttpsGatewayVerticle.VERTICLE_TYPE, deployList);
  CompositeFuture.all(deployList).setHandler(compositeResult -> {
    if (compositeResult.failed()) {
      compositeResult.cause().printStackTrace();
      log.fatal("Failed to deploy verticles: " + compositeResult.cause().getMessage());
      start.fail(compositeResult.cause());
    } else {
      log.info("Apiman Version: {0}", ApimanVersionCommand.getApimanVersion());
      if (log.isDebugEnabled()) log.debug("Git commit info: {0}", Version.get().getVerbose());
      log.info("Vert.x Version: {0}", VersionCommand.getVersion());
      log.info("Successfully deployed all verticles");
      log.info("Gateway API port: {0}", apimanConfig.getPort(ApiVerticle.VERTICLE_TYPE));
      start.complete();
    }
  });
}

代码示例来源:origin: folio-org/okapi

public void init(boolean reset, Handler<ExtendedAsyncResult<Void>> fut) {
 PostgresQuery q = pg.getQuery();
 if (!reset) {
  create(reset, q, fut);
 } else {
  String dropSql = "DROP TABLE IF EXISTS " + table;
  q.query(dropSql, (ExtendedAsyncResult<ResultSet> res) -> {
   if (res.failed()) {
    logger.fatal(dropSql + ": " + res.cause().getMessage());
    fut.handle(new Failure<>(res.getType(), res.cause()));
   } else {
    create(reset, q, fut);
   }
  });
 }
}

代码示例来源:origin: folio-org/okapi

@Override
public void start(Future<Void> fut) {
 logger.debug("starting");
 if (storage != null) {
  storage.prepareDatabases(initMode, res -> {
   if (res.failed()) {
    logger.fatal("start failed", res.cause());
    fut.fail(res.cause());
   } else {
    if (initMode != NORMAL) {
     logger.info("Database operation " + initMode.toString() + " done. Exiting");
     System.exit(0);
    }
    startModmanager(fut);
   }
  });
 } else {
  startModmanager(fut);
 }
}

代码示例来源:origin: io.knotx/knotx-databridge-core

private Single<JsonObject> fetchServiceData(DataSourceEntry service, KnotContext request) {
 LOGGER.debug("Fetching data from service {} {}", service.getAddress(), service.getParams());
 try {
  return request.getCache()
    .get(service.getCacheKey(), () -> {
     LOGGER.debug("Requesting data from adapter {} with params {}", service.getAddress(),
       service.getParams());
     return serviceEngine.doServiceCall(service, request).cache();
    });
 } catch (ExecutionException e) {
  LOGGER.fatal("Unable to get service data {}", e);
  return Single.error(e);
 }
}

代码示例来源:origin: Cognifide/knotx

private Single<JsonObject> fetchServiceData(ServiceEntry service, KnotContext request) {
 LOGGER.debug("Fetching data from service {} {}", service.getAddress(), service.getParams());
 try {
  return request.getCache()
    .get(service.getCacheKey(), () -> {
     LOGGER.debug("Requesting data from adapter {} with params {}", service.getAddress(),
       service.getParams());
     return serviceEngine.doServiceCall(service, request).cache();
    });
 } catch (ExecutionException e) {
  LOGGER.fatal("Unable to get service data {}", e);
  return Single.error(e);
 }
}

相关文章