1
0
mirror of https://github.com/amir20/dozzle.git synced 2026-01-04 03:54:58 +01:00

fix: fixes first few lines not showing up. fixes #3139 (#3142)

This commit is contained in:
Amir Raminfar
2024-07-23 21:52:46 -07:00
committed by GitHub
parent 79118368b1
commit 4aa315a471
2 changed files with 2 additions and 2 deletions

View File

@@ -323,7 +323,7 @@ func (d *httpClient) ContainerStats(ctx context.Context, id string, stats chan<-
func (d *httpClient) ContainerLogs(ctx context.Context, id string, since time.Time, stdType StdType) (io.ReadCloser, error) {
log.WithField("id", id).WithField("since", since).WithField("stdType", stdType).Debug("streaming logs for container")
sinceQuery := since.Add(time.Millisecond).Format(time.RFC3339Nano)
sinceQuery := since.Add(-50 * time.Millisecond).Format(time.RFC3339Nano)
options := container.LogsOptions{
ShowStdout: stdType&STDOUT != 0,
ShowStderr: stdType&STDERR != 0,

View File

@@ -156,7 +156,7 @@ func Test_dockerClient_ContainerLogs_happy(t *testing.T) {
Follow: true,
Tail: "100",
Timestamps: true,
Since: "2021-01-01T00:00:00.001Z"}
Since: "2020-12-31T23:59:59.95Z"}
proxy.On("ContainerLogs", mock.Anything, id, options).Return(reader, nil)
client := &httpClient{proxy, filters.NewArgs(), Host{ID: "localhost"}, system.Info{}}