2016/02/07 - Apache Onami has been retired.

For more information, please explore the Attic.

Apache Commons Logging

Users that want to use the Apache Commons Logging package and let Guice injects automagically org.apache.commons.logging.Log instances, have to add the following dependency in the pom.xml:


then, when creating the com.google.inject.Injector, add the org.apache.onami.logging.acl.ACLLoggingModule module; please take note that users have to specify the classes com.google.inject.matcher.Matcher for whom the logging injection has to be applied:

import com.google.inject.Guice;
import com.google.inject.Injector;

import org.apache.onami.logging.acl.ACLLoggingModule;
import com.google.inject.matcher.Matchers;


Injector injector = Guice.createInjector( new ACLLoggingModule( Matchers.any() ),

and the magic happens :)