cloud.localstack.docker.command.LogCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of localstack-utils Show documentation
Show all versions of localstack-utils Show documentation
Java utilities for the LocalStack platform.
The newest version!
package cloud.localstack.docker.command;
import java.util.ArrayList;
import java.util.List;
public class LogCommand extends Command {
private final String containerId;
public LogCommand(String containerId) {
this.containerId = containerId;
}
public String execute() {
List args = new ArrayList<>();
args.add("logs");
args.addAll(options);
args.add(containerId);
return dockerExe.execute(args);
}
public LogCommand withNumberOfLines(Integer numberOfLines){
this.addOptions("--tail", numberOfLines.toString());
return this;
}
}