com.liferay.faces.util.logging.Logger类的使用及代码示例

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

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

Logger介绍

暂无

代码示例

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

@Override
public ResponseWriter cloneWithWriter(Writer writer) {
  logger.debug(
    "Returning null from cloneWithWriter({0}) since BufferedScriptResponseWriter only supports writing scripts.",
    writer);
  return null;
}

代码示例来源: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/com.liferay.faces.util

public ScriptImpl(String sourceCode, String[] modules, ModulesType modulesType) {
  this.sourceCode = sourceCode;
  if ((modules != null) && (modulesType == null)) {
    logger.warn("Modules will be ignored on scripts with modulesType == null.");
  }
  this.modules = modules;
  this.modulesType = modulesType;
}

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

@Override
public PrintWriter getWriter() throws IOException {
  PrintWriter writer = wrappedServletResponse.getWriter();
  if (logger.isTraceEnabled()) {
    logger.trace("getWriter() called by method=[{0}]", Thread.currentThread().getStackTrace()[3].toString());
    logger.trace("getWriter() returnValue=[{0}]", writer);
  }
  return writer;
}

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

public void afterPhase(PhaseEvent phaseEvent) {
  // This method just does some logging. It's useful to the developer to determine if a navigation-rule
  // fired, causing new JSF view to be restored after the INVOKE_APPLICATION phase finished.
  if (logger.isDebugEnabled() && (phaseEvent.getPhaseId() == PhaseId.INVOKE_APPLICATION)) {
    FacesContext facesContext = phaseEvent.getFacesContext();
    String viewId = facesContext.getViewRoot().getViewId();
    logger.debug("After INVOKE_APPLICATION: viewId=[{0}]", viewId);
  }
}

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

/**
 * This method provides the ability to discover the Mojarra InjectionProvider at startup.
 */
public void contextInitialized(ServletContextEvent servletContextEvent) {
  ServletContext servletContext = servletContextEvent.getServletContext();
  if (servletContext.getAttribute(BridgeSessionListener.class.getName()) == null) {
    logger.info("Context initialized for contextPath=[{0}]", servletContext.getContextPath());
    // Prevent multiple-instantiation of this listener.
    servletContext.setAttribute(BridgeSessionListener.class.getName(), Boolean.TRUE);
    firstInstance = true;
  }
  else {
    logger.debug("Preventing multiple instantiation for contextPath=[{0}]", servletContext.getContextPath());
  }
}

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

protected void doFacesHeaders(RenderRequest renderRequest, RenderResponse renderResponse) {
  logger.trace(
    "doFacesHeaders(RenderRequest, RenderResponse) this=[{0}], renderRequest=[{1}], renderResponse=[{2}]", this,
    renderRequest, renderResponse);
}

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

@Override
public void startElement(String name, UIComponent component) throws IOException {
  if ("title".equals(name)) {
    logger.warn(
      "Title removed because multiple <title> elements are invalid and the portlet container controls the <title>.");
    titleElement = true;
  }
  else {
    Element element = createElement(name);
    ElementWriter elementWriter = new ElementWriter(element);
    elementWriterStack.push(elementWriter);
    logger.trace("PUSHED element name=[{0}]", name);
  }
}

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

public boolean isDebugEnabled() {
  return logger.isDebugEnabled();
}

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

public void info(Throwable t) {
  logger.info(t.getMessage());
}

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

public boolean isTraceEnabled() {
  return logger.isTraceEnabled();
}

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

public void afterPhase(PhaseEvent phaseEvent) {
  // This method just does some logging. It's useful to the developer to determine if a navigation-rule
  // fired, causing new JSF view to be restored after the INVOKE_APPLICATION phase finished.
  if (logger.isDebugEnabled() && (phaseEvent.getPhaseId() == PhaseId.INVOKE_APPLICATION)) {
    FacesContext facesContext = phaseEvent.getFacesContext();
    String viewId = facesContext.getViewRoot().getViewId();
    logger.debug("After INVOKE_APPLICATION: viewId=[{0}]", viewId);
  }
}

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

/**
 * This method provides the ability to discover the Mojarra InjectionProvider at startup.
 */
public void contextInitialized(ServletContextEvent servletContextEvent) {
  ServletContext servletContext = servletContextEvent.getServletContext();
  if (servletContext.getAttribute(BridgeSessionListener.class.getName()) == null) {
    logger.info("Context initialized for contextPath=[{0}]", servletContext.getContextPath());
    // Prevent multiple-instantiation of this listener.
    servletContext.setAttribute(BridgeSessionListener.class.getName(), Boolean.TRUE);
    firstInstance = true;
  }
  else {
    logger.debug("Preventing multiple instantiation for contextPath=[{0}]", servletContext.getContextPath());
  }
}

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

protected void doFacesHeaders(RenderRequest renderRequest, RenderResponse renderResponse) {
  logger.trace(
    "doFacesHeaders(RenderRequest, RenderResponse) this=[{0}], renderRequest=[{1}], renderResponse=[{2}]", this,
    renderRequest, renderResponse);
}

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

@Override
public void startElement(String name, UIComponent component) throws IOException {
  if ("title".equals(name)) {
    logger.warn(
      "Title removed because multiple <title> elements are invalid and the portlet container controls the <title>.");
    titleElement = true;
  }
  else {
    Element element = createElement(name);
    ElementWriter elementWriter = new ElementWriter(element);
    elementWriterStack.push(elementWriter);
    logger.trace("PUSHED element name=[{0}]", name);
  }
}

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

@Override
public PrintWriter getWriter() throws IOException {
  PrintWriter writer = wrappedServletResponse.getWriter();
  if (logger.isTraceEnabled()) {
    logger.trace("getWriter() called by method=[{0}]", Thread.currentThread().getStackTrace()[3].toString());
    logger.trace("getWriter() returnValue=[{0}]", writer);
  }
  return writer;
}

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

public void info(Object msg, Throwable t) {
  logger.info(msg.toString(), t);
}

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

public void beforePhase(PhaseEvent phaseEvent) {
  if (logger.isDebugEnabled()) {
    PhaseId phaseId = phaseEvent.getPhaseId();
    String viewId = null;
    UIViewRoot uiViewRoot = phaseEvent.getFacesContext().getViewRoot();
    if (uiViewRoot != null) {
      viewId = uiViewRoot.getViewId();
    }
    logger.debug("BEFORE phaseId=[{0}] viewId=[{1}]", phaseId.toString(), viewId);
  }
}

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

/**
 * 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/com.liferay.faces.util

@Override
public String getCharacterEncoding() {
  logger.debug(
    "Returning null from getCharacterEncoding() since BufferedScriptResponseWriter only supports writing scripts.");
  return null;
}

相关文章