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

Line number of a portlet's slf4j log entry does not match actual source location

    Details

      Description

      The log messages are displayed with an incorrect line numbering when using slf4j for logging.

      Steps to reproduce:

      1) Start the portal;
      2) Deploy the attached plugin which uses slf4j for logging;
      3) Add the Slf4jdemo application (Add > Applications > Sample > Slf4jdemo) to a page of your choice;
      4) Click on the link "Click to invoke Action Phase";
      5) Observe the application logs;

      Expected result

      15:41:45,851 INFO  [http-bio-8080-exec-8][slf4jdemo:38] processAction starts. Current code line number = 38
      

      Actual result

      15:41:45,851 INFO  [http-bio-8080-exec-8][slf4jdemo:125] processAction starts. Current code line number = 38
      

        Attachments

        1. failed.png
          failed.png
          25 kB
        2. fixed.png
          fixed.png
          9 kB
        3. reproduced.png
          reproduced.png
          25 kB
        4. slf4jdemo_solved.war
          59 kB
        5. slf4jdemo.war
          56 kB

          Activity

            People

            Assignee:
            hong.zhao Hong Zhao (Inactive)
            Reporter:
            filipe.afonso Filipe Afonso
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              7 years, 11 weeks, 1 day ago

                Packages

                Version Package
                7.0.0 M5