aahmed-se commented on a change in pull request #2139: Use container name in 
logs
URL: https://github.com/apache/incubator-pulsar/pull/2139#discussion_r201932128
 
 

 ##########
 File path: 
tests/integration-tests-utils/src/main/java/org/apache/pulsar/tests/DockerUtils.java
 ##########
 @@ -61,11 +62,13 @@ private static File getTargetDirectory(String containerId) 
{
         return directory;
     }
 
-    public static void dumpContainerLogToTarget(DockerClient docker, String 
containerId) {
-        File output = new File(getTargetDirectory(containerId), "docker.log");
+    public static void dumpContainerLogToTarget(DockerClient dockerClient, 
String containerId) {
+        InspectContainerResponse inspectContainerResponse = 
dockerClient.inspectContainerCmd(containerId).exec();
+        final String containerName = 
inspectContainerResponse.getName().replace("/","");
 
 Review comment:
   we remove the unnecessary forward slash in InspectContainerResponse to be 
more consistent with docker ps output.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to