Exigent users that have the need to integrate not already supported logging framework, can easily do it by following the listed steps:
<dependency> <groupId>org.apache.onami.logging</groupId> <artifactId>org.apache.onami.logging.core</artifactId> <version>3.4.1-SNAPSHOT</version> <scope>compile</scope> </dependency>
import java.lang.reflect.Field; import com.acme.MyLogger; import com.acme.MyLoggerFactory; import org.apache.onami.logging.core.AbstractLoggerInjector; public final class AcmeLoggerInjector extends AbstractLoggerInjector<MyLogger> { public AcmeLoggerInjector( Field field ) { super( field ); } @Override protected MyLogger createLogger( Class<?> klass ) { return MyLoggerFactory.getLog( klass ); } }
import com.acme.MyLogger; import org.apache.onami.logging.core.AbstractLoggingModule; import com.google.inject.TypeLiteral; import com.google.inject.matcher.Matcher; public final class AcmeLoggingModule extends AbstractLoggingModule<MyLogger> { public ACLLoggingModule( Matcher<? super TypeLiteral<?>> matcher ) { super(matcher, AcmeLoggerInjector.class); } }