You can already do this with jdk loggers.
Dhanji.

On Fri, Jul 24, 2009 at 2:12 PM, Gili <[email protected]> wrote:

>
> Hi,
>
> Is it possible to implement Log4JMembersInjector -- as found here:
> http://code.google.com/p/google-guice/wiki/CustomInjections -- but for
> constructor injection instead? That is, I'd like Guice to be smart
> enough to inject the correct Logger instance into the constructor
> automatically. I took a look at InjectionListener but it seems to hook
> instances that have already been injected. Another approach that comes
> to mind is:
>
> @Provides
> public Logger getLogger(Class<?> outerClass);
>
> If I could somehow get Guice to pass in the correct Class... Any
> ideas?
>
> Gili
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to