MCPcopy Create free account
hub / github.com/auth0/auth0-cli / LogTail

Method LogTail

internal/display/logs.go:241–262  ·  view source on GitHub ↗
(logs []*management.Log, ch <-chan []*management.Log, silent bool)

Source from the content-addressed store, hash-verified

239}
240
241func (r *Renderer) LogTail(logs []*management.Log, ch <-chan []*management.Log, silent bool) {
242 r.Heading("logs")
243
244 var res []View
245 for _, l := range logs {
246 res = append(res, &LogView{Log: l, silent: silent, raw: l})
247 }
248
249 viewChan := make(chan View)
250
251 go func() {
252 defer close(viewChan)
253
254 for list := range ch {
255 for _, l := range list {
256 viewChan <- &LogView{Log: l, silent: silent, raw: l}
257 }
258 }
259 }()
260
261 r.Stream(res, viewChan)
262}
263
264// Using below code to avoid the Bell sound
265// when toggling up/down on prompt.

Callers 1

tailLogsCmdFunction · 0.80

Calls 2

HeadingMethod · 0.95
StreamMethod · 0.95

Tested by

no test coverage detected