Skip to content

Instantly share code, notes, and snippets.

@CarlosPanarello
Created May 22, 2021 18:25
Show Gist options
  • Save CarlosPanarello/241d2d44414d09dd75224c4db3307e98 to your computer and use it in GitHub Desktop.
Save CarlosPanarello/241d2d44414d09dd75224c4db3307e98 to your computer and use it in GitHub Desktop.
Filter for Quarkus Vertx
package br.com.cep.log.filters;
import io.quarkus.vertx.http.runtime.filters.Filters;
import java.time.LocalDateTime;
import javax.enterprise.event.Observes;
public class LogBBFilterVertx {
public void filters(@Observes Filters filters) {
filters.register(rc -> {
rc.next();
System.out.println("FIM 1 - ############");
rc.addBodyEndHandler(i -> {
System.out.println(rc.response().bytesWritten());
});
},10);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment