mirror of
https://github.com/bcicen/ctop.git
synced 2024-08-30 18:23:19 +00:00
docker_logs.go use SplitN(2)
This commit is contained in:
parent
6c662d91fb
commit
948e7cc9d0
@ -47,9 +47,9 @@ func (l *DockerLogs) Stream() chan models.Log {
|
||||
go func() {
|
||||
scanner := bufio.NewScanner(r)
|
||||
for scanner.Scan() {
|
||||
parts := strings.Split(scanner.Text(), " ")
|
||||
parts := strings.SplitN(scanner.Text(), " ", 2)
|
||||
ts := l.parseTime(parts[0])
|
||||
logCh <- models.Log{Timestamp: ts, Message: strings.Join(parts[1:], " ")}
|
||||
logCh <- models.Log{Timestamp: ts, Message: parts[1]}
|
||||
}
|
||||
}()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user