Package org.jclouds.logging.config
Class BindLoggersAnnotatedWithResource
- java.lang.Object
-
- org.jclouds.logging.config.BindLoggersAnnotatedWithResource
-
- All Implemented Interfaces:
com.google.inject.spi.TypeListener
public class BindLoggersAnnotatedWithResource extends Object implements com.google.inject.spi.TypeListener
TypeListener that will bindLogger
to members annotated withResource
This class is a TypeListener so that it can create a logger whose category is the same as the name of the injected instance's class. Note that this occurs post-object construction throughBinder.bindListener(com.google.inject.matcher.Matcher<? super com.google.inject.TypeLiteral<?>>, com.google.inject.spi.TypeListener)
. Here's an example usage:class A {
-
-
Constructor Summary
Constructors Constructor Description BindLoggersAnnotatedWithResource(Logger.LoggerFactory loggerFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <I> void
hear(com.google.inject.TypeLiteral<I> injectableType, com.google.inject.spi.TypeEncounter<I> encounter)
-
-
-
Constructor Detail
-
BindLoggersAnnotatedWithResource
@Inject public BindLoggersAnnotatedWithResource(Logger.LoggerFactory loggerFactory)
-
-