Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter Logs by status code #521

Closed
LimaIsaias opened this issue May 30, 2019 · 1 comment
Closed

Filter Logs by status code #521

LimaIsaias opened this issue May 30, 2019 · 1 comment

Comments

@LimaIsaias
Copy link
Contributor

Forgive me for writing my English, I'm using google translate.
I would like to be able to filter and just print the logs where the response status is 4XX or 5XX, is it possible? and if so, how can I implement it?

@whiskeysierra
Copy link
Collaborator

Programmatic

Logbook.builder()
    .strategy(new StatusAtLeastStrategy(400))
    .build();

Spring Boot Auto Configuration

logbook:
  strategy: status-at-least
  minimum-status: 400

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants