func (manager *LoggerManager) Run() {
    var NextSendInterval float64

    defer manager.Lock.Done()

    for {
        if manager.Stopped {
            manager.Flush()
            return
        }

        manager.SendBulk(manager.SyncTime)

        if manager.LogsBufferLength() > (MaxLogChunkSize / 2) {
            NextSendInterval = FastSendSpeedInterval
        } else {
            NextSendInterval = NormalSendSpeedInterval
        }

        DebugLogger.Printf("Next buffer check is scheduled in %.1f seconds\n", NextSendInterval)
        time.Sleep(time.Duration(NextSendInterval) * time.Second)
    }
}
// Run should work in separate thread and asynchronously operate with logs
Run should work in separate thread and asynchronously operate with logs
// Run should work in separate thread and asynchronously operate with logs
func (manager *LoggerManager) Run() {
    var NextSendInterval float64
    defer manager.Lock.Done()
    for {
        if manager.Stopped {
            manager.Flush()
            return
        }
        manager.SendBulk(manager.SyncTime)
        if manager.LogsBufferLength() > (MaxLogChunkSize / 2) {
            NextSendInterval = FastSendSpeedInterval
        } else {
            NextSendInterval = NormalSendSpeedInterval
        }
        DebugLogger.Printf("Next buffer check is scheduled in %.1f seconds\n", NextSendInterval)
        time.Sleep(time.Duration(NextSendInterval) * time.Second)
    }
}
func ( manager * LoggerManager ) Run ( ) { var NextSendInterval float64 defer manager . Lock . Done ( ) for { if manager . Stopped { manager . Flush ( ) return } manager . SendBulk ( manager . SyncTime ) if manager . LogsBufferLength ( ) > ( MaxLogChunkSize / 2 ) { NextSendInterval = FastSendSpeedInterval } else { NextSendInterval = NormalSendSpeedInterval } DebugLogger . Printf ( " \n " , NextSendInterval ) time . Sleep ( time . Duration ( NextSendInterval ) * time . Second ) } }
Run should work in separate thread and asynchronously operate with logs
Run should work in separate thread and asynchronously operate with logs