In logback-classic in version later than 1.1.9, an enhancement was implemented according to issue
LOGBACK-1170 that in web-applications it automatically install a listener. and during this installation it initialize a logger context while the logback.configurationFile property is not set yet. Since logger context is single tone we can not reinitialize it again. There should be some way to set this property before initialization.