1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-26 23:21:41 +01:00

fix: fixes really big logs being split in Docker that exceeded 16KB (#3946)

This commit is contained in:
Amir Raminfar
2025-06-04 13:54:13 -07:00
committed by GitHub
parent 02c28fd001
commit 252d865460
4 changed files with 20 additions and 10 deletions

View File

@@ -6,6 +6,7 @@ import (
"encoding/binary"
"errors"
"io"
"strings"
"sync"
"github.com/amir20/dozzle/internal/container"
@@ -52,8 +53,16 @@ func (d *LogReader) Read() (string, container.StdType, error) {
std = container.STDERR
}
return message, std, nil
for !strings.HasSuffix(message, "\n") {
tail, _, err := d.readEvent()
if err != nil {
return "", std, err
}
message += tail[32:]
}
return message, std, nil
}
func (d *LogReader) readEvent() (string, StdType, error) {