feat: Fine-tune logs presentation (#6771)

* Process debug mode logs

* Debug logs are grey

* Fix
This commit is contained in:
Marcin Tojek
2023-03-24 13:29:18 +01:00
committed by GitHub
parent c7fb5f960c
commit c9cbc63cd4
4 changed files with 29 additions and 3 deletions

View File

@ -347,7 +347,8 @@ func (api *API) followProvisionerJobLogs(actor rbac.Subject, jobID uuid.UUID) (<
logger := api.Logger.With(slog.F("job_id", jobID))
var (
bufferedLogs = make(chan *database.ProvisionerJobLog, 128)
// With debug logging enabled length = 128 is insufficient
bufferedLogs = make(chan *database.ProvisionerJobLog, 1024)
endOfLogs atomic.Bool
lastSentLogID atomic.Int64
)