![]() |
Fledge
An open source edge computing platform for industrial users
|
A singleton class for access to the audit logger within services. More...
#include <audit_logger.h>
Public Member Functions | |
AuditLogger (ManagementClient *mgmt) | |
Constructor for an audit logger that is passed the management client. More... | |
~AuditLogger () | |
Destructor for an audit logger. | |
void | audit (const std::string &code, const std::string &level, const std::string &data="") |
Log an audit message. More... | |
Static Public Member Functions | |
static AuditLogger * | getLogger () |
Get the audit logger singleton. | |
static void | auditLog (const std::string &code, const std::string &level, const std::string &data="") |
A singleton class for access to the audit logger within services.
The service must create this with the maagement client before any access to it is used.
AuditLogger::AuditLogger | ( | ManagementClient * | mgmt | ) |
Constructor for an audit logger that is passed the management client.
This must be called early in a service or task creation before any audit logs are created.
mgmt | Pointer to the management client |
void AuditLogger::audit | ( | const std::string & | code, |
const std::string & | level, | ||
const std::string & | data = "" |
||
) |
Log an audit message.
code | The audit code |
level | The audit level |
data | Optional data associated with the audit entry |