client-cpp
0.10.0
|
The public interface to the Kaa log collecting subsystem. More...
#include <ILogCollector.hpp>
Public Member Functions | |
virtual RecordFuture | addLogRecord (const KaaUserLogRecord &record)=0 |
Adds a new log record to the log storage. More... | |
virtual void | setStorage (ILogStoragePtr storage)=0 |
Sets the new log storage. More... | |
virtual void | setUploadStrategy (ILogUploadStrategyPtr strategy)=0 |
Sets the new log upload strategy. More... | |
virtual void | setLogDeliveryListener (ILogDeliveryListenerPtr listener)=0 |
Set a listener which receives a delivery status of each log bucket. More... | |
virtual | ~ILogCollector () |
The public interface to the Kaa log collecting subsystem.
The log collecting subsystem is based on two main components - a log storage and an upload strategy. Each time a new log record is added to the storage, the strategy decides whether the log upload is needed at the moment.
By default, MemoryLogStorage
and DefaultLogUploadStrategy
are used as the log storage and as the upload strategy respectively.
The subsystem also tracks whether the log delivery timeout is occurred. The timeout means the log delivery response isn't received in time, specified by ILogUploadStrategy::getTimeout(). The check is done in the lazy manner, on each the addLogRecord() call. If the timeout is occurred, the log upload strategy will be notified of it via the ILogUploadStrategy::onTimeout() callback.
Definition at line 54 of file ILogCollector.hpp.
|
inlinevirtual |
Definition at line 96 of file ILogCollector.hpp.
|
pure virtual |
Adds a new log record to the log storage.
To store log records, MemoryLogStorage
is used by default. Use setStorage() to set your own implementation.
[in] | record | The log record to be added. |
Implemented in kaa::LogCollector.
|
pure virtual |
Set a listener which receives a delivery status of each log bucket.
Implemented in kaa::LogCollector.
|
pure virtual |
Sets the new log storage.
MemoryLogStorage
is used by default.
[in] | storage | The ILogStorage implementation. |
KaaException | The storage is NULL. |
Implemented in kaa::LogCollector.
|
pure virtual |
Sets the new log upload strategy.
DefaultLogUploadStrategy
is used by default.
[in] | strategy | The ILogUploadStrategy implementation. |
KaaException | The strategy is NULL. |
Implemented in kaa::LogCollector.