client-cpp  0.7.0
kaa::ILogCollector Class Referenceabstract

The public interface to the Kaa log collecting subsystem. More...

#include <ILogCollector.hpp>

+ Inheritance diagram for kaa::ILogCollector:

Public Member Functions

virtual void 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 ~ILogCollector ()
 

Detailed Description

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 50 of file ILogCollector.hpp.

Constructor & Destructor Documentation

virtual kaa::ILogCollector::~ILogCollector ( )
inlinevirtual

Definition at line 87 of file ILogCollector.hpp.

Member Function Documentation

virtual void kaa::ILogCollector::addLogRecord ( const KaaUserLogRecord &  record)
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.

Parameters
[in]recordThe log record to be added.
See also
KaaUserLogRecord
ILogStorage

Implemented in kaa::LogCollector.

virtual void kaa::ILogCollector::setStorage ( ILogStoragePtr  storage)
pure virtual

Sets the new log storage.

MemoryLogStorage is used by default.

Parameters
[in]storageThe ILogStorage implementation.
Exceptions
KaaExceptionThe storage is NULL.

Implemented in kaa::LogCollector.

virtual void kaa::ILogCollector::setUploadStrategy ( ILogUploadStrategyPtr  strategy)
pure virtual

Sets the new log upload strategy.

DefaultLogUploadStrategy is used by default.

Parameters
[in]strategyThe ILogUploadStrategy implementation.
Exceptions
KaaExceptionThe strategy is NULL.

Implemented in kaa::LogCollector.


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