Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-4561

Update Web Context Parameter Logging

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.0.0-RC4
    • 4.0.0-RC5
    • None
    • None

    Description

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

       

      [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'.

      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.  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) Just don't log the parameters in production – only in the development project stage.

      4) No Change. Leave things as they are.

      Thoughts?

       

      Attachments

        Activity

          People

            volosied Volodymyr Siedlecki
            volosied Volodymyr Siedlecki
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: