A Flush-Policy which acts on accumulated byte count.
More...
#include <FlushPolicies.hpp>
A Flush-Policy which acts on accumulated byte count.
Instances of this class will return true if their given byte threshold has been exceeded.
◆ ByteCountFlushPolicy()
sl::log::ByteCountFlushPolicy::ByteCountFlushPolicy |
( |
std::size_t |
byteThreshold | ) |
|
|
inlineexplicitnoexcept |
Constructor.
- Parameters
-
byteThreshold | Threshold size in bytes |
◆ flushed()
void sl::log::ByteCountFlushPolicy::flushed |
( |
| ) |
|
|
inlinenoexcept |
Resets the internal byte counter.
◆ operator()()
template<Record TRecord>
bool sl::log::ByteCountFlushPolicy::operator() |
( |
const TRecord & |
record, |
|
|
std::size_t |
messageByteSize |
|
) |
| |
|
inlinenoexcept |
Invoke operator.
- Template Parameters
-
- Parameters
-
record | The current handled Record object |
messageByteSize | The size of the current handled message in bytes |
- Returns
- Returns true if the byte threshold has been exceeded.
The documentation for this class was generated from the following file: