本文整理了Java中com.holonplatform.core.internal.Logger.error()
方法的一些代码示例,展示了Logger.error()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.error()
方法的具体详情如下:
包路径:com.holonplatform.core.internal.Logger
类名称:Logger
方法名:error
[英]Log a Level#ERROR type message.
[中]记录级别#错误类型消息。
代码示例来源:origin: com.holon-platform.vaadin/holon-vaadin
@Override
public Result<PropertyBox> convertToModel(T value, ValueContext context) {
try {
return Result.ok(itemConverter.convert(value));
} catch (Exception e) {
LOGGER.error("Conversion to model failed", e);
return Result.error(e.getMessage());
}
}
代码示例来源:origin: com.holon-platform.jaxrs/holon-jaxrs-swagger-core
/**
* Get the API response.
* @param application JAX-RS Application reference
* @param headers JAX-RS Headers reference
* @param uriInfo JAX-RS URI info reference
* @param outputType API definition output type
* @return The API response
*/
protected Response getApi(Application application, HttpHeaders headers, UriInfo uriInfo, OutputType outputType) {
// API context id
final String contextId = getContextIdOrDefault();
try {
// get the API definition
final ApiDefinition<M> api = getApi(contextId, application, headers, uriInfo);
// check not null
if (api.getApi() == null) {
return Response.status(Status.NOT_FOUND)
.entity("No API definition available for context id [" + contextId + "]").build();
}
// serialize the API definition
return Response.status(Response.Status.OK).type(outputType.getMediaType())
.entity(getApiOutput(outputType, api.getApi(), api.isPretty())).build();
} catch (Exception e) {
LOGGER.error("Failed to provide the API definition for context id [" + contextId + "]", e);
return Response.status(Status.INTERNAL_SERVER_ERROR)
.entity("Failed to provide the API definition for context id [" + contextId + "] - Error: ["
+ ExceptionUtils.getRootCauseMessage(e) + "]")
.build();
}
}
代码示例来源:origin: com.holon-platform.mongo/holon-datastore-mongo-async
LOGGER.error("Failed to finalize the transaction", e);
return null;
}).thenApply(r -> {
代码示例来源:origin: com.holon-platform.vaadin/holon-vaadin-flow
windowSizeReceiver);
} catch (Exception e) {
LOGGER.error("Failed to execute window size detection JS [" + e.getMessage() + "]");
内容来源于网络,如有侵权,请联系作者删除!