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

groovy-based configuration tries to resolve the hostname eagerly, failing in environments with no hostname

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 1.2.3
    • logback-classic
    • Aws Lambda

    Description

      When configuring logback via a logback.groovy, the first thing that the GafferConfigurator does is call binding.setProperty("hostname", ContextUtil.localHostName);.

      In a serverless environment, such as AWS Lambda, this fails with a UnknownHostException. As I understand it Lambdas don't have hostnames as they can't be addressed from the internet.

      We should either wrap this line in a try/catch or move the hostname resolution to where it is used.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            kmorozov Kirill Morozov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: