Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-27434

LiferayLoggerAdapter - wrong formatting of Object[] arguments

    Details

      Description

      Methods in LiferayLoggerAdapter having Object[] as the arguments parameter (eg. public void debug(String format, Object[] arguments)) use wrong formatting - MessageFormatter.format() is called instead of MessageFormatter.arrayFormat(). Calling format() treats the Object array as a single object, which leads to putting the whole array in the first placeholder and leaving all the other blank.

      LiferayLoggerAdapter.debug("1: {}, 2: {}", new Object[]

      {"ONE", "TWO"}

      )
      -> output is: 1: [ONE, TWO], 2: {}
      -> should be: 1: ONE, 2: TWO

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              michael.saechang Michael Saechang
              Reporter:
              hattifnat Adam Michalik
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                9 years, 5 weeks, 1 day ago

                  Packages

                  Version Package
                  6.1.1 CE GA2
                  6.1.20 EE GA2
                  --Sprint 11/12
                  6.2.0 CE M2