Limit number of log entries stored
This commit is contained in:
@@ -28,6 +28,9 @@ func init() {
|
|||||||
for {
|
for {
|
||||||
aLog := <-logInput
|
aLog := <-logInput
|
||||||
LogEntries = append(LogEntries, aLog)
|
LogEntries = append(LogEntries, aLog)
|
||||||
|
for len(LogEntries) > 100 {
|
||||||
|
LogEntries = LogEntries[1:]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user