APISonar


io.fabric8.maven.docker.access.log.LogCallback.log

> io > fabric8 > maven > docker > access > log > LogCallback > log
io APIs fabric8 APIs maven APIs docker APIs access APIs log APIs LogCallback APIs log APIs

Example 1
private LogCallback callback;

    public void shouldKeepStreamOpen() throws IOException, DoneException {
        DefaultLogCallback callback2 = new DefaultLogCallback(spec);
        callback2.open();
        callback.log(1, ts, "line 1");
        callback2.log(1, ts, "line 2");
        callback.log(1, ts, "line 3");
        callback.close();
        callback2.log(1, ts, "line 4");
        callback2.close();

        List<String> lines = Arrays.asList(FileUtils.fileReadArray(file));
        assertThat(lines,
                contains("callback-test> line 1", "callback-test> line 2", "callback-test> line 3", "callback-test> line 4"));
    }