com.liferay.faces.util.logging.Logger.error()方法的使用及代码示例

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

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

Logger.error介绍

暂无

代码示例

代码示例来源:origin: com.liferay.faces/com.liferay.faces.util

  1. /**
  2. * Returns the implementation singleton instance.
  3. */
  4. public static ExtFacesContext getInstance() {
  5. if (instance == null) {
  6. logger.error("Instance not initialized -- caller might be static");
  7. }
  8. return instance;
  9. }

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

  1. @Override
  2. public String getRequestPath() {
  3. logger.error(ERROR_MSG, failedResourceHandler, resourceName, libraryName, contentType);
  4. return RES_NOT_FOUND;
  5. }

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

  1. @Override
  2. public URL getURL() {
  3. logger.error(ERROR_MSG, failedResourceHandler, resourceName, libraryName, contentType);
  4. return null;
  5. }

代码示例来源:origin: com.liferay.faces/liferay-faces-util

  1. /**
  2. * Returns the implementation singleton instance.
  3. */
  4. public static ExtFacesContext getInstance() {
  5. if (instance == null) {
  6. logger.error("Instance not initialized -- caller might be static");
  7. }
  8. return instance;
  9. }

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

  1. @Override
  2. public InputStream getInputStream() throws IOException {
  3. logger.error(ERROR_MSG, failedResourceHandler, resourceName, libraryName, contentType);
  4. return new ByteArrayInputStream(new byte[] {});
  5. }

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

  1. @Override
  2. public Map<String, String> getResponseHeaders() {
  3. logger.error(ERROR_MSG, failedResourceHandler, resourceName, libraryName, contentType);
  4. return new HashMap<String, String>();
  5. }

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

  1. protected Object getRequestContextCurrentInstance() {
  2. Object requestContext = null;
  3. try {
  4. requestContext = GET_CURRENT_INSTANCE_METHOD.invoke(null);
  5. }
  6. catch (Exception e) {
  7. logger.error(e);
  8. }
  9. return requestContext;
  10. }
  11. }

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

  1. public static void flushScriptData(PageContext pageContext) {
  2. try {
  3. if (FLUSH_SCRIPT_DATA_METHOD != null) {
  4. FLUSH_SCRIPT_DATA_METHOD.invoke(null, new Object[] { pageContext });
  5. }
  6. }
  7. catch (Exception e) {
  8. logger.error(e);
  9. }
  10. }
  11. }

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

  1. public void restoreState(FacesContext facesContext, Object state) {
  2. if (wrappedRenderer == null) {
  3. try {
  4. String wrappedRendererClassName = (String) state;
  5. Class<?> wrappedRendererClass = Class.forName(wrappedRendererClassName);
  6. wrappedRenderer = (Renderer) wrappedRendererClass.newInstance();
  7. }
  8. catch (Exception e) {
  9. logger.error(e);
  10. }
  11. }
  12. }

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

  1. @Override
  2. public void close() throws IOException {
  3. super.close();
  4. try {
  5. File file = new File(absolutePath);
  6. file.delete();
  7. }
  8. catch (Exception e) {
  9. logger.error(e);
  10. }
  11. }

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

  1. public String getMode() {
  2. String mode = MODE_SIMPLE;
  3. Class<?> clazz = wrappedUIInput.getClass();
  4. try {
  5. Method method = clazz.getMethod(METHOD_GET_MODE, (Class[]) null);
  6. mode = (String) method.invoke(wrappedUIInput, (Object[]) null);
  7. }
  8. catch (Exception e) {
  9. logger.error(e);
  10. }
  11. return mode;
  12. }

代码示例来源:origin: com.liferay.faces/com.liferay.faces.bridge.ext

  1. public PortletURL createRenderURL() {
  2. PortletURL renderURL = null;
  3. try {
  4. Method method = wrappedPortletResponse.getClass().getMethod(METHOD_NAME_CREATE_RENDER_URL, (Class[]) null);
  5. renderURL = (PortletURL) method.invoke(wrappedPortletResponse, (Object[]) null);
  6. }
  7. catch (Exception e) {
  8. logger.error(e.getMessage(), e);
  9. }
  10. return renderURL;
  11. }
  12. }

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

  1. public PortletURL createRenderURL() {
  2. PortletURL renderURL = null;
  3. try {
  4. Method method = wrappedPortletResponse.getClass().getMethod(METHOD_NAME_CREATE_RENDER_URL, (Class[]) null);
  5. renderURL = (PortletURL) method.invoke(wrappedPortletResponse, (Object[]) null);
  6. }
  7. catch (Exception e) {
  8. logger.error(e.getMessage(), e);
  9. }
  10. return renderURL;
  11. }
  12. }

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

  1. @Override
  2. public void setRequest(Object request) {
  3. this.portletRequest = (PortletRequest) request;
  4. try {
  5. boolean requestChanged = true;
  6. boolean responseChanged = false;
  7. preInitializeObjects(requestChanged, responseChanged);
  8. }
  9. catch (Exception e) {
  10. logger.error(e);
  11. }
  12. }

代码示例来源:origin: com.liferay.faces/liferay-faces-portal

  1. protected boolean isMale(User user) {
  2. boolean male = true;
  3. try {
  4. male = user.isMale();
  5. }
  6. catch (Exception e) {
  7. logger.error(e.getMessage(), e);
  8. }
  9. return male;
  10. }
  11. }

代码示例来源:origin: com.liferay.faces/com.liferay.faces.alloy

  1. protected String getSessionId(ExternalContext externalContext) {
  2. String sessionId = null;
  3. try {
  4. Object session = externalContext.getSession(true);
  5. Method getIdMethod = session.getClass().getMethod("getId", new Class[] {});
  6. sessionId = (String) getIdMethod.invoke(session, new Object[] {});
  7. }
  8. catch (Exception e) {
  9. logger.error(e);
  10. }
  11. return sessionId;
  12. }

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

  1. @Override
  2. public String toString() {
  3. String stringValue = null;
  4. try {
  5. stringValue = super.toString();
  6. stringValue = portletResponse.encodeURL(stringValue);
  7. }
  8. catch (Exception e) {
  9. logger.error(e);
  10. }
  11. return stringValue;
  12. }

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

  1. protected void setSecureParameter(String secure, BaseURL baseURL) {
  2. if (secure != null) {
  3. try {
  4. baseURL.setSecure(BooleanHelper.toBoolean(secure));
  5. }
  6. catch (PortletSecurityException e) {
  7. logger.error(e);
  8. }
  9. }
  10. }

代码示例来源:origin: com.liferay.faces/com.liferay.faces.alloy

  1. private void handleInvalidFile(FacesContext facesContext, String clientId, UploadedFile uploadedFile,
  2. String errorMessage) {
  3. facesContext.addMessage(clientId, new FacesMessage(FacesMessage.SEVERITY_ERROR, errorMessage, errorMessage));
  4. setValid(false);
  5. try {
  6. uploadedFile.delete();
  7. }
  8. catch (IOException e) {
  9. logger.error(e);
  10. }
  11. }
  12. }

代码示例来源:origin: com.liferay.faces/liferay-faces-alloy

  1. private final void handleInvalidFile(FacesContext facesContext, String clientId, UploadedFile uploadedFile,
  2. String errorMessage) {
  3. facesContext.addMessage(clientId, new FacesMessage(FacesMessage.SEVERITY_ERROR, errorMessage, errorMessage));
  4. setValid(false);
  5. try {
  6. uploadedFile.delete();
  7. }
  8. catch (IOException e) {
  9. logger.error(e);
  10. }
  11. }
  12. }

相关文章