From 7770b0757243897bdd624a57125026c0162042bf Mon Sep 17 00:00:00 2001 From: Jacob Keeler Date: Fri, 23 Oct 2020 15:35:12 -0400 Subject: Fix formatting for logs after logger overhaul (#3554) * Fix formatting for logs after logger overhaul Co-authored-by: Shobhit Adlakha --- .../create_interaction_choice_set_request.cc | 10 +++--- .../delete_interaction_choice_set_request.cc | 5 ++- .../commands/mobile/perform_interaction_request.cc | 16 ++++----- .../src/commands/mobile/show_app_menu_request.cc | 10 +++--- .../src/connection_handler_impl.cc | 39 +++++++++------------ src/components/connection_handler/src/device.cc | 5 ++- .../connection_handler/src/heartbeat_monitor.cc | 5 ++- .../src/audio/a2dp_source_player_adapter.cc | 5 ++- .../media_manager/src/pipe_streamer_adapter.cc | 5 ++- .../policy/policy_external/src/cache_manager.cc | 7 ++-- .../policy/policy_external/src/policy_helper.cc | 1 - .../policy_external/src/policy_manager_impl.cc | 28 +++++---------- .../policy_external/src/policy_table/validation.cc | 6 ++-- .../src/sql_pt_ext_representation.cc | 1 - .../policy_external/src/sql_pt_representation.cc | 16 +++------ .../policy/policy_regular/src/cache_manager.cc | 2 -- .../policy/policy_regular/src/policy_helper.cc | 2 -- .../policy_regular/src/policy_manager_impl.cc | 5 --- .../policy_regular/src/policy_table/validation.cc | 5 ++- .../policy_regular/src/sql_pt_representation.cc | 16 +++------ .../protocol_handler/src/protocol_handler_impl.cc | 31 +++++------------ .../protocol_handler/src/protocol_packet.cc | 11 +++--- src/components/resumption/src/last_state_impl.cc | 5 ++- .../crypto_manager_settings_impl.h | 1 - .../security_manager/src/crypto_manager_impl.cc | 10 +++--- .../security_manager/src/security_manager_impl.cc | 5 ++- .../src/protocol_handler_observer.cc | 1 - .../src/bluetooth/bluetooth_device.cc | 1 - .../src/bluetooth/bluetooth_socket_connection.cc | 6 ++-- .../cloud/cloud_websocket_connection_factory.cc | 1 - .../src/cloud/websocket_client_connection.cc | 11 +++--- ...platform_specific_network_interface_listener.cc | 10 +++--- .../src/tcp/tcp_client_listener.cc | 6 ++-- .../src/tcp/tcp_connection_factory.cc | 5 ++- .../transport_manager/src/tcp/tcp_device.cc | 6 ++-- .../transport_adapter/transport_adapter_impl.cc | 40 +++++++++------------- .../src/transport_manager_impl.cc | 16 +++------ .../src/usb/libusb/usb_connection.cc | 5 --- .../src/usb/libusb/usb_handler.cc | 4 --- src/components/utils/src/file_system.cc | 23 +++++-------- .../utils/src/threads/thread_validator.cc | 11 +++--- 41 files changed, 134 insertions(+), 264 deletions(-) diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc index 345a6a8497..0d1d876497 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc @@ -221,9 +221,8 @@ bool CreateInteractionChoiceSetRequest::compareSynonyms( CreateInteractionChoiceSetRequest::compareStr); if (it != vr_cmds_1->end()) { - SDL_LOG_INFO( - - "Incoming choice set has duplicated VR synonyms " << it->asString()); + SDL_LOG_INFO("Incoming choice set has duplicated VR synonyms " + << it->asString()); return true; } @@ -331,9 +330,8 @@ void CreateInteractionChoiceSetRequest::SendVRAddCommandRequests( VRCommandInfo vr_command(vr_cmd_id); sent_commands_map_[vr_corr_id] = vr_command; - SDL_LOG_DEBUG( - - "VR_command sent corr_id " << vr_corr_id << " cmd_id " << vr_corr_id); + SDL_LOG_DEBUG("VR_command sent corr_id " << vr_corr_id << " cmd_id " + << vr_corr_id); } expected_chs_count_ = chs_num; SDL_LOG_DEBUG("expected_chs_count_ = " << expected_chs_count_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_request.cc index d8b74eb770..3ff95a6f41 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_request.cc @@ -65,9 +65,8 @@ void DeleteInteractionChoiceSetRequest::Run() { ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - SDL_LOG_ERROR( - - "No application associated with connection key " << connection_key()); + SDL_LOG_ERROR("No application associated with connection key " + << connection_key()); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc index 7b29f33d24..14eba3f34f 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc @@ -598,9 +598,8 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest( MessageHelper::VerifyTtsFiles(help_prompt, app, application_manager_); if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) { - SDL_LOG_WARN( - - "MessageHelper::VerifyTtsFiles return " << verification_result); + SDL_LOG_WARN("MessageHelper::VerifyTtsFiles return " + << verification_result); invalid_params.push_back("help_prompt"); } else { msg_params[strings::help_prompt] = help_prompt; @@ -646,9 +645,8 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest( timeout_prompt, app, application_manager_); if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) { - SDL_LOG_WARN( - - "MessageHelper::VerifyTtsFiles return " << verification_result); + SDL_LOG_WARN("MessageHelper::VerifyTtsFiles return " + << verification_result); invalid_params.push_back("timeout_prompt"); } else { msg_params[strings::timeout_prompt] = timeout_prompt; @@ -667,9 +665,8 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest( initial_prompt, app, application_manager_); if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) { - SDL_LOG_WARN( - - "MessageHelper::VerifyTtsFiles return " << verification_result); + SDL_LOG_WARN("MessageHelper::VerifyTtsFiles return " + << verification_result); invalid_params.push_back("initial_prompt"); } else { msg_params[strings::initial_prompt] = initial_prompt; @@ -1008,7 +1005,6 @@ bool PerformInteractionRequest::CheckChoiceSetListVRCommands( // this should never ever happen since this was already checked if (smart_objects::SmartType_Null == choice_set.getType()) { SDL_LOG_ERROR( - "Couldn't find choiceset_id = " << choice_set_id_list[i].asInt()); SendResponse(false, mobile_apis::Result::INVALID_ID); return false; diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_request.cc index 7d2751ed0d..fdcf9d2434 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_request.cc @@ -62,9 +62,8 @@ void ShowAppMenuRequest::Run() { ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - SDL_LOG_ERROR( - - "Application with id " << connection_key() << " is not registered."); + SDL_LOG_ERROR("Application with id " << connection_key() + << " is not registered."); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -77,9 +76,8 @@ void ShowAppMenuRequest::Run() { app->system_context(mobile_apis::PredefinedWindows::DEFAULT_WINDOW), mobile_apis::SystemContext::SYSCTXT_MAIN, mobile_apis::SystemContext::SYSCTXT_MENU)) { - SDL_LOG_ERROR( - - "Application with id " << connection_key() << " is not activated."); + SDL_LOG_ERROR("Application with id " << connection_key() + << " is not activated."); SendResponse(false, mobile_apis::Result::REJECTED); return; } diff --git a/src/components/connection_handler/src/connection_handler_impl.cc b/src/components/connection_handler/src/connection_handler_impl.cc index e3ab3db324..af32a741e1 100644 --- a/src/components/connection_handler/src/connection_handler_impl.cc +++ b/src/components/connection_handler/src/connection_handler_impl.cc @@ -403,9 +403,8 @@ bool AllowProtection(const ConnectionHandlerSettings& settings, if (std::find(force_unprotected_list.begin(), force_unprotected_list.end(), service_type) != force_unprotected_list.end()) { - SDL_LOG_ERROR( - - "Service " << static_cast(service_type) << " shall be protected"); + SDL_LOG_ERROR("Service " << static_cast(service_type) + << " shall be protected"); return false; } SDL_LOG_DEBUG("Service " << static_cast(service_type) << " allowed"); @@ -730,16 +729,14 @@ uint32_t ConnectionHandlerImpl::OnSessionEndedCallback( KeyFromPair(primary_connection_handle, session_id); if (protocol_handler::kRpc == service_type) { - SDL_LOG_INFO( - - "Session " << static_cast(session_id) << " to be removed"); + SDL_LOG_INFO("Session " << static_cast(session_id) + << " to be removed"); // old version of protocol doesn't support hash if (protocol_handler::HASH_ID_NOT_SUPPORTED != *hashCode) { if (protocol_handler::HASH_ID_WRONG == *hashCode || session_key != *hashCode) { - SDL_LOG_WARN( - - "Wrong hash_id for session " << static_cast(session_id)); + SDL_LOG_WARN("Wrong hash_id for session " + << static_cast(session_id)); *hashCode = protocol_handler::HASH_ID_WRONG; if (err_reason) { @@ -759,13 +756,11 @@ uint32_t ConnectionHandlerImpl::OnSessionEndedCallback( return 0; } } else { - SDL_LOG_INFO( - - "Service " << static_cast(service_type) << " to be removed"); + SDL_LOG_INFO("Service " << static_cast(service_type) + << " to be removed"); if (!connection->RemoveService(session_id, service_type)) { - SDL_LOG_WARN( - - "Couldn't remove service " << static_cast(service_type)); + SDL_LOG_WARN("Couldn't remove service " + << static_cast(service_type)); if (err_reason) { *err_reason = "Couldn't remove service " + std::to_string(static_cast(service_type)); @@ -989,11 +984,10 @@ void ConnectionHandlerImpl::PairFromKey( uint8_t* session_id) const { *connection_handle = key & 0xFF00FFFF; *session_id = key >> 16; - SDL_LOG_DEBUG( - - "ConnectionHandle:" << static_cast(*connection_handle) - << " Session:" << static_cast(*session_id) - << " for key:" << static_cast(key)); + SDL_LOG_DEBUG("ConnectionHandle: " + << static_cast(*connection_handle) + << " Session: " << static_cast(*session_id) + << " for key: " << static_cast(key)); } int32_t ConnectionHandlerImpl::GetDataOnSessionKey( @@ -1576,9 +1570,8 @@ void ConnectionHandlerImpl::CloseSession(ConnectionHandle connection_handle, return; } - SDL_LOG_DEBUG( - - "Session with id: " << session_id << " has been closed successfully"); + SDL_LOG_DEBUG("Session with id: " << session_id + << " has been closed successfully"); } void ConnectionHandlerImpl::CloseConnectionSessions( diff --git a/src/components/connection_handler/src/device.cc b/src/components/connection_handler/src/device.cc index c831c0b2d2..94e7226f84 100644 --- a/src/components/connection_handler/src/device.cc +++ b/src/components/connection_handler/src/device.cc @@ -54,9 +54,8 @@ Device::Device(DeviceHandle device_handle, , mac_address_(mac_address) , connection_type_(connection_type) { mac_address_ = encryption::MakeHash(mac_address); - SDL_LOG_DEBUG( - - "Device: MAC address - " << mac_address << ", hash - " << mac_address_); + SDL_LOG_DEBUG("Device: MAC address - " << mac_address << ", hash - " + << mac_address_); } DeviceHandle Device::device_handle() const { diff --git a/src/components/connection_handler/src/heartbeat_monitor.cc b/src/components/connection_handler/src/heartbeat_monitor.cc index e53e914b0a..f3e2da2696 100644 --- a/src/components/connection_handler/src/heartbeat_monitor.cc +++ b/src/components/connection_handler/src/heartbeat_monitor.cc @@ -78,9 +78,8 @@ void HeartBeatMonitor::Process() { void HeartBeatMonitor::threadMain() { AutoLock main_lock(main_thread_lock_); - SDL_LOG_DEBUG( - - "Start heart beat monitor. Timeout is " << default_heartbeat_timeout_); + SDL_LOG_DEBUG("Start heart beat monitor. Timeout is " + << default_heartbeat_timeout_); while (run_) { heartbeat_monitor_.WaitFor(main_lock, kDefaultCycleTimeout); Process(); diff --git a/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc b/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc index b9cdf55482..a2c088c8a1 100644 --- a/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc +++ b/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc @@ -85,9 +85,8 @@ A2DPSourcePlayerAdapter::~A2DPSourcePlayerAdapter() { } void A2DPSourcePlayerAdapter::StartActivity(int32_t application_key) { - SDL_LOG_INFO( - - "Starting a2dp playing music for " << application_key << " application."); + SDL_LOG_INFO("Starting a2dp playing music for " << application_key + << " application."); if (application_key != current_application_) { current_application_ = application_key; diff --git a/src/components/media_manager/src/pipe_streamer_adapter.cc b/src/components/media_manager/src/pipe_streamer_adapter.cc index 0759813c04..5e4c87c73d 100644 --- a/src/components/media_manager/src/pipe_streamer_adapter.cc +++ b/src/components/media_manager/src/pipe_streamer_adapter.cc @@ -86,9 +86,8 @@ bool PipeStreamerAdapter::PipeStreamer::Connect() { return false; } - SDL_LOG_INFO( - - "Pipe " << named_pipe_path_ << " was successfuly opened for writing"); + SDL_LOG_INFO("Pipe " << named_pipe_path_ + << " was successfuly opened for writing"); return true; } diff --git a/src/components/policy/policy_external/src/cache_manager.cc b/src/components/policy/policy_external/src/cache_manager.cc index 570246adb7..81a5518cb8 100644 --- a/src/components/policy/policy_external/src/cache_manager.cc +++ b/src/components/policy/policy_external/src/cache_manager.cc @@ -1305,7 +1305,6 @@ int CacheManager::IgnitionCyclesBeforeExchange() { *pt_->policy_table.module_meta->ignition_cycles_since_last_exchange); current = std::max(last_exch, 0); SDL_LOG_DEBUG( - "IgnitionCyclesBeforeExchange current:" << static_cast(current)); return std::max(limit - current, 0); @@ -1343,7 +1342,6 @@ bool CacheManager::SetCountersPassedForSuccessfulUpdate( case DAYS_AFTER_EPOCH: *pt_->policy_table.module_meta->pt_exchanged_x_days_after_epoch = value; SDL_LOG_DEBUG( - "SetCountersPassedForSuccessfulUpdate days after epoch:" << value); break; default: @@ -2353,9 +2351,8 @@ bool CacheManager::CleanupUnpairedDevices() { SDL_LOG_DEBUG("Device_data size is: " << device_data.size()); device_data.erase(it_device); - SDL_LOG_INFO( - - "Device id " << *iter << " had been deleted from device_data section."); + SDL_LOG_INFO("Device id " << *iter + << " had been deleted from device_data section."); SDL_LOG_DEBUG("Device_data size is: " << device_data.size()); } is_unpaired_.clear(); diff --git a/src/components/policy/policy_external/src/policy_helper.cc b/src/components/policy/policy_external/src/policy_helper.cc index e6605aed3a..0dde301d0e 100644 --- a/src/components/policy/policy_external/src/policy_helper.cc +++ b/src/components/policy/policy_external/src/policy_helper.cc @@ -675,7 +675,6 @@ bool CheckAppPolicy::IsAppPropertiesChanged( if (!IsKnownAppication(app_policy.first)) { SDL_LOG_DEBUG( - "AppProperties provided for new application: " << app_policy.first); return true; } diff --git a/src/components/policy/policy_external/src/policy_manager_impl.cc b/src/components/policy/policy_external/src/policy_manager_impl.cc index fc7fc0f171..9bcea70803 100644 --- a/src/components/policy/policy_external/src/policy_manager_impl.cc +++ b/src/components/policy/policy_external/src/policy_manager_impl.cc @@ -465,7 +465,6 @@ PolicyManager::PtProcessingResult PolicyManagerImpl::LoadPT( const std::string& file, const BinaryMessage& pt_content) { SDL_LOG_INFO("LoadPT of size " << pt_content.size()); SDL_LOG_DEBUG( - "PTU content is: " << std::string(pt_content.begin(), pt_content.end())); // Parse message into table struct @@ -491,7 +490,6 @@ PolicyManager::PtProcessingResult PolicyManagerImpl::LoadPT( auto policy_table_snapshot = cache_->GenerateSnapshot(); if (!policy_table_snapshot) { SDL_LOG_ERROR( - "Failed to create snapshot of policy table, trying another exchange"); return PtProcessingResult::kNewPtRequired; } @@ -507,7 +505,6 @@ PolicyManager::PtProcessingResult PolicyManagerImpl::LoadPT( // Replace current data with updated if (!cache_->ApplyUpdate(*pt_update)) { SDL_LOG_WARN( - "Unsuccessful save of updated policy table, trying another exchange"); return PtProcessingResult::kNewPtRequired; } @@ -968,7 +965,6 @@ void PolicyManagerImpl::CheckPermissions(const PTString& device_id, hmi_level)) { // RPC found in allowed == allowed by backend, but disallowed by user SDL_LOG_DEBUG( - "RPC found in allowed == allowed by backend, but disallowed by user"); result.hmi_level_permitted = kRpcUserDisallowed; } else { @@ -1266,7 +1262,6 @@ void PolicyManagerImpl::CheckPendingPermissionsChanges( app_permissions_diff_.find(policy_app_id); if (app_permissions_diff_.end() == it_pending) { SDL_LOG_WARN( - "No pending permissions had been found for appID: " << policy_app_id); return; } @@ -1284,7 +1279,6 @@ void PolicyManagerImpl::CheckPendingPermissionsChanges( for (; it_groups != it_end_groups; ++it_groups) { if (policy::kGroupUndefined == it_groups->state) { SDL_LOG_DEBUG( - "Unconsented groups still present for appID: " << policy_app_id); it_pending->second.appPermissionsConsentNeeded = true; return; @@ -1292,7 +1286,6 @@ void PolicyManagerImpl::CheckPendingPermissionsChanges( } SDL_LOG_DEBUG( - "Unconsented groups not present anymore for appID: " << policy_app_id); it_pending->second.appPermissionsConsentNeeded = false; return; @@ -2254,16 +2247,14 @@ void PolicyManagerImpl::AddNewApplication(const std::string& device_id, if (kDeviceHasNoConsent == device_consent || kDeviceDisallowed == device_consent) { - SDL_LOG_INFO( - - "Setting " << policy::kPreDataConsentId - << " permissions for application id: " << application_id); + SDL_LOG_INFO("Setting " + << policy::kPreDataConsentId + << " permissions for application id: " << application_id); cache_->SetPredataPolicy(application_id); } else { - SDL_LOG_INFO( - - "Setting " << policy::kDefaultId - << " permissions for application id: " << application_id); + SDL_LOG_INFO("Setting " + << policy::kDefaultId + << " permissions for application id: " << application_id); cache_->SetDefaultPolicy(application_id); } @@ -2284,10 +2275,9 @@ void PolicyManagerImpl::PromoteExistedApplication( << " device_consent: " << device_consent); if (kDeviceAllowed == device_consent && cache_->IsPredataPolicy(application_id)) { - SDL_LOG_INFO( - - "Setting " << policy::kDefaultId - << " permissions for application id: " << application_id); + SDL_LOG_INFO("Setting " + << policy::kDefaultId + << " permissions for application id: " << application_id); cache_->SetDefaultPolicy(application_id); } ProcessExternalConsentStatusForApp( diff --git a/src/components/policy/policy_external/src/policy_table/validation.cc b/src/components/policy/policy_external/src/policy_table/validation.cc index 89c5992fab..825fd20b84 100644 --- a/src/components/policy/policy_external/src/policy_table/validation.cc +++ b/src/components/policy/policy_external/src/policy_table/validation.cc @@ -30,7 +30,6 @@ bool VerifyPredefinedApp(ApplicationPolicies::value_type& app_policies) { if (PT_PRELOADED == app_policies.second.GetPolicyTableType() && predefined_request_types.is_cleaned_up()) { SDL_LOG_ERROR( - app_id << " policy RequestTypes is empty after clean-up. Exiting."); return false; } @@ -326,9 +325,8 @@ bool VehicleDataItem::Validate() const { }; if (!ValidateTypes()) { - SDL_LOG_ERROR( - - "Unknown type: " << std::string(type) << " of " << std::string(key)); + SDL_LOG_ERROR("Unknown type: " << std::string(type) << " of " + << std::string(key)); return false; } return true; diff --git a/src/components/policy/policy_external/src/sql_pt_ext_representation.cc b/src/components/policy/policy_external/src/sql_pt_ext_representation.cc index 05b45e5f1c..7147e0949d 100644 --- a/src/components/policy/policy_external/src/sql_pt_ext_representation.cc +++ b/src/components/policy/policy_external/src/sql_pt_ext_representation.cc @@ -1123,7 +1123,6 @@ void SQLPTExtRepresentation::GatherConsentGroup( // Fill data for ExternalConsent consents if (!query.Prepare(sql_pt_ext::kSelectExternalConsentStatusGroup)) { SDL_LOG_WARN( - "Incorrect select statement for ExternalConsent consented groups."); return; } diff --git a/src/components/policy/policy_external/src/sql_pt_representation.cc b/src/components/policy/policy_external/src/sql_pt_representation.cc index 33db994a84..d4458ef2a5 100644 --- a/src/components/policy/policy_external/src/sql_pt_representation.cc +++ b/src/components/policy/policy_external/src/sql_pt_representation.cc @@ -108,9 +108,8 @@ void SQLPTRepresentation::CheckPermissions(const PTString& app_id, utils::dbms::SQLQuery query(db()); if (!query.Prepare(sql_pt::kSelectRpc)) { - SDL_LOG_WARN( - - "Incorrect select statement from rpcs" << query.LastError().text()); + SDL_LOG_WARN("Incorrect select statement from rpcs" + << query.LastError().text()); return; } query.Bind(0, app_id); @@ -379,9 +378,8 @@ InitResult SQLPTRepresentation::Init(const PolicySettings* settings) { utils::dbms::SQLQuery check_first_run(db()); if (check_first_run.Prepare(sql_pt::kIsFirstRun) && check_first_run.Next()) { - SDL_LOG_INFO( - - "Selecting is first run " << check_first_run.GetBoolean(0)); + SDL_LOG_INFO("Selecting is first run " + << check_first_run.GetBoolean(0)); if (check_first_run.GetBoolean(0)) { utils::dbms::SQLQuery set_not_first_run(db()); set_not_first_run.Exec(sql_pt::kSetNotFirstRun); @@ -403,13 +401,11 @@ InitResult SQLPTRepresentation::Init(const PolicySettings* settings) { utils::dbms::SQLQuery query(db()); if (!query.Exec(sql_pt::kCreateSchema)) { SDL_LOG_ERROR( - "Failed creating schema of database: " << query.LastError().text()); return InitResult::FAIL; } if (!query.Exec(sql_pt::kInsertInitData)) { SDL_LOG_ERROR( - "Failed insert init data to database: " << query.LastError().text()); return InitResult::FAIL; } @@ -442,7 +438,6 @@ bool SQLPTRepresentation::Clear() { } if (!query.Exec(sql_pt::kInsertInitData)) { SDL_LOG_ERROR( - "Failed insert init data to database: " << query.LastError().text()); return false; } @@ -457,13 +452,11 @@ bool SQLPTRepresentation::RefreshDB() { } if (!query.Exec(sql_pt::kCreateSchema)) { SDL_LOG_ERROR( - "Failed creating schema of database: " << query.LastError().text()); return false; } if (!query.Exec(sql_pt::kInsertInitData)) { SDL_LOG_ERROR( - "Failed insert init data to database: " << query.LastError().text()); return false; } @@ -2688,7 +2681,6 @@ bool SQLPTRepresentation::InsertVehicleDataItem( if (!query.Exec() || !query.Reset()) { SDL_LOG_ERROR( - "Failed to insert to vehicle data item relations helper table: " << static_cast(param.key) << ". Error: " << query.LastError().text()); diff --git a/src/components/policy/policy_regular/src/cache_manager.cc b/src/components/policy/policy_regular/src/cache_manager.cc index d031b5f027..8f98996687 100644 --- a/src/components/policy/policy_regular/src/cache_manager.cc +++ b/src/components/policy/policy_regular/src/cache_manager.cc @@ -609,7 +609,6 @@ int CacheManager::IgnitionCyclesBeforeExchange() { *pt_->policy_table.module_meta->ignition_cycles_since_last_exchange); current = std::max(last_exch, 0); SDL_LOG_DEBUG( - "IgnitionCyclesBeforeExchange current:" << static_cast(current)); return std::max(limit - current, 0); @@ -647,7 +646,6 @@ bool CacheManager::SetCountersPassedForSuccessfulUpdate( case DAYS_AFTER_EPOCH: *pt_->policy_table.module_meta->pt_exchanged_x_days_after_epoch = value; SDL_LOG_DEBUG( - "SetCountersPassedForSuccessfulUpdate days after epoch:" << value); break; default: diff --git a/src/components/policy/policy_regular/src/policy_helper.cc b/src/components/policy/policy_regular/src/policy_helper.cc index ec84486ea6..a5d66fafba 100644 --- a/src/components/policy/policy_regular/src/policy_helper.cc +++ b/src/components/policy/policy_regular/src/policy_helper.cc @@ -322,7 +322,6 @@ void policy::CheckAppPolicy::NotifySystem( const auto devices_ids = listener.GetDevicesIds(app_policy.first); if (devices_ids.empty()) { SDL_LOG_WARN( - "Couldn't find device info for application id: " << app_policy.first); return; } @@ -616,7 +615,6 @@ bool CheckAppPolicy::IsAppPropertiesChanged( if (!IsKnownAppication(app_policy.first)) { SDL_LOG_DEBUG( - "AppProperties provided for new application: " << app_policy.first); return true; } diff --git a/src/components/policy/policy_regular/src/policy_manager_impl.cc b/src/components/policy/policy_regular/src/policy_manager_impl.cc index 6fbc4e798f..059375322a 100644 --- a/src/components/policy/policy_regular/src/policy_manager_impl.cc +++ b/src/components/policy/policy_regular/src/policy_manager_impl.cc @@ -328,7 +328,6 @@ PolicyManager::PtProcessingResult PolicyManagerImpl::LoadPT( const std::string& file, const BinaryMessage& pt_content) { SDL_LOG_INFO("LoadPT of size " << pt_content.size()); SDL_LOG_DEBUG( - "PTU content is: " << std::string(pt_content.begin(), pt_content.end())); #if defined USE_HMI_PTU_DECRYPTION && defined PROPRIETARY_MODE @@ -386,7 +385,6 @@ PolicyManager::PtProcessingResult PolicyManagerImpl::LoadPT( // Replace current data with updated if (!cache_->ApplyUpdate(*pt_update)) { SDL_LOG_WARN( - "Unsuccessful save of updated policy table, trying another exchange"); return PtProcessingResult::kNewPtRequired; } @@ -1023,7 +1021,6 @@ void PolicyManagerImpl::CheckPendingPermissionsChanges( app_permissions_diff_.find(policy_app_id); if (app_permissions_diff_.end() == it_pending) { SDL_LOG_WARN( - "No pending permissions had been found for appID: " << policy_app_id); return; } @@ -1041,7 +1038,6 @@ void PolicyManagerImpl::CheckPendingPermissionsChanges( for (; it_groups != it_end_groups; ++it_groups) { if (policy::kGroupUndefined == it_groups->state) { SDL_LOG_DEBUG( - "Unconsented groups still present for appID: " << policy_app_id); it_pending->second.appPermissionsConsentNeeded = true; return; @@ -1049,7 +1045,6 @@ void PolicyManagerImpl::CheckPendingPermissionsChanges( } SDL_LOG_DEBUG( - "Unconsented groups not present anymore for appID: " << policy_app_id); it_pending->second.appPermissionsConsentNeeded = false; return; diff --git a/src/components/policy/policy_regular/src/policy_table/validation.cc b/src/components/policy/policy_regular/src/policy_table/validation.cc index c98a0ed5f0..dbc44f01ab 100644 --- a/src/components/policy/policy_regular/src/policy_table/validation.cc +++ b/src/components/policy/policy_regular/src/policy_table/validation.cc @@ -288,9 +288,8 @@ bool VehicleDataItem::Validate() const { }; if (!ValidateTypes()) { - SDL_LOG_ERROR( - - "Unknown type: " << std::string(type) << " of " << std::string(key)); + SDL_LOG_ERROR("Unknown type: " << std::string(type) << " of " + << std::string(key)); return false; } return true; diff --git a/src/components/policy/policy_regular/src/sql_pt_representation.cc b/src/components/policy/policy_regular/src/sql_pt_representation.cc index 09f9c28116..7193a06bdb 100644 --- a/src/components/policy/policy_regular/src/sql_pt_representation.cc +++ b/src/components/policy/policy_regular/src/sql_pt_representation.cc @@ -92,9 +92,8 @@ void SQLPTRepresentation::CheckPermissions(const PTString& app_id, utils::dbms::SQLQuery query(db()); if (!query.Prepare(sql_pt::kSelectRpc)) { - SDL_LOG_WARN( - - "Incorrect select statement from rpcs" << query.LastError().text()); + SDL_LOG_WARN("Incorrect select statement from rpcs" + << query.LastError().text()); return; } query.Bind(0, app_id); @@ -363,9 +362,8 @@ InitResult SQLPTRepresentation::Init(const PolicySettings* settings) { utils::dbms::SQLQuery check_first_run(db()); if (check_first_run.Prepare(sql_pt::kIsFirstRun) && check_first_run.Next()) { - SDL_LOG_INFO( - - "Selecting is first run " << check_first_run.GetBoolean(0)); + SDL_LOG_INFO("Selecting is first run " + << check_first_run.GetBoolean(0)); if (check_first_run.GetBoolean(0)) { utils::dbms::SQLQuery set_not_first_run(db()); set_not_first_run.Exec(sql_pt::kSetNotFirstRun); @@ -387,13 +385,11 @@ InitResult SQLPTRepresentation::Init(const PolicySettings* settings) { utils::dbms::SQLQuery query(db()); if (!query.Exec(sql_pt::kCreateSchema)) { SDL_LOG_ERROR( - "Failed creating schema of database: " << query.LastError().text()); return InitResult::FAIL; } if (!query.Exec(sql_pt::kInsertInitData)) { SDL_LOG_ERROR( - "Failed insert init data to database: " << query.LastError().text()); return InitResult::FAIL; } @@ -426,7 +422,6 @@ bool SQLPTRepresentation::Clear() { } if (!query.Exec(sql_pt::kInsertInitData)) { SDL_LOG_ERROR( - "Failed insert init data to database: " << query.LastError().text()); return false; } @@ -441,13 +436,11 @@ bool SQLPTRepresentation::RefreshDB() { } if (!query.Exec(sql_pt::kCreateSchema)) { SDL_LOG_ERROR( - "Failed creating schema of database: " << query.LastError().text()); return false; } if (!query.Exec(sql_pt::kInsertInitData)) { SDL_LOG_ERROR( - "Failed insert init data to database: " << query.LastError().text()); return false; } @@ -2746,7 +2739,6 @@ bool SQLPTRepresentation::InsertVehicleDataItem( if (!query.Exec() || !query.Reset()) { SDL_LOG_ERROR( - "Failed to insert to vehicle data item relations helper table: " << static_cast(param.key) << ". Error: " << query.LastError().text()); diff --git a/src/components/protocol_handler/src/protocol_handler_impl.cc b/src/components/protocol_handler/src/protocol_handler_impl.cc index 36e98e723c..7d83d6cd85 100644 --- a/src/components/protocol_handler/src/protocol_handler_impl.cc +++ b/src/components/protocol_handler/src/protocol_handler_impl.cc @@ -139,7 +139,6 @@ ProtocolHandlerImpl::ProtocolHandlerImpl( } } else { SDL_LOG_WARN( - "Malformed message filtering is disabled." << "Connection will be close on first malformed message detection"); } @@ -320,7 +319,6 @@ void ProtocolHandlerImpl::SendStartSessionAck( ¶ms, strings::protocol_version, protocol_version_string); UNUSED(protocol_ver_written); SDL_LOG_DEBUG( - "Protocol version parameter was written to bson params: " << protocol_ver_written << "; Value: " << bson_object_get_string(¶ms, strings::protocol_version)); @@ -346,7 +344,6 @@ void ProtocolHandlerImpl::SendStartSessionAck( sizeof(secondaryTransport)); secondaryTransport[sizeof(secondaryTransport) - 1] = '\0'; SDL_LOG_DEBUG( - "Adding " << secondaryTransport << " to secondaryTransports parameter of StartSessionAck"); @@ -387,7 +384,6 @@ void ProtocolHandlerImpl::SendStartSessionAck( send_transport_update_event = true; } else { SDL_LOG_DEBUG( - "Multiple transports feature is disabled by configuration"); // In this case, we must remember that this session will never have // a secondary transport. @@ -396,7 +392,6 @@ void ProtocolHandlerImpl::SendStartSessionAck( } } else { SDL_LOG_WARN( - "Failed to set up secondary transport and service type params"); connection_handler_.SetSecondaryTransportID(session_id, kDisabledSecondary); @@ -669,7 +664,6 @@ void ProtocolHandlerImpl::SendEndServicePrivate(int32_t primary_connection_id, << static_cast(session_id)); } else { SDL_LOG_WARN( - "SendEndServicePrivate is failed connection or session does not exist"); } } @@ -1451,7 +1445,6 @@ RESULT_CODE ProtocolHandlerImpl::HandleSingleFrameMessage( SDL_LOG_AUTO_TRACE(); SDL_LOG_DEBUG( - "FRAME_TYPE_SINGLE message of size " << packet->data_size() << "; message " << ConvertPacketDataToString(packet->data(), packet->data_size())); @@ -1706,7 +1699,6 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession( const ProtocolFramePtr packet) { SDL_LOG_AUTO_TRACE(); SDL_LOG_DEBUG( - "Protocol version:" << static_cast(packet->protocol_version())); const ServiceType service_type = ServiceTypeFromByte(packet->service_type()); @@ -2058,9 +2050,8 @@ void ProtocolHandlerImpl::NotifySessionStarted( RESULT_CODE ProtocolHandlerImpl::HandleControlMessageHeartBeat( const ProtocolPacket& packet) { const ConnectionID connection_id = packet.connection_id(); - SDL_LOG_DEBUG( - - "Sending heart beat acknowledgment for connection " << connection_id); + SDL_LOG_DEBUG("Sending heart beat acknowledgment for connection " + << connection_id); uint8_t protocol_version; if (session_observer_.ProtocolVersionUsed( connection_id, packet.session_id(), protocol_version)) { @@ -2149,9 +2140,8 @@ bool ProtocolHandlerImpl::TrackMalformedMessage(const uint32_t& connection_key, << malformed_message_frequency); if (!get_settings().malformed_message_filtering() || malformed_message_frequency > malformed_frequency_count) { - SDL_LOG_WARN( - - "Malformed frequency of " << connection_key << " is marked as high."); + SDL_LOG_WARN("Malformed frequency of " << connection_key + << " is marked as high."); session_observer_.OnMalformedMessageCallback(connection_key); malformed_message_meter_.RemoveIdentifier(connection_key); return true; @@ -2254,9 +2244,8 @@ RESULT_CODE ProtocolHandlerImpl::EncryptFrame(ProtocolFramePtr packet) { security_manager::SSLContext* context = session_observer_.GetSSLContext( connection_key, ServiceTypeFromByte(packet->service_type())); - SDL_LOG_DEBUG( - - "Protection flag is: " << packet->protection_flag() << std::boolalpha); + SDL_LOG_DEBUG("Protection flag is: " << packet->protection_flag() + << std::boolalpha); if ((!context || !context->IsInitCompleted()) || !packet->protection_flag()) { SDL_LOG_DEBUG("Ecryption is skipped!"); return RESULT_OK; @@ -2498,7 +2487,6 @@ const bool ProtocolHandlerImpl::ParseSecondaryTransportConfiguration( secondary_transport_types = settings_.secondary_transports_for_wifi(); } else { SDL_LOG_ERROR( - "Bad or unknown device type in ParseSecondaryTransportConfiguration"); return false; } @@ -2562,13 +2550,11 @@ void ProtocolHandlerImpl::GenerateSecondaryTransportsForStartSessionAck( } else if (transport_type.CompareIgnoreCase("Bluetooth")) { if (device_is_ios) { SDL_LOG_TRACE( - "Adding IAP_BLUETOOTH to secondaryTransports for StartSessionAck"); secondaryTransports.push_back("IAP_BLUETOOTH"); } if (device_is_android) { SDL_LOG_TRACE( - "Adding SPP_BLUETOOTH to secondaryTransports for StartSessionAck"); secondaryTransports.push_back("SPP_BLUETOOTH"); } @@ -2608,9 +2594,8 @@ void ProtocolHandlerImpl::GenerateServiceTransportsForStartSessionAck( std::vector::const_iterator it = service_transports.begin(); for (; it != service_transports.end(); ++it) { const utils::custom_string::CustomString transport(*it); - SDL_LOG_TRACE( - - "Service Allowed to run on " << transport.c_str() << " transport"); + SDL_LOG_TRACE("Service Allowed to run on " << transport.c_str() + << " transport"); if (!fPrimaryAdded && (transport.CompareIgnoreCase(primary_connection_type.c_str()) || diff --git a/src/components/protocol_handler/src/protocol_packet.cc b/src/components/protocol_handler/src/protocol_packet.cc index bd052c8660..db2f124c53 100644 --- a/src/components/protocol_handler/src/protocol_packet.cc +++ b/src/components/protocol_handler/src/protocol_packet.cc @@ -359,12 +359,11 @@ RESULT_CODE ProtocolPacket::ProtocolHeaderValidator::validate( if (header.dataSize > payload_size || (FRAME_TYPE_CONTROL != header.frameType && header.dataSize == 0u)) { UNUSED(StringifyFrameType); - SDL_LOG_WARN( - - "Packet data size of " - << StringifyFrameType(header.frameType) - << " frame must be in range (0, payload_size=" << payload_size - << "], but actual value is " << header.dataSize); + SDL_LOG_WARN("Packet data size of " + << StringifyFrameType(header.frameType) + << " frame must be in range (0, payload_size=" + << payload_size << "], but actual value is " + << header.dataSize); return RESULT_FAIL; } } break; diff --git a/src/components/resumption/src/last_state_impl.cc b/src/components/resumption/src/last_state_impl.cc index f34d793c49..185535c50d 100644 --- a/src/components/resumption/src/last_state_impl.cc +++ b/src/components/resumption/src/last_state_impl.cc @@ -81,9 +81,8 @@ void LastStateImpl::SaveToFileSystem() { const std::vector char_vector_pdata(styled_string.begin(), styled_string.end()); DCHECK(file_system::CreateDirectoryRecursively(app_storage_folder_)); - SDL_LOG_INFO( - - "LastState::SaveToFileSystem " << app_info_storage_ << styled_string); + SDL_LOG_INFO("LastState::SaveToFileSystem " << app_info_storage_ + << styled_string); DCHECK(file_system::Write(app_info_storage_, char_vector_pdata)); } diff --git a/src/components/security_manager/include/security_manager/crypto_manager_settings_impl.h b/src/components/security_manager/include/security_manager/crypto_manager_settings_impl.h index ae0866705a..f170ef90a7 100644 --- a/src/components/security_manager/include/security_manager/crypto_manager_settings_impl.h +++ b/src/components/security_manager/include/security_manager/crypto_manager_settings_impl.h @@ -39,7 +39,6 @@ class CryptoManagerSettingsImpl : public CryptoManagerSettings { } SDL_LOG_ERROR( - "Unknown protocol: " << profile_.security_manager_protocol_name()); return static_cast(-1); } diff --git a/src/components/security_manager/src/crypto_manager_impl.cc b/src/components/security_manager/src/crypto_manager_impl.cc index 845485a6c3..b4b4d01485 100644 --- a/src/components/security_manager/src/crypto_manager_impl.cc +++ b/src/components/security_manager/src/crypto_manager_impl.cc @@ -154,9 +154,8 @@ bool CryptoManagerImpl::Init() { } SDL_LOG_DEBUG("Peer verification " << (get_settings().verify_peer() ? "enabled" : "disabled")); - SDL_LOG_DEBUG( - - "CA certificate file is \"" << get_settings().ca_cert_path() << '"'); + SDL_LOG_DEBUG("CA certificate file is \"" << get_settings().ca_cert_path() + << '"'); #if OPENSSL_VERSION_NUMBER < CONST_SSL_METHOD_MINIMAL_VERSION SSL_METHOD* method; @@ -387,9 +386,8 @@ bool CryptoManagerImpl::SaveCertificateData( UNUSED(cert_guard); if (1 != BIO_reset(bio_cert)) { - SDL_LOG_WARN( - - "Unabled to reset BIO in order to read private key, " << LastError()); + SDL_LOG_WARN("Unabled to reset BIO in order to read private key, " + << LastError()); } EVP_PKEY* pkey = NULL; diff --git a/src/components/security_manager/src/security_manager_impl.cc b/src/components/security_manager/src/security_manager_impl.cc index 50a58e0486..1bf10c4f7c 100644 --- a/src/components/security_manager/src/security_manager_impl.cc +++ b/src/components/security_manager/src/security_manager_impl.cc @@ -516,9 +516,8 @@ bool SecurityManagerImpl::ProcessHandshakeData( const uint32_t seqNumber = inMessage->get_header().seq_number; const uint32_t connection_key = inMessage->get_connection_key(); - SDL_LOG_DEBUG( - - "Received " << inMessage->get_data_size() << " bytes handshake data "); + SDL_LOG_DEBUG("Received " << inMessage->get_data_size() + << " bytes handshake data "); if (!inMessage->get_data_size()) { const std::string error_text("SendHandshakeData: null arguments size."); diff --git a/src/components/telemetry_monitor/src/protocol_handler_observer.cc b/src/components/telemetry_monitor/src/protocol_handler_observer.cc index 7752e6fb94..9a89973e82 100644 --- a/src/components/telemetry_monitor/src/protocol_handler_observer.cc +++ b/src/components/telemetry_monitor/src/protocol_handler_observer.cc @@ -50,7 +50,6 @@ void ProtocolHandlerObserver::StartMessageProcess( } if (time_starts.find(message_id) != time_starts.end()) { SDL_LOG_DEBUG( - "Already waiting for stop processing for Message ID: " << message_id); return; } diff --git a/src/components/transport_manager/src/bluetooth/bluetooth_device.cc b/src/components/transport_manager/src/bluetooth/bluetooth_device.cc index 91f561a7d9..5e19e32ea3 100644 --- a/src/components/transport_manager/src/bluetooth/bluetooth_device.cc +++ b/src/components/transport_manager/src/bluetooth/bluetooth_device.cc @@ -69,7 +69,6 @@ bool BluetoothDevice::GetRfcommChannel(const ApplicationHandle app_handle, std::find(rfcomm_channels_.begin(), rfcomm_channels_.end(), channel); if (it == rfcomm_channels_.end()) { SDL_LOG_TRACE( - "exit with FALSE. Condition: channel not found in RfcommChannelVector"); return false; } diff --git a/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc b/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc index b527bf1ef0..87012c0690 100644 --- a/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc +++ b/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc @@ -92,9 +92,8 @@ bool BluetoothSocketConnection::Establish(ConnectError** error) { do { rfcomm_socket = socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM); if (-1 == rfcomm_socket) { - SDL_LOG_ERROR_WITH_ERRNO( - - "Failed to create RFCOMM socket for device " << device_handle()); + SDL_LOG_ERROR_WITH_ERRNO("Failed to create RFCOMM socket for device " + << device_handle()); *error = new ConnectError(); SDL_LOG_TRACE("exit with FALSE"); return false; @@ -117,7 +116,6 @@ bool BluetoothSocketConnection::Establish(ConnectError** error) { SDL_LOG_INFO("rfcomm Connect attempts finished"); if (0 != connect_status) { SDL_LOG_DEBUG( - "Failed to Connect to remote device " << BluetoothDevice::GetUniqueDeviceId(remoteSocketAddress.rc_bdaddr) << " for session " << this); diff --git a/src/components/transport_manager/src/cloud/cloud_websocket_connection_factory.cc b/src/components/transport_manager/src/cloud/cloud_websocket_connection_factory.cc index a5d25c56c1..27e14b4d33 100644 --- a/src/components/transport_manager/src/cloud/cloud_websocket_connection_factory.cc +++ b/src/components/transport_manager/src/cloud/cloud_websocket_connection_factory.cc @@ -67,7 +67,6 @@ TransportAdapter::Error CloudWebsocketConnectionFactory::CreateConnection( TransportAdapter::Error error = ws_connection->Start(); if (TransportAdapter::OK != error) { SDL_LOG_ERROR( - "Cloud Websocket connection::Start() failed with error: " << error); } return error; diff --git a/src/components/transport_manager/src/cloud/websocket_client_connection.cc b/src/components/transport_manager/src/cloud/websocket_client_connection.cc index c3eba1d905..b190e73cb6 100644 --- a/src/components/transport_manager/src/cloud/websocket_client_connection.cc +++ b/src/components/transport_manager/src/cloud/websocket_client_connection.cc @@ -95,7 +95,6 @@ TransportAdapter::Error WebsocketClientConnection::Start() { SDL_LOG_DEBUG( "Cloud app authentication token: " << cloud_properties.auth_token); SDL_LOG_DEBUG( - "Cloud app transport type: " << cloud_properties.cloud_transport_type); SDL_LOG_DEBUG("Cloud app hybrid app preference: " << cloud_properties.hybrid_app_preference); @@ -163,9 +162,8 @@ TransportAdapter::Error WebsocketClientConnection::Start() { #endif // ENABLE_SECURITY if (ec) { std::string str_err = "ErrorMessage: " + ec.message(); - SDL_LOG_ERROR( - - "Could not complete handshake with host/port: " << host << ":" << port); + SDL_LOG_ERROR("Could not complete handshake with host/port: " << host << ":" + << port); SDL_LOG_ERROR(str_err); return TransportAdapter::FAIL; } @@ -202,9 +200,8 @@ TransportAdapter::Error WebsocketClientConnection::Start() { boost::asio::post(io_pool_, [&]() { ioc_.run(); }); - SDL_LOG_DEBUG( - - "Successfully started websocket connection @: " << host << ":" << port); + SDL_LOG_DEBUG("Successfully started websocket connection @: " << host << ":" + << port); return TransportAdapter::OK; } diff --git a/src/components/transport_manager/src/tcp/platform_specific/linux/platform_specific_network_interface_listener.cc b/src/components/transport_manager/src/tcp/platform_specific/linux/platform_specific_network_interface_listener.cc index 8da69b5f6b..96ea5df917 100644 --- a/src/components/transport_manager/src/tcp/platform_specific/linux/platform_specific_network_interface_listener.cc +++ b/src/components/transport_manager/src/tcp/platform_specific/linux/platform_specific_network_interface_listener.cc @@ -417,17 +417,15 @@ bool PlatformSpecificNetworkInterfaceListener::UpdateStatus( switch (type) { case RTM_NEWLINK: { const std::string& ifname = GetInterfaceName(it->if_index); - SDL_LOG_DEBUG( - - "netlink event: interface " << ifname << " created or updated"); + SDL_LOG_DEBUG("netlink event: interface " << ifname + << " created or updated"); status.SetName(ifname); status.SetFlags(it->flags); break; } case RTM_DELLINK: - SDL_LOG_DEBUG( - - "netlink event: interface " << status.GetName() << " removed"); + SDL_LOG_DEBUG("netlink event: interface " << status.GetName() + << " removed"); status_table_.erase(it->if_index); break; case RTM_NEWADDR: { diff --git a/src/components/transport_manager/src/tcp/tcp_client_listener.cc b/src/components/transport_manager/src/tcp/tcp_client_listener.cc index 4010b2b628..6aaec5d659 100644 --- a/src/components/transport_manager/src/tcp/tcp_client_listener.cc +++ b/src/components/transport_manager/src/tcp/tcp_client_listener.cc @@ -252,7 +252,6 @@ void TcpClientListener::Loop() { if (ret < 0) { if (errno != EINTR && errno != EAGAIN && errno != EWOULDBLOCK) { SDL_LOG_WARN( - "Failed to read from pipe, aborting TCP server socket loop."); break; } @@ -497,9 +496,8 @@ void TcpClientListener::OnIPAddressUpdated(const std::string ipv4_addr, if (IsListeningOnSpecificInterface()) { if (!current_ip_address_.empty()) { // the server socket is running, terminate it - SDL_LOG_DEBUG( - - "Stopping current TCP server socket on " << designated_interface_); + SDL_LOG_DEBUG("Stopping current TCP server socket on " + << designated_interface_); StopOnNetworkInterface(); } if (!ipv4_addr.empty()) { diff --git a/src/components/transport_manager/src/tcp/tcp_connection_factory.cc b/src/components/transport_manager/src/tcp/tcp_connection_factory.cc index 42da741611..5b02c3907e 100644 --- a/src/components/transport_manager/src/tcp/tcp_connection_factory.cc +++ b/src/components/transport_manager/src/tcp/tcp_connection_factory.cc @@ -52,9 +52,8 @@ TransportAdapter::Error TcpConnectionFactory::Init() { TransportAdapter::Error TcpConnectionFactory::CreateConnection( const DeviceUID& device_uid, const ApplicationHandle& app_handle) { SDL_LOG_AUTO_TRACE(); - SDL_LOG_DEBUG( - - "DeviceUID: " << &device_uid << ", ApplicationHandle: " << &app_handle); + SDL_LOG_DEBUG("DeviceUID: " << &device_uid + << ", ApplicationHandle: " << &app_handle); std::shared_ptr connection = std::make_shared( device_uid, app_handle, controller_); diff --git a/src/components/transport_manager/src/tcp/tcp_device.cc b/src/components/transport_manager/src/tcp/tcp_device.cc index bccafd934f..6d0b87ea6c 100644 --- a/src/components/transport_manager/src/tcp/tcp_device.cc +++ b/src/components/transport_manager/src/tcp/tcp_device.cc @@ -56,9 +56,8 @@ TcpDevice::TcpDevice(const in_addr_t& in_addr, , last_handle_(0) { SDL_LOG_AUTO_TRACE(); SDL_LOG_DEBUG("Device created with transport switch emulation support."); - SDL_LOG_DEBUG( - - "Device parameters: " << device_uid << " / " << transport_switch_id); + SDL_LOG_DEBUG("Device parameters: " << device_uid << " / " + << transport_switch_id); } #endif // ENABLE_IAP2EMULATION @@ -69,7 +68,6 @@ bool TcpDevice::IsSameAs(const Device* other) const { if (other_tcp_device && other_tcp_device->in_addr_ == in_addr_) { SDL_LOG_TRACE( - "exit with TRUE. Condition: other_tcp_device->in_addr_ == in_addr_"); return true; } else { diff --git a/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc b/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc index 6a16e81d18..447aa6c8ff 100644 --- a/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc +++ b/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc @@ -104,16 +104,14 @@ TransportAdapterImpl::~TransportAdapterImpl() { SDL_LOG_DEBUG("device_scanner_ deleted."); } if (server_connection_factory_) { - SDL_LOG_DEBUG( - - "Deleting server_connection_factory " << server_connection_factory_); + SDL_LOG_DEBUG("Deleting server_connection_factory " + << server_connection_factory_); delete server_connection_factory_; SDL_LOG_DEBUG("server_connection_factory deleted."); } if (client_connection_listener_) { - SDL_LOG_DEBUG( - - "Deleting client_connection_listener_ " << client_connection_listener_); + SDL_LOG_DEBUG("Deleting client_connection_listener_ " + << client_connection_listener_); delete client_connection_listener_; SDL_LOG_DEBUG("client_connection_listener_ deleted."); } @@ -200,9 +198,8 @@ TransportAdapter::Error TransportAdapterImpl::SearchDevices() { TransportAdapter::Error TransportAdapterImpl::Connect( const DeviceUID& device_id, const ApplicationHandle& app_handle) { - SDL_LOG_TRACE( - - "enter. DeviceUID " << device_id << " ApplicationHandle " << app_handle); + SDL_LOG_TRACE("enter. DeviceUID " << device_id << " ApplicationHandle " + << app_handle); if (server_connection_factory_ == 0) { SDL_LOG_TRACE("exit with NOT_SUPPORTED"); return NOT_SUPPORTED; @@ -342,9 +339,8 @@ void TransportAdapterImpl::ConnectionStatusUpdated(DeviceSptr device, TransportAdapter::Error TransportAdapterImpl::Disconnect( const DeviceUID& device_id, const ApplicationHandle& app_handle) { - SDL_LOG_TRACE( - - "enter. device_id: " << &device_id << ", device_id: " << &device_id); + SDL_LOG_TRACE("enter. device_id: " << &device_id + << ", device_id: " << &device_id); if (!initialised_) { SDL_LOG_TRACE("exit with BAD_STATE"); return BAD_STATE; @@ -745,9 +741,8 @@ void TransportAdapterImpl::DisconnectDone(const DeviceUID& device_handle, SDL_LOG_AUTO_TRACE(); const DeviceUID device_uid = device_handle; const ApplicationHandle app_uid = app_handle; - SDL_LOG_TRACE( - - "enter. device_id: " << &device_uid << ", app_handle: " << &app_uid); + SDL_LOG_TRACE("enter. device_id: " << &device_uid + << ", app_handle: " << &app_uid); DeviceSptr device = FindDevice(device_handle); if (!device) { SDL_LOG_WARN("Device: uid " << &device_uid << " not found"); @@ -867,9 +862,8 @@ void TransportAdapterImpl::DeviceSwitched(const DeviceUID& device_handle) { ConnectionSPtr TransportAdapterImpl::FindPendingConnection( const DeviceUID& device_id, const ApplicationHandle& app_handle) const { - SDL_LOG_TRACE( - - "enter. device_id: " << &device_id << ", app_handle: " << &app_handle); + SDL_LOG_TRACE("enter. device_id: " << &device_id + << ", app_handle: " << &app_handle); ConnectionSPtr connection; connections_lock_.AcquireForReading(); ConnectionMap::const_iterator it = @@ -930,9 +924,8 @@ void TransportAdapterImpl::ConnectPending(const DeviceUID& device_id, void TransportAdapterImpl::ConnectDone(const DeviceUID& device_id, const ApplicationHandle& app_handle) { - SDL_LOG_TRACE( - - "enter. device_id: " << &device_id << ", app_handle: " << &app_handle); + SDL_LOG_TRACE("enter. device_id: " << &device_id + << ", app_handle: " << &app_handle); connections_lock_.AcquireForReading(); ConnectionMap::iterator it_conn = connections_.find(std::make_pair(device_id, app_handle)); @@ -1184,9 +1177,8 @@ bool TransportAdapterImpl::ToBeAutoDisconnected(DeviceSptr device) const { ConnectionSPtr TransportAdapterImpl::FindEstablishedConnection( const DeviceUID& device_id, const ApplicationHandle& app_handle) const { - SDL_LOG_TRACE( - - "enter. device_id: " << &device_id << ", app_handle: " << &app_handle); + SDL_LOG_TRACE("enter. device_id: " << &device_id + << ", app_handle: " << &app_handle); ConnectionSPtr connection; connections_lock_.AcquireForReading(); ConnectionMap::const_iterator it = diff --git a/src/components/transport_manager/src/transport_manager_impl.cc b/src/components/transport_manager/src/transport_manager_impl.cc index eb1b63fb96..ee6398db44 100644 --- a/src/components/transport_manager/src/transport_manager_impl.cc +++ b/src/components/transport_manager/src/transport_manager_impl.cc @@ -190,7 +190,6 @@ int TransportManagerImpl::ConnectDevice(const DeviceHandle device_handle) { if (!this->is_initialized_) { SDL_LOG_ERROR("TransportManager is not initialized."); SDL_LOG_TRACE( - "exit with E_TM_IS_NOT_INITIALIZED. Condition: !this->is_initialized_"); return E_TM_IS_NOT_INITIALIZED; } @@ -234,7 +233,6 @@ int TransportManagerImpl::DisconnectDevice(const DeviceHandle device_handle) { if (!this->is_initialized_) { SDL_LOG_ERROR("TransportManager is not initialized."); SDL_LOG_TRACE( - "exit with E_TM_IS_NOT_INITIALIZED. Condition: !this->is_initialized_"); return E_TM_IS_NOT_INITIALIZED; } @@ -259,7 +257,6 @@ int TransportManagerImpl::Disconnect(const ConnectionUID cid) { if (!this->is_initialized_) { SDL_LOG_ERROR("TransportManager is not initialized."); SDL_LOG_TRACE( - "exit with E_TM_IS_NOT_INITIALIZED. Condition: !this->is_initialized_"); return E_TM_IS_NOT_INITIALIZED; } @@ -317,7 +314,6 @@ int TransportManagerImpl::DisconnectForce(const ConnectionUID cid) { const ConnectionInternal* connection = GetConnection(cid); if (NULL == connection) { SDL_LOG_ERROR( - "TransportManagerImpl::DisconnectForce: Connection does not exist."); SDL_LOG_TRACE("exit with E_INVALID_HANDLE. Condition: NULL == connection"); return E_INVALID_HANDLE; @@ -411,7 +407,6 @@ int TransportManagerImpl::SendMessageToDevice( if (connection->shutdown_) { SDL_LOG_ERROR( - "TransportManagerImpl::Disconnect: Connection is to shut down."); SDL_LOG_TRACE( "exit with E_CONNECTION_IS_TO_SHUTDOWN. Condition: " @@ -522,7 +517,6 @@ int TransportManagerImpl::SearchDevices() { if (!this->is_initialized_) { SDL_LOG_ERROR("TM is not initialized"); SDL_LOG_TRACE( - "exit with E_TM_IS_NOT_INITIALIZED. Condition: !this->is_initialized_"); return E_TM_IS_NOT_INITIALIZED; } @@ -1005,9 +999,8 @@ bool TransportManagerImpl::UpdateDeviceMapping( item = device_to_adapter_map_.begin(); } - SDL_LOG_DEBUG( - - "After cleanup. Device map size is " << device_to_adapter_map_.size()); + SDL_LOG_DEBUG("After cleanup. Device map size is " + << device_to_adapter_map_.size()); for (DeviceList::const_iterator it = adapter_device_list.begin(); it != adapter_device_list.end(); @@ -1031,9 +1024,8 @@ bool TransportManagerImpl::UpdateDeviceMapping( RaiseEvent(&TransportManagerListener::OnDeviceFound, info); } - SDL_LOG_DEBUG( - - "After update. Device map size is " << device_to_adapter_map_.size()); + SDL_LOG_DEBUG("After update. Device map size is " + << device_to_adapter_map_.size()); return true; } diff --git a/src/components/transport_manager/src/usb/libusb/usb_connection.cc b/src/components/transport_manager/src/usb/libusb/usb_connection.cc index fbe217f243..278a1b1f05 100644 --- a/src/components/transport_manager/src/usb/libusb/usb_connection.cc +++ b/src/components/transport_manager/src/usb/libusb/usb_connection.cc @@ -108,10 +108,8 @@ bool UsbConnection::PostInTransfer() { const int libusb_ret = libusb_submit_transfer(in_transfer_); if (LIBUSB_SUCCESS != libusb_ret) { SDL_LOG_ERROR( - "libusb_submit_transfer failed: " << libusb_error_name(libusb_ret)); SDL_LOG_TRACE( - "exit with FALSE. Condition: LIBUSB_SUCCESS != libusb_submit_transfer"); return false; } @@ -192,7 +190,6 @@ TransportAdapter::Error UsbConnection::PostOutTransfer() { const int libusb_ret = libusb_submit_transfer(out_transfer_); if (LIBUSB_SUCCESS != libusb_ret) { SDL_LOG_ERROR( - "libusb_submit_transfer failed: " << libusb_error_name(libusb_ret)); SDL_LOG_TRACE("exit with TransportAdapter::FAIL. Condition: " << "LIBUSB_SUCCESS != libusb_fill_bulk_transfer"); @@ -211,7 +208,6 @@ void UsbConnection::OnOutTransfer(libusb_transfer* transfer) { bytes_sent_ += transfer->actual_length; if (current_out_message_->data_size() == bytes_sent_) { SDL_LOG_DEBUG( - "USB out transfer, data sent: " << current_out_message_.get()); controller_->DataSendDone( device_uid_, app_handle_, current_out_message_); @@ -219,7 +215,6 @@ void UsbConnection::OnOutTransfer(libusb_transfer* transfer) { } } else { SDL_LOG_ERROR( - "USB out transfer failed: " << libusb_error_name(transfer->status)); controller_->DataSendFailed( device_uid_, app_handle_, current_out_message_, DataSendError()); diff --git a/src/components/transport_manager/src/usb/libusb/usb_handler.cc b/src/components/transport_manager/src/usb/libusb/usb_handler.cc index 09b1a017bb..3b459eb0af 100644 --- a/src/components/transport_manager/src/usb/libusb/usb_handler.cc +++ b/src/components/transport_manager/src/usb/libusb/usb_handler.cc @@ -163,7 +163,6 @@ void UsbHandler::DeviceArrived(libusb_device* device_libusb) { libusb_ret = libusb_get_configuration(device_handle_libusb, &configuration); if (LIBUSB_SUCCESS != libusb_ret) { SDL_LOG_INFO( - "libusb_get_configuration failed: " << libusb_error_name(libusb_ret)); SDL_LOG_TRACE("exit. Condition: LIBUSB_SUCCESS != libusb_ret"); return; @@ -174,7 +173,6 @@ void UsbHandler::DeviceArrived(libusb_device* device_libusb) { libusb_set_configuration(device_handle_libusb, kUsbConfiguration); if (LIBUSB_SUCCESS != libusb_ret) { SDL_LOG_INFO( - "libusb_set_configuration failed: " << libusb_error_name(libusb_ret)); SDL_LOG_TRACE("exit. Condition: LIBUSB_SUCCESS != libusb_ret"); return; @@ -184,7 +182,6 @@ void UsbHandler::DeviceArrived(libusb_device* device_libusb) { libusb_ret = libusb_claim_interface(device_handle_libusb, 0); if (LIBUSB_SUCCESS != libusb_ret) { SDL_LOG_INFO( - "libusb_claim_interface failed: " << libusb_error_name(libusb_ret)); CloseDeviceHandle(device_handle_libusb); SDL_LOG_TRACE("exit. Condition: LIBUSB_SUCCESS != libusb_ret"); @@ -449,7 +446,6 @@ void UsbHandler::SubmitControlTransfer( const int libusb_ret = libusb_submit_transfer(libusb_transfer); if (LIBUSB_SUCCESS != libusb_ret) { SDL_LOG_ERROR( - "libusb_submit_transfer failed: " << libusb_error_name(libusb_ret)); libusb_free_transfer(libusb_transfer); sequence_state->Finish(); diff --git a/src/components/utils/src/file_system.cc b/src/components/utils/src/file_system.cc index 5985475983..f0c838a7f9 100644 --- a/src/components/utils/src/file_system.cc +++ b/src/components/utils/src/file_system.cc @@ -73,9 +73,8 @@ uint64_t file_system::FileSize(const std::string& path) { const uint64_t fsize = static_cast(fs::file_size(path, ec)); if (ec) { - SDL_LOG_ERROR_WITH_ERRNO( - - "Unable to get file size: '" << path << "', reason: " << ec.message()); + SDL_LOG_ERROR_WITH_ERRNO("Unable to get file size: '" + << path << "', reason: " << ec.message()); return 0; } return fsize; @@ -173,9 +172,8 @@ bool file_system::IsDirectory(const std::string& name) { bool file_system::DirectoryExists(const std::string& name) { SDL_LOG_AUTO_TRACE(); const bool exists = FileExists(name) && IsDirectory(name); - SDL_LOG_DEBUG( - - "Directory '" << name << "' " << (exists ? "exists" : "NOT exists")); + SDL_LOG_DEBUG("Directory '" << name << "' " + << (exists ? "exists" : "NOT exists")); return exists; } @@ -304,10 +302,9 @@ void file_system::remove_directory_content(const std::string& directory_name) { while (dir_iter != end) { fs::remove_all(dir_iter->path(), ec); if (ec) { - SDL_LOG_ERROR_WITH_ERRNO( - - "Unable to remove file: " << dir_iter->path().string() << " reason " - << ec.message()); + SDL_LOG_ERROR_WITH_ERRNO("Unable to remove file: " + << dir_iter->path().string() << " reason " + << ec.message()); } dir_iter.increment(ec); if (ec) { @@ -324,7 +321,6 @@ bool file_system::RemoveDirectory(const std::string& directory_name, // Make sure the directory exists if (!DirectoryExists(directory_name) && IsAccessible(directory_name, W_OK)) { SDL_LOG_WARN( - "Unable to remove directory either doesn't exist or is not accessible"); return false; } @@ -517,9 +513,8 @@ bool file_system::CopyFile(const std::string& src, const std::string& dst) { error_code ec; fs::copy_file(src, dst, ec); if (ec) { - SDL_LOG_ERROR_WITH_ERRNO( - - "Unable to copy file: '" << src << "', reason: " << ec.message()); + SDL_LOG_ERROR_WITH_ERRNO("Unable to copy file: '" + << src << "', reason: " << ec.message()); // something failed return false; } diff --git a/src/components/utils/src/threads/thread_validator.cc b/src/components/utils/src/threads/thread_validator.cc index 218137127b..c59054ae11 100644 --- a/src/components/utils/src/threads/thread_validator.cc +++ b/src/components/utils/src/threads/thread_validator.cc @@ -46,13 +46,12 @@ SingleThreadSimpleValidator::~SingleThreadSimpleValidator() {} void SingleThreadSimpleValidator::AssertRunningOnCreationThread() const { PlatformThreadHandle current_id = Thread::CurrentId(); if (creation_thread_id_ != current_id) { - SDL_LOG_ERROR( - - "Single-threaded object created at thread " - << creation_thread_id_ << " is accessed from thread " << current_id + SDL_LOG_ERROR("Single-threaded object created at thread " + << creation_thread_id_ << " is accessed from thread " + << current_id #ifdef BACKTRACE_SUPPORT - << "\n" - << utils::Backtrace() + << "\n" + << utils::Backtrace() #endif ); } -- cgit v1.2.1