In our projects we use SL4J for logging.
from sl4j.org:
"The Simple Logging Facade for Java or (SLF4J) serves as a simple facade or abstraction for various logging frameworks, e.g. java.util.logging, log4j and logback, allowing the end user to plug in the desired logging framework at deployment time."
A couple of months ago a team mate created a SL4J adapter for Liferay's logging service. We replaced the sl4j adapter for log4j that Liferay ships with (sl4j-log4j12.jar) with the new adapter and now copy the adapter to our plugins at deploy time by defining the adapter as a dependency in portal.dependency.jars in liferay-plugin-package.properties.
We can now control log levels in the control panel and so on for the plugins that use SL4J.
The code is available at https://github.com/bjorn-ryding/slf4j-liferay-adapter
Could it be interesting to ship Liferay with this adapter? VGR who financed the development is willing to donate the code.
Cheers,
Björn
Por favor, faça login para denunciar.