Yan Jiang
2017-10-18 11:56:41 UTC
Hi, all.
I am thinking to add some pre&post actions for SLF4J, logger.info() and
logger.error().
Is it possible to do this with Guice method interceptor?
Currently, I am doing something like:
Matcher<Class> subClassMatcher = Matchers.subclassesOf(org.slf4j.Logger.
class);
bindInterceptor(packageMatcher, Matchers.any(), new intercepters.Logger());
Backend, we are using SLF4J and LogBack.
But it doesn't work.
I am thinking to add some pre&post actions for SLF4J, logger.info() and
logger.error().
Is it possible to do this with Guice method interceptor?
Currently, I am doing something like:
Matcher<Class> subClassMatcher = Matchers.subclassesOf(org.slf4j.Logger.
class);
bindInterceptor(packageMatcher, Matchers.any(), new intercepters.Logger());
Backend, we are using SLF4J and LogBack.
But it doesn't work.
--
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 google-guice+***@googlegroups.com.
To post to this group, send email to google-***@googlegroups.com.
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/c2ba51d4-9352-45bf-acc6-4c41c4b1dbd3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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 google-guice+***@googlegroups.com.
To post to this group, send email to google-***@googlegroups.com.
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/c2ba51d4-9352-45bf-acc6-4c41c4b1dbd3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.