Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-1011

SyslogAppender support for configurable hostname


    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.3.0-alpha6
    • Component/s: logback-classic
    • Labels:


      The SyslogAppender currently can only send messages using the machine hostname as the sender identifier. The appender can only use SyslogStartConverter.getLocalHostname(). This has come up in a few situations:

      • the caller can't set a different value that better describes the machine or the sender. This has come up when: the OS hostname is set from an IP or MAC address (and isn't the most useful identifier); many machines are treated as a single sender; multiple apps run on one system, and even aside from the tag, the sender identifier should be more specific.
      • variables which are usable in a pattern layout can't be used in the syslog sender identifier
      • the appender has to work around situations where the machine name isn't usable (example: http://jira.qos.ch/browse/LOGBACK-749)

      I'm opening this to get comments on (a) whether a patch would be accepted, and if so, (b) what it should do. I see two possibilities:

      • let the caller configure the hostname, like destination host and port, and pass it to the converter
      • let the caller provide the entire pattern layout, overriding everything after the syslog priority




            • Assignee:
              logback-dev Logback dev list
              troy Troy Davis
            • Votes:
              3 Vote for this issue
              3 Start watching this issue


              • Created: