org.vertx.java.core.logging.Logger.info()方法的使用及代码示例

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

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

Logger.info介绍

暂无

代码示例

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

  1. private void deployHADeployments() {
  2. int size = toDeployOnQuorum.size();
  3. if (size != 0) {
  4. log.info("There are " + size + " HA deployments waiting on a quorum. These will now be deployed");
  5. Runnable task;
  6. while ((task = toDeployOnQuorum.poll()) != null) {
  7. try {
  8. task.run();
  9. } catch (Throwable t) {
  10. log.error("Failed to run redeployment task", t);
  11. }
  12. }
  13. }
  14. }

代码示例来源:origin: org.vert-x/vertx-platform

  1. public void uninstallMod(String moduleName) {
  2. log.info("Uninstalling module " + moduleName + " from directory " + modRoot);
  3. File modDir = new File(modRoot, moduleName);
  4. if (!modDir.exists()) {
  5. log.error("Cannot find module to uninstall");
  6. } else {
  7. try {
  8. vertx.fileSystem().deleteSync(modDir.getAbsolutePath(), true);
  9. log.info("Module " + moduleName + " successfully uninstalled");
  10. } catch (Exception e) {
  11. log.error("Failed to delete directory: " + e.getMessage());
  12. }
  13. }
  14. }

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

  1. @Test
  2. protected void runTestInLoop(String testName, int iters) throws Exception {
  3. Method meth = getClass().getMethod(testName, (Class<?>[])null);
  4. for (int i = 0; i < iters; i++) {
  5. log.info("****************************** ITER " + i);
  6. meth.invoke(this);
  7. tearDown();
  8. if (i != iters - 1) {
  9. setUp();
  10. }
  11. }
  12. }

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

  1. private void fatJar(String modName, Args args) {
  2. log.info("Attempting to make a fat jar for module " + modName);
  3. String directory = args.map.get("-d");
  4. if (directory != null && !new File(directory).exists()) {
  5. log.info("Directory does not exist: " + directory);
  6. return;
  7. }
  8. createPM().makeFatJar(modName, directory, createLoggingHandler("making fat jar", unblockHandler()));
  9. block();
  10. }

代码示例来源:origin: org.vert-x/vertx-platform

  1. public void handle(HttpClientResponse resp) {
  2. if (resp.statusCode == 200) {
  3. log.info("Downloading module...");
  4. resp.bodyHandler(new Handler<Buffer>() {
  5. public void handle(Buffer buffer) {
  6. mod.set(buffer);
  7. latch.countDown();
  8. }
  9. });
  10. } else if (resp.statusCode == 404) {
  11. log.error("Can't find module " + moduleName + " in repository");
  12. latch.countDown();
  13. } else {
  14. log.error("Failed to download module: " + resp.statusCode);
  15. latch.countDown();
  16. }
  17. }
  18. });

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

  1. @Override
  2. public void handle(HttpClientResponse event) {
  3. log.info(event.statusCode() + " - "+event.statusMessage());
  4. removeHandler(401);
  5. }
  6. });

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

  1. @Override
  2. public void handle(AsyncResult<String> result) {
  3. if (result.succeeded()) {
  4. log.info("Successfully redeployed module " + moduleName + " after failover");
  5. } else {
  6. log.error("Failed to redeploy module after failover", result.cause());
  7. err.set(result.cause());
  8. }
  9. latch.countDown();
  10. Throwable t = err.get();
  11. if (t != null) {
  12. throw new VertxException(t);
  13. }
  14. }
  15. });

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

  1. @Override
  2. public void handle(HttpClientResponse event) {
  3. log.info(event.statusCode() + " - "+event.statusMessage());
  4. removeHandler(401);
  5. }
  6. });

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

  1. @Override
  2. public void handle(AsyncResult<Void> result) {
  3. if (result.succeeded()) {
  4. final Deployment dep = entry.getValue();
  5. log.info("Successfully undeployed HA deployment " + dep.modID + " as there is no quorum");
  6. addToHADeployList(dep.modID.toString(), dep.config, dep.instances, new AsyncResultHandler<String>() {
  7. @Override
  8. public void handle(AsyncResult<String> result) {
  9. if (result.succeeded()) {
  10. log.info("Successfully redeployed module " + entry.getValue().modID + " after quorum was re-attained");
  11. } else {
  12. log.error("Failed to redeploy module " + entry.getValue().modID + " after quorum was re-attained", result.cause());
  13. }
  14. }
  15. });
  16. } else {
  17. log.error("Failed to undeploy deployment on lost quorum", result.cause());
  18. }
  19. }
  20. });

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

  1. private void pullDependencies(String modName) {
  2. log.info("Attempting to pull in dependencies for module " + modName);
  3. createPM().pullInDependencies(modName, createLoggingHandler("pulling in dependencies", unblockHandler()));
  4. block();
  5. }

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

  1. private void installModule(String modName) {
  2. log.info("Attempting to install module " + modName);
  3. createPM().installModule(modName, createLoggingHandler("installing module", unblockHandler()));
  4. block();
  5. }

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

  1. protected void startTest(String testName, boolean wait) {
  2. log.info("Starting test: " + testName);
  3. EventLog.addEvent("Starting test " + testName);
  4. tu.startTest(testName);
  5. if (wait) {
  6. EventLog.addEvent("Waiting for test to complete");
  7. waitTestComplete();
  8. EventLog.addEvent("Test is now complete");
  9. }
  10. }

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

  1. private void createModuleLink(String modName) {
  2. log.info("Attempting to create module link for module " + modName);
  3. createPM().createModuleLink(modName, createLoggingHandler("creating module link", unblockHandler()));
  4. block();
  5. }

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

  1. private void uninstallModule(String modName) {
  2. log.info("Attempting to uninstall module " + modName);
  3. createPM().uninstallModule(modName, createLoggingHandler("uninstalling module", unblockHandler()));
  4. block();
  5. }

代码示例来源:origin: net.kuujo/xync

  1. @Override
  2. public void handle(AsyncResult<String> result) {
  3. if (result.succeeded()) {
  4. // Tell the other nodes of the cluster about the verticle for HA purposes
  5. addVerticleToHA(deploymentInfo.getString("id"), result.result(), deploymentInfo.getString("main"), deploymentInfo.getObject("config"), deploymentInfo.getInteger("instances", 1), true);
  6. log.info("Successfully redeployed verticle " + deploymentInfo.getString("main") + " after failover");
  7. } else {
  8. log.error("Failed to redeploy verticle after failover", result.cause());
  9. err.set(result.cause());
  10. }
  11. latch.countDown();
  12. Throwable t = err.get();
  13. if (t != null) {
  14. throw new VertxException(t);
  15. }
  16. }
  17. });

代码示例来源:origin: net.kuujo/xync

  1. @Override
  2. public void handle(AsyncResult<String> result) {
  3. if (result.succeeded()) {
  4. // Tell the other nodes of the cluster about the module for HA purposes
  5. addModuleToHA(deploymentInfo.getString("id"), result.result(), deploymentInfo.getString("module"), deploymentInfo.getObject("config"), deploymentInfo.getInteger("instances", 1), true);
  6. log.info("Successfully redeployed module " + deploymentInfo.getString("module") + " after failover");
  7. } else {
  8. log.error("Failed to redeploy module after failover", result.cause());
  9. err.set(result.cause());
  10. }
  11. latch.countDown();
  12. Throwable t = err.get();
  13. if (t != null) {
  14. throw new VertxException(t);
  15. }
  16. }
  17. });

代码示例来源:origin: net.kuujo/xync

  1. @Override
  2. public void handle(AsyncResult<String> result) {
  3. if (result.succeeded()) {
  4. // Tell the other nodes of the cluster about the verticle for HA purposes
  5. addWorkerVerticleToHA(deploymentInfo.getString("id"), result.result(), deploymentInfo.getString("main"), deploymentInfo.getObject("config"), deploymentInfo.getInteger("instances", 1), deploymentInfo.getBoolean("multi-threaded", false), true);
  6. log.info("Successfully redeployed verticle " + deploymentInfo.getString("main") + " after failover");
  7. } else {
  8. log.error("Failed to redeploy verticle after failover", result.cause());
  9. err.set(result.cause());
  10. }
  11. latch.countDown();
  12. Throwable t = err.get();
  13. if (t != null) {
  14. throw new VertxException(t);
  15. }
  16. }
  17. });

代码示例来源:origin: com.englishtown/vertx-mod-jersey

  1. @Override
  2. public void handle(AsyncResult<HttpServer> result) {
  3. final String listenPath = (configurator.getSSL() ? "https" : "http") + "://" + host + ":" + port;
  4. if (result.succeeded()) {
  5. container.logger().info("Http server listening for " + listenPath);
  6. } else {
  7. container.logger().error("Failed to start http server listening for " + listenPath, result.cause());
  8. }
  9. if (doneHandler != null) {
  10. doneHandler.handle(result);
  11. }
  12. }
  13. });

代码示例来源:origin: net.kuujo/xync

  1. @Override
  2. public void handle(AsyncResult<Void> result) {
  3. if (result.succeeded()) {
  4. log.info("Successfully undeployed HA deployment " + deploymentInfo.getString("id") + " as there is no quorum");
  5. addModuleToHADeployList(deploymentID, deploymentInfo.getString("module"), deploymentInfo.getObject("config"),
  6. deploymentInfo.getInteger("instances"), new AsyncResultHandler<String>() {
  7. @Override
  8. public void handle(AsyncResult<String> result) {
  9. if (result.succeeded()) {
  10. log.info("Successfully redeployed module " + deploymentInfo.getString("module") + " after quorum was re-attained");
  11. } else {
  12. log.error("Failed to redeploy module " + deploymentInfo.getString("module") + " after quorum was re-attained", result.cause());
  13. }
  14. }
  15. });
  16. } else {
  17. log.error("Failed to undeploy deployment on lost quorum", result.cause());
  18. }
  19. }
  20. });

代码示例来源:origin: net.kuujo/xync

  1. @Override
  2. public void handle(AsyncResult<Void> result) {
  3. if (result.succeeded()) {
  4. log.info("Successfully undeployed HA deployment " + deploymentInfo.getString("id") + " as there is no quorum");
  5. addVerticleToHADeployList(deploymentID, deploymentInfo.getString("main"), deploymentInfo.getObject("config"),
  6. deploymentInfo.getInteger("instances"), new AsyncResultHandler<String>() {
  7. @Override
  8. public void handle(AsyncResult<String> result) {
  9. if (result.succeeded()) {
  10. log.info("Successfully redeployed verticle " + deploymentInfo.getString("main") + " after quorum was re-attained");
  11. } else {
  12. log.error("Failed to redeploy verticle " + deploymentInfo.getString("main") + " after quorum was re-attained", result.cause());
  13. }
  14. }
  15. });
  16. } else {
  17. log.error("Failed to undeploy deployment on lost quorum", result.cause());
  18. }
  19. }
  20. });

相关文章