| 11 | namespace CppLogging { |
| 12 | |
| 13 | bool BufferedProcessor::ProcessRecord(Record& record) |
| 14 | { |
| 15 | // Check if the logging processor started |
| 16 | if (!IsStarted()) |
| 17 | return true; |
| 18 | |
| 19 | // Process all buffered logging records if the buffer limit is reached |
| 20 | if ((_buffer.size() + 1) > _limit) |
| 21 | ProcessBufferedRecords(); |
| 22 | |
| 23 | // Move the given logging record into the buffer |
| 24 | _buffer.emplace_back(std::move(record)); |
| 25 | |
| 26 | // Always return false to stop further logging record processing |
| 27 | return false; |
| 28 | } |
| 29 | |
| 30 | void BufferedProcessor::ProcessBufferedRecords() |
| 31 | { |
nothing calls this directly
no outgoing calls
no test coverage detected