Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4344

Improve Logging layer implementation to avoid additional boilerplate with if (LOG.isDebugEnable)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Implemented
    • 2.3.16.3
    • 2.5
    • "New" API

    Description

      Instead using

      if (LOG.isDebugEnable()) {
           LOG.debug("Action name is [#0]', actionName);
      }
      

      can be reduced to

      LOG.debug("Action name is [#0]', actionName);
      

      with implementation in JdkLogger and any other implementation of Logger interface:

      public void debug(String message, String... params) {
          if(isDebugEnable()) {
               // perform logging
          }
      }
      

      Attachments

        Activity

          People

            lukaszlenart Lukasz Lenart
            lukaszlenart Lukasz Lenart
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: