Java

Logback is unable to recognize variable substitution For scanPeriod property

Sometime in November 2011, on discovering a bug with Logback and subsequently filing a JIRA with Ceki.

http://jira.qos.ch/browse/LOGBACK-396

In June 2012, Ceki advised that this will be fixed in 1.0.7. (Current production version as of today is 1.0.6)

http://github.com/qos-ch/logback/commit/ab197e7ac8a7

Original JIRA ticket:

It seems like Logback is unable to recognize variable substitution for certain properties.

For example the scanPeriod property:

Logback configuration:

<configuration scan="${scan:-true}" scanPeriod="${scan-interval:-10 minutes}">

Specified to take default value of 10 minutes of logback property is not defined.

Logback properties:

scan=true
scan-interval=30 seconds

This property should override the default configuration of 10 minutes.

Logback error:
java.lang.IllegalArgumentException: String value [${scan-interval:-10 minutes}] is not in the expected format.

According to the Duration API, the duration format is correct.

EDIT: Update - 3 October 2012

As i only had time to check today, it appears that Logback 1.0.7 is already out. Cheers. :) Thanks, Ceki.


Share
  • Newsflash

    March 2012: We have change our site theme to F2.
  • Who's Online

    2 visitors online now
    2 guests, 0 members
    Powered by Visitor Maps