Indeed, as always the constructor is the first thing to run when constructing an object.
I did write a library that allows for constructor injection of slf4j loggers: https://tavianator.com/announcing-sangria/ On Friday, 11 March 2016 14:24:57 UTC-5, Roded Bahat wrote: > > You're right, the self injection truly makes no sense. > However, I'm left with the implication that the logger cannot be used in > constructor code. > > On Tuesday, March 8, 2016 at 11:15:58 PM UTC+2, Tavian Barnes wrote: >> >> > injecting the singleton instance into itself >> >> Why are you doing this? The logger will be injected before the singleton >> is injected into any *other* object. Just use 'this' instead of >> self-injecting. >> > -- You received this message because you are subscribed to the Google Groups "google-guice" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-guice. To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/1173ac32-602f-4a73-bca5-fc4aeb083e95%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
