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

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

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

Logger.error介绍

暂无

代码示例

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

protected void error(Throwable t, String format, Object ... args) {
  logger.error(t, format, args);
}

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

protected void error(String format, Object ... args) {
  logger.error(format, args);
}

代码示例来源:origin: org.actframework/act-morphia

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

代码示例来源:origin: org.actframework/act-morphia

@Override
public void error(String msg, Throwable t) {
  logger.error(t, msg);
}

代码示例来源:origin: org.actframework/act-morphia

@Override
public void error(String format, Object... arg) {
  logger.error(format, arg);
}

代码示例来源:origin: org.actframework/act

protected void error(String format, Object ... args) {
  logger.error(format, args);
}

代码示例来源:origin: org.actframework/act

protected void error(Throwable t, String format, Object ... args) {
  logger.error(t, format, args);
}

代码示例来源:origin: org.osgl/osgl-cache

@Override
  protected byte[] serialize(Object object) {
    try {
      ByteArrayOutputStream bos = new ByteArrayOutputStream();
      new ObjectOutputStream(bos).writeObject(object);
      return bos.toByteArray();
    } catch (IOException e) {
      logger.error(e, "Could not serialize");
    }
    return null;
  }
};

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

private Date parse(String value) {
  DateFormat dateFormat = dateFormat();
  try {
    return dateFormat.parse(value);
  } catch (ParseException e) {
    if (null == dateFormat2) {
      logger.error("error parsing date value from: %s", value);
      return null;
    }
    try {
      return dateFormat2.parse(value);
    } catch (ParseException e2) {
      logger.error("error parsing date value from: %s", value);
      return null;
    }
  }
}

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

public static synchronized void trigger(ActEvent<?> event) {
  List<ActEventListener> list = listeners.get(event.getClass());
  if (null != list) {
    for (ActEventListener l : list) {
      try {
        l.on(event);
      } catch (Exception e) {
        LOGGER.error(e, "error calling act event listener %s on event %s", l.id(), event);
      }
    }
  }
}

代码示例来源:origin: org.actframework/act

public static synchronized void trigger(ActEvent<?> event) {
  List<ActEventListener> list = listeners.get(event.getClass());
  if (null != list) {
    for (ActEventListener l : list) {
      try {
        l.on(event);
      } catch (Exception e) {
        LOGGER.error(e, "error calling act event listener %s on event %s", l.id(), event);
      }
    }
  }
}

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

public String encrypt(String message) {
  try {
    return Crypto.encryptAES(message, secret);
  } catch (UnexpectedException e) {
    Throwable cause = e.getCause();
    if (cause instanceof InvalidKeyException) {
      LOGGER.error("Cannot encrypt/decrypt! Please download Java Crypto Extension pack from Oracle: http://www.oracle.com/technetwork/java/javase/tech/index-jsp-136007.html");
    }
    throw e;
  }
}

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

private void processDelayedJob(final Job job, boolean runImmediatelyIfEventDispatched) {
  if (runImmediatelyIfEventDispatched) {
    try {
      job.run();
    } catch (Exception e) {
      Act.LOGGER.error(e, "Error running job");
    }
  } else {
    now(job);
  }
}

代码示例来源:origin: org.actframework/act

public String decrypt(String message) {
  try {
    return Crypto.decryptAES(message, secret);
  } catch (UnexpectedException e) {
    Throwable cause = e.getCause();
    if (cause instanceof InvalidKeyException) {
      LOGGER.error("Cannot encrypt/decrypt! Please download Java Crypto Extension pack from Oracle: http://www.oracle.com/technetwork/java/javase/tech/index-jsp-136007.html");
    }
    throw e;
  }
}

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

public String decrypt(String message) {
  try {
    return Crypto.decryptAES(message, secret);
  } catch (UnexpectedException e) {
    Throwable cause = e.getCause();
    if (cause instanceof InvalidKeyException) {
      LOGGER.error("Cannot encrypt/decrypt! Please download Java Crypto Extension pack from Oracle: http://www.oracle.com/technetwork/java/javase/tech/index-jsp-136007.html");
    }
    throw e;
  }
}

代码示例来源:origin: org.actframework/act

private void processDelayedJob(final Job job, boolean runImmediatelyIfEventDispatched) {
  if (runImmediatelyIfEventDispatched) {
    try {
      job.run();
    } catch (Exception e) {
      Act.LOGGER.error(e, "Error running job");
    }
  } else {
    now(job);
  }
}

代码示例来源:origin: org.actframework/act

public String encrypt(String message) {
  try {
    return Crypto.encryptAES(message, secret);
  } catch (UnexpectedException e) {
    Throwable cause = e.getCause();
    if (cause instanceof InvalidKeyException) {
      LOGGER.error("Cannot encrypt/decrypt! Please download Java Crypto Extension pack from Oracle: http://www.oracle.com/technetwork/java/javase/tech/index-jsp-136007.html");
    }
    throw e;
  }
}

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

public boolean send() {
  try {
    MimeMessage message = createMessage();
    if (!mailerConfig().mock()) {
      if (logger.isDebugEnabled()) {
        logger.debug("Sending email\n%sEnd email\n", debug(message));
      }
      Transport.send(message);
    } else {
      logger.info("Sending email\n%sEnd email\n", debug(message));
    }
    return true;
  } catch (Exception e) {
    logger.error(e, "Error sending email: %s", this);
    return false;
  }
}

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

@Override
public void handle(ActionContext context) {
  H.Method method = context.req().method();
  Result result = configured(context.config()).handle(method);
  try {
    result = RequestHandlerProxy.GLOBAL_AFTER_INTERCEPTOR.apply(result, context);
  } catch (Exception e) {
    logger.error(e, "Error calling global after interceptor");
    result = ActErrorResult.of(e);
  }
  result.apply(context.req(), context.prepareRespForResultEvaluation());
}

代码示例来源:origin: org.actframework/act

@Override
public void handle(ActionContext context) {
  H.Method method = context.req().method();
  Result result = configured(context.config()).handle(method);
  try {
    result = RequestHandlerProxy.GLOBAL_AFTER_INTERCEPTOR.apply(result, context);
  } catch (Exception e) {
    logger.error(e, "Error calling global after interceptor");
    result = ActErrorResult.of(e);
  }
  result.apply(context.req(), context.prepareRespForResultEvaluation());
}

相关文章