I tried Google Guice the first time and find it very nice.
But, when I reached the part of Built-in Bindings I do not understand the examples.
For me it looks like I can use it for logging like an interceptor, but I don’t know how.
Could someone of you explain this type of Binding and how I can use it? And maybe (if it’s possible) use it for logging?
What the documentation indicates is that the
bind(Logger.class).to(...)call has already been made for you. Thus, you don’t need to call the bind method. Instead, you can inject it directly as if you had already called bind:Alternatively, you can get it from the injector:
If you need to override the logger, then you’ll have to use this method.