File tree Expand file tree Collapse file tree
src/main/java/com/github/dockerjava Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33import java .io .IOException ;
44import java .util .Set ;
5+ import java .util .logging .Logger ;
56
67import javax .ws .rs .client .ClientRequestContext ;
78import javax .ws .rs .core .HttpHeaders ;
@@ -25,7 +26,11 @@ public class SelectiveLoggingFilter extends LoggingFilter {
2526 .add ("application/tar" )
2627 .build ();
2728
28- @ Override
29+ public SelectiveLoggingFilter (Logger logger , boolean b ) {
30+ super (logger , b );
31+ }
32+
33+ @ Override
2934 public void filter (ClientRequestContext context ) throws IOException {
3035 // Unless the content type is in the list of those we want to ellide, then just have
3136 // our super-class handle things.
Original file line number Diff line number Diff line change 11package com .github .dockerjava .jaxrs ;
22
33import java .io .IOException ;
4+ import java .util .logging .Logger ;
45
56import javax .ws .rs .client .Client ;
67import javax .ws .rs .client .ClientBuilder ;
@@ -52,6 +53,9 @@ public class DockerCmdExecFactoryImpl implements DockerCmdExecFactory {
5253
5354 private WebTarget baseResource ;
5455
56+ private static final Logger LOGGER = Logger .getLogger (DockerCmdExecFactoryImpl .class .getName ());
57+
58+
5559 @ Override
5660 public void init (DockerClientConfig dockerClientConfig ) {
5761 Preconditions .checkNotNull (dockerClientConfig , "config was not specified" );
@@ -62,9 +66,11 @@ public void init(DockerClientConfig dockerClientConfig) {
6266 clientConfig .register (JacksonJsonProvider .class );
6367
6468 if (dockerClientConfig .isLoggingFilterEnabled ()) {
65- clientConfig .register (SelectiveLoggingFilter . class );
69+ clientConfig .register (new SelectiveLoggingFilter ( LOGGER , true ) );
6670 }
6771
72+ //clientConfig.register(new LoggingFilter(LOGGER, true));
73+
6874 if (dockerClientConfig .getReadTimeout () != null ) {
6975 int readTimeout = dockerClientConfig .getReadTimeout ();
7076 clientConfig .property (ClientProperties .READ_TIMEOUT , readTimeout );
You can’t perform that action at this time.
0 commit comments