Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-968

SyslogLayout contains extra space

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2
    • 2.3
    • Layouts

    Description

      There is a extra space in the SyslogLayout so that that message is not compliant with the BSD format:

          /**
           * Date format used if header = true.
           */
          private final SimpleDateFormat dateFormat = new SimpleDateFormat("MMM dd HH:mm:ss ", Locale.ENGLISH);
      

      Note the extra space at the end of the date format.

      When this is used, another space is appended afterwards all the same:

              addDate(event.getTimeMillis(), buf);
              buf.append(' ');
      

      This leads to incorrect data containing two spaces between the date field and the localHostname.

      Attachments

        Activity

          People

            Unassigned Unassigned
            pdjohe Paul D Johe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified