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

前端 未结 1 823
攒了一身酷
攒了一身酷 2021-01-16 04:10

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

The solution with Sun\'s JavaServer Faces implementa

相关标签:
1条回答
  • 2021-01-16 04:49

    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 讨论(0)
提交回复
热议问题