You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating System (Ubuntu 15.10 / MacOS 10.10 / Windows 10)
Ubuntu 14.04 (Production Environment)
Linux W540 4.4.6-1-MANJARO #1 SMP PREEMPT Sat Mar 19 06:00:37 CET 2016 x86_64 GNU/Linux (Development Environment)
JDK (Oracle 1.8.0_72, OpenJDK 1.8.x, Azul Zing)
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
Trying to use a custom logging framework as described in Play documentation
When following the documentation and adding a custom LoggerConfigurator via logger-configurator.properties, the configured LoggerConfigurator should be called.
Actual Behavior
The custom LoggerConfigurator gets never called, because the ClassLoader cannot find any logger-configurator.properties in the classpath.
I'm closing this since it works if the properties file gets placed in the conf folder. Since the documentation just talks about the classpath as the proper location for the properties file, this is fine. Still wondering why the location used by @wsargent won't work though.
@el-dom I don't know why it didn't work for you, but I've moved logger-configurator.properties and added this bug so that if it happens for anyone else it should be added here.
Play Version (2.5.x / etc)
2.5.1
API (Scala / Java / Neither / Both)
Scala 2.11.8
Operating System (Ubuntu 15.10 / MacOS 10.10 / Windows 10)
Ubuntu 14.04 (Production Environment)
Linux W540 4.4.6-1-MANJARO #1 SMP PREEMPT Sat Mar 19 06:00:37 CET 2016 x86_64 GNU/Linux (Development Environment)
JDK (Oracle 1.8.0_72, OpenJDK 1.8.x, Azul Zing)
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
Library Dependencies
Expected Behavior
Trying to use a custom logging framework as described in Play documentation
When following the documentation and adding a custom LoggerConfigurator via
logger-configurator.properties
, the configured LoggerConfigurator should be called.Actual Behavior
The custom LoggerConfigurator gets never called, because the ClassLoader cannot find any
logger-configurator.properties
in the classpath.Reproducible Test Case
Clone @wsargent 's example project from https://github.com/wsargent/play-2.5-log4j2, set a debugging breakpoint at https://github.com/playframework/playframework/blob/58a150d/framework/src/play/src/main/scala/play/api/LoggerConfigurator.scala#L61 and start the project.
classLoader.getResourceAsStream("logger-configurator.properties")
returns null and thusfindFromResources
returns None.Note: Will Sargent's example project uses play 2.5.0, but after unsuccessfully trying 2.5.0 we bumped it to 2.5.1 without noticing any difference. It appears to be exactly what the documentation describes, but we just cannot make it work.
The text was updated successfully, but these errors were encountered: