Fledge
An open source edge computing platform for industrial users
AuditLogger Class Reference

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 AuditLoggergetLogger ()
 Get the audit logger singleton.
 
static void auditLog (const std::string &code, const std::string &level, const std::string &data="")
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ AuditLogger()

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.

Parameters
mgmtPointer to the management client

Member Function Documentation

◆ audit()

void AuditLogger::audit ( const std::string &  code,
const std::string &  level,
const std::string &  data = "" 
)

Log an audit message.

Parameters
codeThe audit code
levelThe audit level
dataOptional data associated with the audit entry

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