在JSF 1.2中,如何更改RenderResponsePhase的日志记录级别?

在JSF 1.2中,如何更改RenderResponsePhase的日志记录级别?

问题描述:

我在系统中收到以下消息:" FacesMessage已入队.... ".

I am getting the following messsage in System out: "FacesMessage(s) have been enqueued....".

Sun的JavaServer Faces实现(1.2_07-b03-FCS)的解决方案是将其添加到web.xml:

The solution with Sun's JavaServer Faces implementation (1.2_07-b03-FCS) was to add this to web.xml:

<context-param>
    <description>
    Set to true to disable the following warning message:
    FacesMessage(s) have been enqueued, but may not have been displayed
    </description>
    <param-name>com.ibm.ws.jsf.disableEnqueuedMessagesWarning</param-name>
    <param-value>true</param-value>
</context-param>

但是由于某种原因,该解决方案不适用于我正在使用的这种实施方式 Mojarra(1.2_15-b01-FCS).

But for some reason that solution does not work with this Implemenation that I am using Mojarra (1.2_15-b01-FCS).

该文档说,我只需要简单地更改RenderResponsePhase的记录器即可.
面孔消息已被编码...

This document says I need to simply change the logger of RenderResponsePhase.
Faces Message(s) habe been encoded...

本质上,我想我想问的是我需要为RenderResponsePhase配置的logger类.

Essentially, I think I am asking is what is the logger class I need to configure for the RenderResponsePhase.

该上下文参数特定于作为WebSphere一部分的IBM Faces Client Framework.但是您似乎根本没有使用它.没有必要添加该上下文参数.完全将其删除.

That context parameter is specific to IBM's Faces Client Framework which is part of WebSphere. But you seem to be not using it at all. There's no point of adding that context parameter. Remove it altogether.

Mojarra使用 java.util.logging 作为记录器的API. JSF生命周期记录器(RenderResponsePhase正在使用)的记录​​器名称为:

Mojarra uses java.util.logging API as loggers. The logger name of the JSF lifecycle logger (which the RenderResponsePhase is using) is:

javax.enterprise.resource.webcontainer.jsf.lifecycle

可以通过JRE/lib/logging.properties文件配置记录器.您首先需要确定您的服务器环境正在使用什么JRE(注意:JDK也有JRE!),然后相应地编辑其JRE/lib/logging.properties文件以添加以下行:

The loggers are configureable by JRE/lib/logging.properties file. You first need to determine what JRE your server environment is using (note: the JDK has also a JRE!) and then edit its JRE/lib/logging.properties file accordingly to add the following line:

javax.enterprise.resource.webcontainer.jsf.lifecycle.level = WARNING

这将可登录级别设置为警告". "FacesMessage已被排队"消息是一条"INFO"消息.您需要重新启动服务器(和IDE,如果有的话!),更改才能生效.

This sets the loggable level one up to "WARNING". The "FacesMessage(s) have been enqueued" message is an namely an "INFO". You need to restart the server (and the IDE, if any!) for the change to take effect.

但是我想知道禁用它有多么有用.您试图隐藏的问题"的根本原因可能最好以不同的方式解决.