Example #1
0
void EventManager::doSync()
{
    if (eventTransport_) {
        eventTransport_->sync();
    } else {
        KAA_LOG_ERROR("Failed to sync: event transport is not set");
        throw TransportNotFoundException("Event transport not found");
    }
}
Example #2
0
void LogCollector::doSync()
{
    KAA_MUTEX_LOCKING("transportGuard_");
    KAA_MUTEX_UNIQUE_DECLARE(transportGuardLock, transportGuard_);
    KAA_MUTEX_LOCKED("transportGuard_");

    if (transport_) {
        transport_->sync();
    } else {
        KAA_LOG_ERROR("Failed to upload logs: log transport isn't initialized");
        throw TransportNotFoundException("Log transport isn't set");
    }
}