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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user