mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 15:59:01 +08:00
correct var names in live tail
This commit is contained in:
parent
b5c8764605
commit
051f640100
@ -1943,13 +1943,12 @@ func (aH *APIHandler) tailLogs(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
loop := true
|
for {
|
||||||
for loop {
|
|
||||||
select {
|
select {
|
||||||
case ev := <-client.Logs:
|
case log := <-client.Logs:
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
enc := json.NewEncoder(&buf)
|
enc := json.NewEncoder(&buf)
|
||||||
enc.Encode(ev)
|
enc.Encode(log)
|
||||||
fmt.Fprintf(w, "data: %v\n\n", buf.String())
|
fmt.Fprintf(w, "data: %v\n\n", buf.String())
|
||||||
flusher.Flush()
|
flusher.Flush()
|
||||||
case <-client.Done:
|
case <-client.Done:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user