in cloudwatch/cloudwatch.go [419:432]
func (output *OutputPlugin) cleanUpExpiredLogStreams() {
if output.nextLogStreamCleanUpCheckTime.Before(time.Now()) {
logrus.Debugf("[cloudwatch %d] Checking for expired log streams", output.PluginInstanceID)
for name, stream := range output.streams {
if stream.isExpired() {
logrus.Debugf("[cloudwatch %d] Removing internal buffer for log stream %s in group %s; the stream has not been written to for %s",
output.PluginInstanceID, stream.logStreamName, stream.logGroupName, logStreamInactivityTimeout.String())
delete(output.streams, name)
}
}
output.nextLogStreamCleanUpCheckTime = time.Now().Add(logStreamInactivityCheckInterval)
}
}