{"repo":"t1/logging-interceptor","free":true,"listed":false,"github":"https://github.com/t1/logging-interceptor","clone":"git clone https://github.com/t1/logging-interceptor.git","description":"CDI interceptor for logging to slf4j","language":"Java","stars":29,"topics":["logging-interceptors","logging","logginginterceptor","interceptor","cdi","java","slf4j","cdi-interceptor","mdc"],"license":"Apache-2.0","category":"analytics","readme_excerpt":"CDI logging-interceptor CDI interceptor for logging to slf4j. Logging is the standard example for writing interceptors. Yet, I didn't find a good one, so I wrote my own (and it was a lot of fun :) There are two main use-cases for logging interceptors: Log calls to existing methods: instead of repeating the method name and arguments within the method, simply annotate it. Often called tracing (see example). Note that interceptors are not triggered when you do local calls, so you may need to resort to the other, more classical logging use-case: Instead of using the generic logging api, you can define a pojo that does nothing but log (with the same annotation as above). Makes mocking your unit tests very easy, in case you want to make sure about what logs are written. ( see example) News ## Version 3.x ### We use semantic versioning. tl;dr: versions consist of three parts with a semantic: The Bad ( major = breaking changes), the Good (minor = new features), and the Ugly (micro/patch = bugfixes). So going to 3.0.0 was Bad, as it may break existing applications. But sometimes Bad things are necessary. Here we need it to get to Java 8 and replace esp. Joda-Date (BTW: big kudos to Stephen for that project and for making it obsolete by moving it to Java 8). Version 4.x ### Go to Jakarta 9+ package names, i.e. import javax.inject.Inject; - import jakarta.inject.Inject; . Examples ## Basic Trace ### would log calls to all methods in CustomersResource at INFO level, e.g.: Classic Logger ","default_branch":null,"files":null,"tree":[],"storefront":"/r/t1","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/t1/logging-interceptor/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}