Limit number of log entries stored

This commit is contained in:
Justin Hawkins 2021-06-03 19:40:53 +09:30
parent d8c0b7d0ea
commit bcc4e145a2

View File

@ -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:]
}
} }
}() }()
} }