Skip to content

Commit

Permalink
Reduce logs in EnvironmentAndSystemPropertyClientProviderStrate… (#1913)
Browse files Browse the repository at this point in the history
Fixes #1912
  • Loading branch information
rnorth committed Sep 26, 2019
1 parent ec0ab6f commit d3ba842
Showing 1 changed file with 2 additions and 17 deletions.
@@ -1,7 +1,6 @@
package org.testcontainers.dockerclient;

import com.github.dockerjava.core.DefaultDockerClientConfig;
import com.github.dockerjava.core.DockerClientConfig;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.SystemUtils;

Expand Down Expand Up @@ -50,21 +49,7 @@ public void test() throws InvalidConfigurationException {

@Override
public String getDescription() {
return "Environment variables, system properties and defaults. Resolved: \n" + stringRepresentation(config);
}

private String stringRepresentation(DockerClientConfig config) {

if (config == null) {
return "";
}

return " dockerHost=" + config.getDockerHost() + "\n" +
" apiVersion='" + config.getApiVersion() + "'\n" +
" registryUrl='" + config.getRegistryUrl() + "'\n" +
" registryUsername='" + config.getRegistryUsername() + "'\n" +
" registryPassword='" + config.getRegistryPassword() + "'\n" +
" registryEmail='" + config.getRegistryEmail() + "'\n" +
" dockerConfig='" + config.toString() + "'\n";
return "Environment variables, system properties and defaults. Resolved dockerHost=" +
(config != null ? config.getDockerHost() : "");
}
}

0 comments on commit d3ba842

Please sign in to comment.