mirror of
https://github.com/amir20/dozzle.git
synced 2026-01-04 03:54:58 +01:00
@@ -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,
|
||||
|
||||
@@ -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{}}
|
||||
|
||||
Reference in New Issue
Block a user