You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hy, in first place Great project.
I am trying to use this package in and spring boot rest api and without any filters it's working fine , logging all requests and responses. But I am using the actuator package and I want to exclude this requests from logs.
I am trying to use the conditional example as described in the README
package com.***.application;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.zalando.logbook.Logbook;
import static org.zalando.logbook.Conditions.requestTo;
@SpringBootApplication(scanBasePackages = {"com.***.application"})
public class Application {
public static void main(String[] args) {
// Logbook logbook = Logbook.create(); // this works fine, filters on app.properties
Logbook logbook = Logbook.builder()
.condition(exclude(
requestTo("/actuator/**")))
.build();
SpringApplication.run(Application.class, args);
}
}
but I am getting this error:
application/Application.java:15: error: cannot find symbol
.condition(exclude(
^
symbol: method exclude(Predicate)
location: class Application
1 error
:compileJava FAILED
Please what is missing to use the exclude keyword ?
Thanks
The text was updated successfully, but these errors were encountered:
It's a static import. Just let your IDE's autocomplete feature suggest it for you. If you want to write the import by hand: import static org.zalando.logbook.Conditions.exclude.
Hy, in first place Great project.
I am trying to use this package in and spring boot rest api and without any filters it's working fine , logging all requests and responses. But I am using the actuator package and I want to exclude this requests from logs.
I am trying to use the conditional example as described in the README
but I am getting this error:
application/Application.java:15: error: cannot find symbol
.condition(exclude(
^
symbol: method exclude(Predicate)
location: class Application
1 error
:compileJava FAILED
Please what is missing to use the
exclude
keyword ?Thanks
The text was updated successfully, but these errors were encountered: