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

Log4j 2 syslogAppender prints localhost.localdomain instead of actual hostname

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Duplicate
    • None
    • None
    • Appenders, Log4j 1.2 bridge
    • None
    • Using log4j 2 bridge API: snapshot version of 2.17.3 log4j-1.2-api-2.17.3.jar 

    Description

      We are trying to use syslogAppender for our logging but in the logs its prints localhost.localdomain instead of actual hostname

      <13>Mar 14 22:33:41 localhost.localdomain Main[6133] +05:30 2022 572 1 com.test.common.logging.Test |  FINE#com.test.common.logging.Level - Can print FINE
      <13>Mar 14 22:33:41 localhost.localdomain Main[6133] +05:30 2022 572 1 com.test.common.logging.Test |  INFO#com.test.common.logging.Level - Can print Info

       

      Here we are using snapshot version of log4j 2.17.3

      This issue was not seen when using log4j 2.17.1

       

      Additional info:

      JDK 1.8

      -Dlog4j1.compatibility=true

      Attachments

        Issue Links

          Activity

            People

              pkarwasz Piotr Karwasz
              ragini Ragini Gawande
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: