com.holonplatform.core.internal.Logger.error()方法的使用及代码示例

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

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

Logger.error介绍

[英]Log a Level#ERROR type message.
[中]记录级别#错误类型消息。

代码示例

代码示例来源:origin: com.holon-platform.vaadin/holon-vaadin

  1. @Override
  2. public Result<PropertyBox> convertToModel(T value, ValueContext context) {
  3. try {
  4. return Result.ok(itemConverter.convert(value));
  5. } catch (Exception e) {
  6. LOGGER.error("Conversion to model failed", e);
  7. return Result.error(e.getMessage());
  8. }
  9. }

代码示例来源:origin: com.holon-platform.jaxrs/holon-jaxrs-swagger-core

  1. /**
  2. * Get the API response.
  3. * @param application JAX-RS Application reference
  4. * @param headers JAX-RS Headers reference
  5. * @param uriInfo JAX-RS URI info reference
  6. * @param outputType API definition output type
  7. * @return The API response
  8. */
  9. protected Response getApi(Application application, HttpHeaders headers, UriInfo uriInfo, OutputType outputType) {
  10. // API context id
  11. final String contextId = getContextIdOrDefault();
  12. try {
  13. // get the API definition
  14. final ApiDefinition<M> api = getApi(contextId, application, headers, uriInfo);
  15. // check not null
  16. if (api.getApi() == null) {
  17. return Response.status(Status.NOT_FOUND)
  18. .entity("No API definition available for context id [" + contextId + "]").build();
  19. }
  20. // serialize the API definition
  21. return Response.status(Response.Status.OK).type(outputType.getMediaType())
  22. .entity(getApiOutput(outputType, api.getApi(), api.isPretty())).build();
  23. } catch (Exception e) {
  24. LOGGER.error("Failed to provide the API definition for context id [" + contextId + "]", e);
  25. return Response.status(Status.INTERNAL_SERVER_ERROR)
  26. .entity("Failed to provide the API definition for context id [" + contextId + "] - Error: ["
  27. + ExceptionUtils.getRootCauseMessage(e) + "]")
  28. .build();
  29. }
  30. }

代码示例来源:origin: com.holon-platform.mongo/holon-datastore-mongo-async

  1. LOGGER.error("Failed to finalize the transaction", e);
  2. return null;
  3. }).thenApply(r -> {

代码示例来源:origin: com.holon-platform.vaadin/holon-vaadin-flow

  1. windowSizeReceiver);
  2. } catch (Exception e) {
  3. LOGGER.error("Failed to execute window size detection JS [" + e.getMessage() + "]");

相关文章