e3.1.0 Refactored lifecycle (configuration, drop report, heartbeat).

This commit is contained in:
2025-07-21 21:28:45 -04:00
parent 98402cce37
commit ce6e3b7ffc
16 changed files with 615 additions and 200 deletions

View File

@ -94,10 +94,11 @@ func (l *Logger) processLogs(ch <-chan logRecord) {
// processLogRecord handles individual log records, returning bytes written
func (l *Logger) processLogRecord(record logRecord) int64 {
c := l.getConfig()
// Check if the record should process this record
disableFile := c.DisableFile
if !disableFile && !l.state.DiskStatusOK.Load() {
// Simple increment of both counters
l.state.DroppedLogs.Add(1)
l.state.TotalDroppedLogs.Add(1)
return 0
}