In the root pom we exclude the apache commons-logging dependency coming from springframework. I assume this is because we want to use the logging facade https://www.slf4j.org/ that we import which in turn delegates to the log4j as the logging implementation that we include in the root pom. This all seems like we try to use springs approach documented here http://docs.spring.io/spring/docs/4.1.4.RELEASE/spring-framework-reference/htmlsingle/#overview-not-using-commons-logging
But if you search in the code for apache.commons.logging you find quite a bit of classes that depend on it. For example ConceptReferenceTermEditor; there are many more.
- replace all occurrences of the apache.commons.logging with slf4j
- slf4j does not support the log level FATAL, and suggests to use markers to log it the event as error instead and mark it with "FATAL" see https://www.slf4j.org/faq.html#fatal
NOTE: This does not change the behavior of the OpenmrsUtil which sets the log level since this part of the code uses the log4j API directly to set levels. From the user perspective this is not changed.
It does however mean that developers of core and modules cannot log to log level FATAL if we do not want to be coupled to log4j or any other logging implementation.
TODO: we should also eliminate the apache.commons.logging dependency that seems to slip in somewhere by another dependency. I do not know where. mvn dependency:tree doesnt show anything related to