Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
vito committed Mar 7, 2024
1 parent 4c0a348 commit d02c439
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions dagql/idtui/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,12 @@ var _ sdklog.LogExporter = (*DB)(nil)

func (db *DB) ExportLogs(ctx context.Context, logs []*sdklog.LogData) error {
for _, log := range logs {
spanID := trace.SpanID(log.SpanID)

// render vterm for TUI
_, _ = fmt.Fprint(db.spanLogs(spanID), log.Body().AsString())
_, _ = fmt.Fprint(db.spanLogs(log.SpanID), log.Body().AsString())

if spanID == db.PrimarySpan {
if log.SpanID == db.PrimarySpan {
// buffer raw logs so we can replay them later
db.PrimaryLogs[spanID] = append(db.PrimaryLogs[spanID], log)
db.PrimaryLogs[log.SpanID] = append(db.PrimaryLogs[log.SpanID], log)
}
}
return nil
Expand Down

0 comments on commit d02c439

Please sign in to comment.