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

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

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

Logger.error介绍

暂无

代码示例

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

  1. @Override
  2. public void reportException(Logger logger, Throwable t) {
  3. if (logger != null) {
  4. logger.error("Exception in HK2VerticleFactory", t);
  5. }
  6. }

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

  1. public void handle(Exception e) {
  2. log.error("Unable to connect to repository");
  3. latch.countDown();
  4. }
  5. });

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

  1. public void handle() {
  2. try {
  3. method.invoke(obj, (Object[])null);
  4. } catch (Exception e) {
  5. log.error("Failed to invoke test", e);
  6. }
  7. }
  8. });

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

  1. void handleException(Exception e) {
  2. if (exceptionHandler != null) {
  3. checkContext();
  4. exceptionHandler.handle(e);
  5. } else {
  6. log.error("Unhandled exception", e);
  7. }
  8. }

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

  1. private void callFailoverCompleteHandler(FailoverCompleteHandler handler, String nodeID, JsonObject haInfo, boolean result) {
  2. if (handler != null) {
  3. try {
  4. handler.handle(nodeID, haInfo, result);
  5. } catch (Throwable t) {
  6. log.error("Failure in calling failure complete handler", t);
  7. }
  8. }
  9. }

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

  1. void handleException(Exception e) {
  2. if (exceptionHandler != null) {
  3. exceptionHandler.handle(e);
  4. } else {
  5. log.error("Unhandled exception", e);
  6. }
  7. }
  8. };

代码示例来源:origin: net.kuujo/vertigo-utils

  1. /**
  2. * Fails the task.
  3. */
  4. public void fail(Throwable t) {
  5. log.error(t);
  6. runner.complete(this);
  7. }

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

  1. protected String escapeForJavaScript(String str) {
  2. try {
  3. str = StringEscapeUtils.escapeJavaScript(str);
  4. } catch (Exception e) {
  5. log.error("Failed to escape", e);
  6. str = null;
  7. }
  8. return str;
  9. }

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

  1. void handleException(Exception e) {
  2. if (exceptionHandler != null) {
  3. exceptionHandler.handle(e);
  4. } else {
  5. log.error("Unhandled exception", e);
  6. }
  7. }

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

  1. public void reportException(Throwable t) {
  2. if (deploymentContext != null) {
  3. deploymentContext.reportException(t);
  4. } else {
  5. t.printStackTrace();
  6. log.error("context Unhandled exception", t);
  7. }
  8. }

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

  1. public void handle(AsyncResult<Void> res) {
  2. if (res.failed()) {
  3. log.error("Failed to undeploy", res.cause());
  4. failed.set(true);
  5. }
  6. latch.countDown();
  7. }
  8. });

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

  1. private void deleteTmpDeployments() {
  2. String tmp;
  3. while ((tmp = tempDeployments.poll()) != null) {
  4. try {
  5. vertx.fileSystem().deleteSync(tmp, true);
  6. } catch (Throwable t) {
  7. log.error("Failed to delete temp deployment", t);
  8. }
  9. }
  10. }

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

  1. public void run() {
  2. vertx.setContext(null);
  3. try {
  4. runnable.run();
  5. } catch (Throwable t) {
  6. log.error("Failed to run task", t);
  7. } finally {
  8. vertx.setContext(null);
  9. }
  10. }
  11. });

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

  1. public void handle(AsyncResult<String> fr) {
  2. if (fr.succeeded()) {
  3. String deploymentName = fr.result();
  4. startedApps.add(deploymentName);
  5. res.set(deploymentName);
  6. } else {
  7. log.error("Failed to start module", fr.cause());
  8. }
  9. doneLatch.countDown();
  10. }
  11. };

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

  1. public void handle(AsyncResult<String> fr) {
  2. if (fr.succeeded()) {
  3. String deploymentName = fr.result();
  4. startedApps.add(deploymentName);
  5. res.set(deploymentName);
  6. } else {
  7. log.error("Failed to deploy app", fr.cause());
  8. }
  9. doneLatch.countDown();
  10. }
  11. };

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

  1. @Override
  2. public void handle(AsyncResult<String> ar) {
  3. if (ar.failed()) {
  4. log.error("Failed to deploy", ar.cause());
  5. }
  6. }
  7. };

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

  1. private void checkHADeployments() {
  2. try {
  3. if (attainedQuorum) {
  4. deployHADeployments();
  5. } else {
  6. undeployHADeployments();
  7. }
  8. } catch (Throwable t) {
  9. log.error("Failed when checking HA deployments", t);
  10. }
  11. }

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

  1. public void reportException(Throwable t) {
  2. Context ctx = getContext();
  3. if (ctx != null) {
  4. ctx.reportException(t);
  5. } else {
  6. log.error(" default vertx Unhandled exception ", t);
  7. }
  8. }

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

  1. protected void sendError(Message<JsonObject> message, String error, Exception e) {
  2. logger.error(error, e);
  3. JsonObject json = new JsonObject().putString("status", "error").putString("message", error);
  4. message.reply(json);
  5. }

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

  1. private void sendMessage(JsonObject msg) {
  2. EventLog.addEvent("Sending message: " + msg.encode());
  3. try {
  4. vertx.eventBus().publish(TestBase.EVENTS_ADDRESS, msg);
  5. } catch (Exception e) {
  6. log.error("Failed to send message", e);
  7. }
  8. }

相关文章