Volodymyr Siedlecki created MYFACES-4561:
--------------------------------------------

             Summary: Update Web Context Parameter Logging
                 Key: MYFACES-4561
                 URL: https://issues.apache.org/jira/browse/MYFACES-4561
             Project: MyFaces Core
          Issue Type: Improvement
    Affects Versions: 4.0.0-RC4
            Reporter: Volodymyr Siedlecki


On application start up, the logs are full of these messages for each context 
parameter that's not set:

 
{noformat}
[2/10/23, 10:25:41:565 EST] 0000003d 
org.apache.myfaces.webapp.WebConfigParamsLogger              I No context init 
parameter 'jakarta.faces.CLIENT_WINDOW_MODE' found, using default value 
'none'.{noformat}

[https://github.com/apache/myfaces/blob/93a47f3c78716f0ff3c01227ee1cd5972aeb965b/impl/src/main/resources/META-INF/WebConfigParamsLogger.vm#L64]

I see a few proposals

1)  These may make more sense as trace (i.e fine ) statements, but then 
LOG_WEB_CONTEXT_PARAMS seems unnecessary.  This parameter is what allows for 
the logging in 
[WebConfigParamsLogger#logWebContextParams|https://github.com/apache/myfaces/blob/93a47f3c78716f0ff3c01227ee1cd5972aeb965b/impl/src/main/resources/META-INF/WebConfigParamsLogger.vm#L41-L44].
  It would be removed.   

2) We could just change the default of `LOG_WEB_CONTEXT_PARAMS`, but then there 
wouldn't be any logging.  When collecting traces, it just be an extra step to 
collect to set LOG_WEB_CONTEXT_PARAMS back to true. To avoid this, we can add 
logging for only the parameters that are set.  An else block would be added 
here: 
https://github.com/apache/myfaces/blob/93a47f3c78716f0ff3c01227ee1cd5972aeb965b/impl/src/main/resources/META-INF/WebConfigParamsLogger.vm#L84-L90


3) No Change. Leave things as they are. 

Thoughts?

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to