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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  1. @Override
  2. public void startElement(String name, UIComponent component) throws IOException {
  3. if ("title".equals(name)) {
  4. logger.warn(
  5. "Title removed because multiple <title> elements are invalid and the portlet container controls the <title>.");
  6. titleElement = true;
  7. }
  8. else {
  9. Element element = createElement(name);
  10. ElementWriter elementWriter = new ElementWriter(element);
  11. elementWriterStack.push(elementWriter);
  12. logger.trace("PUSHED element name=[{0}]", name);
  13. }
  14. }

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

  1. public boolean isDebugEnabled() {
  2. return logger.isDebugEnabled();
  3. }

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

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

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

  1. public boolean isTraceEnabled() {
  2. return logger.isTraceEnabled();
  3. }

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

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

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

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

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

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

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

  1. @Override
  2. public void startElement(String name, UIComponent component) throws IOException {
  3. if ("title".equals(name)) {
  4. logger.warn(
  5. "Title removed because multiple <title> elements are invalid and the portlet container controls the <title>.");
  6. titleElement = true;
  7. }
  8. else {
  9. Element element = createElement(name);
  10. ElementWriter elementWriter = new ElementWriter(element);
  11. elementWriterStack.push(elementWriter);
  12. logger.trace("PUSHED element name=[{0}]", name);
  13. }
  14. }

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

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

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

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

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

  1. public void beforePhase(PhaseEvent phaseEvent) {
  2. if (logger.isDebugEnabled()) {
  3. PhaseId phaseId = phaseEvent.getPhaseId();
  4. String viewId = null;
  5. UIViewRoot uiViewRoot = phaseEvent.getFacesContext().getViewRoot();
  6. if (uiViewRoot != null) {
  7. viewId = uiViewRoot.getViewId();
  8. }
  9. logger.debug("BEFORE phaseId=[{0}] viewId=[{1}]", phaseId.toString(), viewId);
  10. }
  11. }

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

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

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

相关文章