EasyException
ee::LogRetentionPolicy Class Referenceabstract

Interface class that is applied to the log retention mechanism. More...

#include <ee/LogRetentionPolicy.hpp>

Inheritance diagram for ee::LogRetentionPolicy:
ee::LogRetentionMaxNumber ee::LogRetentionOlderThan

Public Member Functions

virtual void init () noexcept=0
 This method is called before executing a cycle of decisions.
 
virtual bool retain (const LogEntry &logEntry) noexcept=0
 This method decides whether to retain or release the log entry. More...
 

Protected Member Functions

 LogRetentionPolicy (uint8_t priority) noexcept
 Constructor. More...
 

Private Attributes

const uint8_t mPriority
 The priority marks how important this log retention policy is.
 

Friends

class Log
 

Detailed Description

Interface class that is applied to the log retention mechanism.

Constructor & Destructor Documentation

ee::LogRetentionPolicy::LogRetentionPolicy ( uint8_t  priority)
explicitprotectednoexcept

Constructor.

Parameters
priorityThe priority of this log retention policy.

Member Function Documentation

virtual bool ee::LogRetentionPolicy::retain ( const LogEntry logEntry)
pure virtualnoexcept

This method decides whether to retain or release the log entry.

Parameters
logEntryThe given log entry to decide for.
Returns
True if the given log entry should be retained.

Implemented in ee::LogRetentionOlderThan, and ee::LogRetentionMaxNumber.


The documentation for this class was generated from the following file: