mirror of
https://github.com/openziti/zrok.git
synced 2025-01-11 00:18:43 +01:00
fix verbose mode panic with tui log capture (#174)
This commit is contained in:
parent
2a2a64f513
commit
54476d2cd1
@ -181,7 +181,7 @@ func (m *accessModel) Write(p []byte) (n int, err error) {
|
|||||||
lines := strings.Split(in, "\n")
|
lines := strings.Split(in, "\n")
|
||||||
for _, line := range lines {
|
for _, line := range lines {
|
||||||
cleanLine := strings.ReplaceAll(line, "\n", "")
|
cleanLine := strings.ReplaceAll(line, "\n", "")
|
||||||
if cleanLine != "" {
|
if cleanLine != "" && m.prg != nil {
|
||||||
m.prg.Send(accessLogLine(cleanLine))
|
m.prg.Send(accessLogLine(cleanLine))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,7 @@ func (m *shareModel) Write(p []byte) (n int, err error) {
|
|||||||
lines := strings.Split(in, "\n")
|
lines := strings.Split(in, "\n")
|
||||||
for _, line := range lines {
|
for _, line := range lines {
|
||||||
cleanLine := strings.ReplaceAll(line, "\n", "")
|
cleanLine := strings.ReplaceAll(line, "\n", "")
|
||||||
if cleanLine != "" {
|
if cleanLine != "" && m.prg != nil {
|
||||||
m.prg.Send(shareLogLine(cleanLine))
|
m.prg.Send(shareLogLine(cleanLine))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user