TelemetryLogger to report important events.
More...
#include <TelemetryLogger.h>
|
virtual void | logEvent (LogEvent &&event) |
| Actual methods that implement the behaviors.
|
|
virtual void | logTraffic (const OperationContext &operationContext, const TrafficEvent &event) |
|
virtual void | flushEvents () |
|
virtual void | start () |
| Start telemetry: background threads should be started, as needed.
|
|
virtual void | stop () |
|
|
static void | setLogger (std::unique_ptr< TelemetryLogger > telemetryLogger=nullptr) |
|
static void | error (const OperationContext &operationContext, const string &message, const string &serverMessage={}) |
| methods for clients to use without having to get an instance, etc
|
|
static void | warning (const OperationContext &operationContext, const string &message, const string &serverMessage={}) |
|
static void | info (const OperationContext &operationContext, const string &message, const string &serverMessage={}) |
|
static void | event (const std::string &eventType, const OperationContext &operationContext, const string &message, const string &serverMessage={}) |
|
static void | traffic (const OperationContext &operationContext, const TrafficEvent &event) |
|
static void | flush () |
|
|
static constexpr const char * | kErrorType = "error" |
|
static constexpr const char * | kWarningType = "warning" |
|
static constexpr const char * | kInfoType = "info" |
|
TelemetryLogger to report important events.
Telemetry building block infra to report events from VRS operations. The default implementation simply logs using XR_LOGI and XR_LOGE, XR_LOGW, but can easily be augmented to implement telemetry in a central database.
◆ setLogger()
void vrs::TelemetryLogger::setLogger |
( |
std::unique_ptr< TelemetryLogger > |
telemetryLogger = nullptr | ) |
|
|
static |
Change active telemetry logger. The new logger will be started after assignment, and the old one will be stopped after.
- Parameters
-
◆ stop()
virtual void vrs::TelemetryLogger::stop |
( |
| ) |
|
|
inlinevirtual |
End telemetry: All background threads should be stopped. All pending events should be flushed, and further events should be ignored.
The documentation for this class was generated from the following files: