This class will release all logs older than the given datetime.
More...
#include <ee/LogRetentionPolicy.hpp>
|
| LogRetentionOlderThan (const std::chrono::milliseconds &lifetime) noexcept |
| Constructor. More...
|
|
void | init () noexceptoverride |
| Initializes this class before execution of a cycle.
|
|
bool | retain (const LogEntry &logEntry) noexceptoverride |
| Decides whether to retain or release the given log entry. More...
|
|
|
const std::chrono::milliseconds | mLifetime |
| Specifies the time between the start of the cycle and the oldest log entry.
|
|
std::chrono::system_clock::time_point | mDatetime |
| This stores the line where older log entries should be released.
|
|
This class will release all logs older than the given datetime.
ee::LogRetentionOlderThan::LogRetentionOlderThan |
( |
const std::chrono::milliseconds & |
lifetime | ) |
|
|
explicitnoexcept |
Constructor.
- Parameters
-
dateLimit | This date limit will mark the line where older logs are released. |
bool ee::LogRetentionOlderThan::retain |
( |
const LogEntry & |
logEntry | ) |
|
|
overridevirtualnoexcept |
Decides whether to retain or release the given log entry.
- Parameters
-
logEntry | The log entry to retain or release. |
- Returns
- True if the given log entry should be retained.
Implements ee::LogRetentionPolicy.
The documentation for this class was generated from the following file: