Fix log view (#1874)

closes #1857
closes #1520
closes #1879 
- fixes unicode log lines as reported in matrix

---------

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
Anbraten
2023-07-01 18:55:00 +02:00
committed by GitHub
parent 3714e9c218
commit 3d435a9cb7
3 changed files with 56 additions and 15 deletions

View File

@@ -61,12 +61,12 @@ func (l *log) Open(_ context.Context, stepID int64) error {
return nil
}
func (l *log) Write(_ context.Context, stepID int64, logEntry *model.LogEntry) error {
func (l *log) Write(ctx context.Context, stepID int64, logEntry *model.LogEntry) error {
l.Lock()
s, ok := l.streams[stepID]
l.Unlock()
if !ok {
return ErrNotFound
return l.Open(ctx, stepID)
}
s.Lock()
s.list = append(s.list, logEntry)