开发者

In JSF 1.2 how do I changing Logging level of RenderResponsePhase?

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

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>

But for some reason that solution does not work with this Imp开发者_开发百科lemenation that I am using Mojarra (1.2_15-b01-FCS).

This document says I need to simply change the logger of RenderResponsePhase.

Faces Message(s) habe been encoded...

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


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 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

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

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.

I however wonder how useful it is to disable that. The root cause of the "problem" which you're trying to hide might better have been solved differently.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜