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

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

本文整理了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

/**
 * Returns the implementation singleton instance.
 */
public static ExtFacesContext getInstance() {
  if (instance == null) {
    logger.error("Instance not initialized -- caller might be static");
  }
  return instance;
}

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

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

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

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

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

/**
 * Returns the implementation singleton instance.
 */
public static ExtFacesContext getInstance() {
  if (instance == null) {
    logger.error("Instance not initialized -- caller might be static");
  }
  return instance;
}

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

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

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

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

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

protected Object getRequestContextCurrentInstance() {

    Object requestContext = null;

    try {
      requestContext = GET_CURRENT_INSTANCE_METHOD.invoke(null);
    }
    catch (Exception e) {
      logger.error(e);
    }

    return requestContext;
  }
}

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

public static void flushScriptData(PageContext pageContext) {

    try {

      if (FLUSH_SCRIPT_DATA_METHOD != null) {
        FLUSH_SCRIPT_DATA_METHOD.invoke(null, new Object[] { pageContext });
      }
    }
    catch (Exception e) {
      logger.error(e);
    }
  }
}

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

public void restoreState(FacesContext facesContext, Object state) {
  if (wrappedRenderer == null) {
    try {
      String wrappedRendererClassName = (String) state;
      Class<?> wrappedRendererClass = Class.forName(wrappedRendererClassName);
      wrappedRenderer = (Renderer) wrappedRendererClass.newInstance();
    }
    catch (Exception e) {
      logger.error(e);
    }
  }
}

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

@Override
public void close() throws IOException {
  super.close();
  try {
    File file = new File(absolutePath);
    file.delete();
  }
  catch (Exception e) {
    logger.error(e);
  }
}

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

public String getMode() {
  String mode = MODE_SIMPLE;
  Class<?> clazz = wrappedUIInput.getClass();
  try {
    Method method = clazz.getMethod(METHOD_GET_MODE, (Class[]) null);
    mode = (String) method.invoke(wrappedUIInput, (Object[]) null);
  }
  catch (Exception e) {
    logger.error(e);
  }
  return mode;
}

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

public PortletURL createRenderURL() {

    PortletURL renderURL = null;

    try {
      Method method = wrappedPortletResponse.getClass().getMethod(METHOD_NAME_CREATE_RENDER_URL, (Class[]) null);

      renderURL = (PortletURL) method.invoke(wrappedPortletResponse, (Object[]) null);
    }
    catch (Exception e) {
      logger.error(e.getMessage(), e);
    }

    return renderURL;
  }
}

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

public PortletURL createRenderURL() {

    PortletURL renderURL = null;

    try {
      Method method = wrappedPortletResponse.getClass().getMethod(METHOD_NAME_CREATE_RENDER_URL, (Class[]) null);

      renderURL = (PortletURL) method.invoke(wrappedPortletResponse, (Object[]) null);
    }
    catch (Exception e) {
      logger.error(e.getMessage(), e);
    }

    return renderURL;
  }
}

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

@Override
public void setRequest(Object request) {
  this.portletRequest = (PortletRequest) request;
  try {
    boolean requestChanged = true;
    boolean responseChanged = false;
    preInitializeObjects(requestChanged, responseChanged);
  }
  catch (Exception e) {
    logger.error(e);
  }
}

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

protected boolean isMale(User user) {

    boolean male = true;

    try {
      male = user.isMale();
    }
    catch (Exception e) {
      logger.error(e.getMessage(), e);
    }

    return male;
  }
}

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

protected String getSessionId(ExternalContext externalContext) {
  String sessionId = null;
  try {
    Object session = externalContext.getSession(true);
    Method getIdMethod = session.getClass().getMethod("getId", new Class[] {});
    sessionId = (String) getIdMethod.invoke(session, new Object[] {});
  }
  catch (Exception e) {
    logger.error(e);
  }
  return sessionId;
}

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

@Override
public String toString() {
  String stringValue = null;
  try {
    stringValue = super.toString();
    stringValue = portletResponse.encodeURL(stringValue);
  }
  catch (Exception e) {
    logger.error(e);
  }
  return stringValue;
}

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

protected void setSecureParameter(String secure, BaseURL baseURL) {
  if (secure != null) {
    try {
      baseURL.setSecure(BooleanHelper.toBoolean(secure));
    }
    catch (PortletSecurityException e) {
      logger.error(e);
    }
  }
}

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

private void handleInvalidFile(FacesContext facesContext, String clientId, UploadedFile uploadedFile,
    String errorMessage) {

    facesContext.addMessage(clientId, new FacesMessage(FacesMessage.SEVERITY_ERROR, errorMessage, errorMessage));

    setValid(false);

    try {
      uploadedFile.delete();
    }
    catch (IOException e) {
      logger.error(e);
    }
  }
}

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

private final void handleInvalidFile(FacesContext facesContext, String clientId, UploadedFile uploadedFile,
    String errorMessage) {

    facesContext.addMessage(clientId, new FacesMessage(FacesMessage.SEVERITY_ERROR, errorMessage, errorMessage));

    setValid(false);

    try {
      uploadedFile.delete();
    }
    catch (IOException e) {
      logger.error(e);
    }
  }
}

相关文章