diff options
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands')
357 files changed, 2297 insertions, 1854 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_request.cc index c6d181bf57..35fb2204ac 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_request.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ActivateAppRequest::ActivateAppRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,11 +54,11 @@ ActivateAppRequest::ActivateAppRequest( policy_handle) {} ActivateAppRequest::~ActivateAppRequest() { - LOG4CXX_TRACE(logger_, "~ActivateAppRequest"); + SDL_LOG_TRACE("~ActivateAppRequest"); } void ActivateAppRequest::Run() { - LOG4CXX_TRACE(logger_, "enter " << correlation_id()); + SDL_LOG_TRACE("enter " << correlation_id()); uint32_t app_id = RequestToHMI::application_id(); application_manager_.set_application_id(correlation_id(), app_id); #ifdef ENABLE_LOG @@ -66,11 +68,11 @@ void ActivateAppRequest::Run() { static_cast<mobile_apis::HMILevel::eType>( (*message_)[strings::msg_params][strings::activate_app_hmi_level] .asInt()); - LOG4CXX_TRACE(logger_, "requested_hmi_level = " << requested_hmi_level); + SDL_LOG_TRACE("requested_hmi_level = " << requested_hmi_level); } #endif SendRequest(); - LOG4CXX_TRACE(logger_, "exit"); + SDL_LOG_TRACE("exit"); } } // namespace commands diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_response.cc index b829ef711e..9615f83170 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ActivateAppResponse::ActivateAppResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,12 +55,12 @@ ActivateAppResponse::ActivateAppResponse( ActivateAppResponse::~ActivateAppResponse() {} void ActivateAppResponse::Run() { - LOG4CXX_TRACE(logger_, "enter"); + SDL_LOG_TRACE("enter"); event_engine::Event event( hmi_apis::FunctionID::BasicCommunication_ActivateApp); event.set_smart_object(*message_); event.raise(application_manager_.event_dispatcher()); - LOG4CXX_TRACE(logger_, "exit"); + SDL_LOG_TRACE("exit"); } } // namespace commands diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/add_statistics_info_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/add_statistics_info_notification.cc index 93999f704d..8ddad0945c 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/add_statistics_info_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/add_statistics_info_notification.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + AddStatisticsInfoNotification::AddStatisticsInfoNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ AddStatisticsInfoNotification::AddStatisticsInfoNotification( AddStatisticsInfoNotification::~AddStatisticsInfoNotification() {} void AddStatisticsInfoNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); int type = (*message_)[strings::msg_params][hmi_notification::statistic_type] .asInt(); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_request.cc index 68c7896a7f..fdb2f454d5 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + AllowAllAppsRequest::AllowAllAppsRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ AllowAllAppsRequest::AllowAllAppsRequest( AllowAllAppsRequest::~AllowAllAppsRequest() {} void AllowAllAppsRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_response.cc index c2182f4853..be049aaea2 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_response.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + AllowAllAppsResponse::AllowAllAppsResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ AllowAllAppsResponse::AllowAllAppsResponse( AllowAllAppsResponse::~AllowAllAppsResponse() {} void AllowAllAppsResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); application_manager_.SetAllAppsAllowed( (*message_)[strings::msg_params][hmi_response::allowed].asBool()); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_request.cc index 6b5af76fb1..32fb35b344 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + AllowAppRequest::AllowAppRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ AllowAppRequest::AllowAppRequest( AllowAppRequest::~AllowAppRequest() {} void AllowAppRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_response.cc index c62645c6c0..458b7097e3 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + AllowAppResponse::AllowAppResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ AllowAppResponse::AllowAppResponse( AllowAppResponse::~AllowAppResponse() {} void AllowAppResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); uint32_t connection_key = (*message_)[strings::params][strings::connection_key].asInt(); @@ -61,7 +63,7 @@ void AllowAppResponse::Run() { ApplicationSharedPtr app = application_manager_.application(connection_key); if (!app) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); return; } app->set_app_allowed( diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_close_application_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_close_application_request.cc index b021faefd8..f87f103b0f 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_close_application_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_close_application_request.cc @@ -36,6 +36,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + BasicCommunicationCloseApplicationRequest:: BasicCommunicationCloseApplicationRequest( const application_manager::commands::MessageSharedPtr& message, @@ -53,7 +55,7 @@ BasicCommunicationCloseApplicationRequest:: ~BasicCommunicationCloseApplicationRequest() {} void BasicCommunicationCloseApplicationRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_close_application_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_close_application_response.cc index 2e56271cf2..74df410213 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_close_application_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_close_application_response.cc @@ -36,6 +36,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + BasicCommunicationCloseApplicationResponse:: BasicCommunicationCloseApplicationResponse( const application_manager::commands::MessageSharedPtr& message, @@ -53,7 +55,7 @@ BasicCommunicationCloseApplicationResponse:: ~BasicCommunicationCloseApplicationResponse() {} void BasicCommunicationCloseApplicationResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event( hmi_apis::FunctionID::BasicCommunication_CloseApplication); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_request.cc index 19c9fa91d8..a6e95f9f72 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + BasicCommunicationGetSystemTimeRequest::BasicCommunicationGetSystemTimeRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -50,7 +52,7 @@ BasicCommunicationGetSystemTimeRequest::BasicCommunicationGetSystemTimeRequest( policy_handler) {} void BasicCommunicationGetSystemTimeRequest::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); application_manager_.protocol_handler().NotifyOnGetSystemTimeFailed(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_response.cc index e26753b3f2..1376376bb8 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_response.cc @@ -33,7 +33,7 @@ #include "sdl_rpc_plugin/commands/hmi/basic_communication_get_system_time_response.h" #include "utils/logger.h" -CREATE_LOGGERPTR_GLOBAL(logger_, "Commands") +SDL_CREATE_LOG_VARIABLE("Commands") namespace sdl_rpc_plugin { using namespace application_manager; @@ -53,7 +53,7 @@ BasicCommunicationGetSystemTimeResponse:: policy_handler) {} void BasicCommunicationGetSystemTimeResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event( hmi_apis::FunctionID::BasicCommunication_GetSystemTime); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_on_awake_sdl.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_on_awake_sdl.cc index 361dc5fea6..52f8c4329f 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_on_awake_sdl.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_on_awake_sdl.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnAwakeSDLNotification::OnAwakeSDLNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ OnAwakeSDLNotification::OnAwakeSDLNotification( OnAwakeSDLNotification::~OnAwakeSDLNotification() {} void OnAwakeSDLNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if (!application_manager_.resume_controller().is_suspended()) { return; diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_request.cc index 052a40a888..62c4a0ff3d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + BasicCommunicationSystemRequest::BasicCommunicationSystemRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ BasicCommunicationSystemRequest::BasicCommunicationSystemRequest( BasicCommunicationSystemRequest::~BasicCommunicationSystemRequest() {} void BasicCommunicationSystemRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_response.cc index 0b052de88d..06b31cb73d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + BasicCommunicationSystemResponse::BasicCommunicationSystemResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ BasicCommunicationSystemResponse::BasicCommunicationSystemResponse( BasicCommunicationSystemResponse::~BasicCommunicationSystemResponse() {} void BasicCommunicationSystemResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event( hmi_apis::FunctionID::BasicCommunication_SystemRequest); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_app_properties_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_app_properties_request.cc index 0dafa21e33..fddcc50a16 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_app_properties_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_app_properties_request.cc @@ -39,6 +39,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + BCGetAppPropertiesRequest::BCGetAppPropertiesRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,15 +56,14 @@ BCGetAppPropertiesRequest::BCGetAppPropertiesRequest( void BCGetAppPropertiesRequest::FillAppProperties( const std::string& policy_app_id, smart_objects::SmartObject& out_properties) const { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); policy::AppProperties app_properties; const bool result = policy_handler_.GetAppProperties(policy_app_id, app_properties); if (!result) { - LOG4CXX_DEBUG( - logger_, + SDL_LOG_DEBUG( "Failed to get app parameters for policy_app_id: " << policy_app_id); return; } @@ -98,7 +99,7 @@ void BCGetAppPropertiesRequest::FillAppProperties( } void BCGetAppPropertiesRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const auto& msg_params = (*message_)[strings::msg_params]; smart_objects::SmartObject response_params(smart_objects::SmartType_Map); @@ -111,9 +112,9 @@ void BCGetAppPropertiesRequest::Run() { response_params[strings::properties][0] = properties; } } else { - LOG4CXX_DEBUG(logger_, - "policyAppID was absent in request, all apps properties " - "will be returned."); + SDL_LOG_DEBUG( + "policyAppID was absent in request, all apps properties " + "will be returned."); const auto app_ids = policy_handler_.GetApplicationPolicyIDs(); int i = 0; for (auto& app_id : app_ids) { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_app_properties_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_app_properties_response.cc index 57949a949b..006cc536bf 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_app_properties_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_app_properties_response.cc @@ -40,6 +40,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + BCGetAppPropertiesResponse::BCGetAppPropertiesResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ BCGetAppPropertiesResponse::BCGetAppPropertiesResponse( policy_handler) {} void BCGetAppPropertiesResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToHMI(message_); } } // namespace commands diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_file_path_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_file_path_request.cc index b735cd9bdf..a8a47d1fef 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_file_path_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_file_path_request.cc @@ -39,6 +39,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + BCGetFilePathRequest::BCGetFilePathRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ BCGetFilePathRequest::BCGetFilePathRequest( BCGetFilePathRequest::~BCGetFilePathRequest() {} void BCGetFilePathRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_file_path_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_file_path_response.cc index 58cda68a2b..f9d3fbe953 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_file_path_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_file_path_response.cc @@ -40,6 +40,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + BCGetFilePathResponse::BCGetFilePathResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ BCGetFilePathResponse::BCGetFilePathResponse( BCGetFilePathResponse::~BCGetFilePathResponse() {} void BCGetFilePathResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); application_manager::event_engine::Event event( hmi_apis::FunctionID::BasicCommunication_GetFilePath); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_set_app_properties_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_set_app_properties_request.cc index a4c5d6b1b4..dd5ea3bb85 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_set_app_properties_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_set_app_properties_request.cc @@ -40,6 +40,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + BCSetAppPropertiesRequest::BCSetAppPropertiesRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ BCSetAppPropertiesRequest::BCSetAppPropertiesRequest( policy_handler) {} void BCSetAppPropertiesRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const auto& properties = (*message_)[strings::msg_params][strings::properties]; @@ -81,9 +83,8 @@ void BCSetAppPropertiesRequest::Run() { application_manager_.GetRPCService().ManageHMICommand(notification); } if (is_new_app) { - LOG4CXX_ERROR(logger_, - "Message contains unknow policyAppId: " - << policy_app_id << ", PTU will be triggered"); + SDL_LOG_ERROR("Message contains unknow policyAppId: " + << policy_app_id << ", PTU will be triggered"); policy_handler_.OnLocalAppAdded(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_set_app_properties_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_set_app_properties_response.cc index 928a17d0f8..a99e3d6a3e 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_set_app_properties_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_set_app_properties_response.cc @@ -41,6 +41,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + BCSetAppPropertiesResponse::BCSetAppPropertiesResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ BCSetAppPropertiesResponse::BCSetAppPropertiesResponse( policy_handler) {} void BCSetAppPropertiesResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToHMI(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_request.cc index c0d22dcb89..d9c7901c67 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_request.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ButtonGetCapabilitiesRequest::ButtonGetCapabilitiesRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,13 +55,13 @@ ButtonGetCapabilitiesRequest::ButtonGetCapabilitiesRequest( ButtonGetCapabilitiesRequest::~ButtonGetCapabilitiesRequest() {} void ButtonGetCapabilitiesRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } void ButtonGetCapabilitiesRequest::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); hmi_capabilities_.UpdateRequestsRequiredForCapabilities( hmi_apis::FunctionID::Buttons_GetCapabilities); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_response.cc index cc3a61a9df..20250af222 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ButtonGetCapabilitiesResponse::ButtonGetCapabilitiesResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ ButtonGetCapabilitiesResponse::ButtonGetCapabilitiesResponse( ButtonGetCapabilitiesResponse::~ButtonGetCapabilitiesResponse() {} void ButtonGetCapabilitiesResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const hmi_apis::Common_Result::eType code = static_cast<hmi_apis::Common_Result::eType>( (*message_)[strings::params][hmi_response::code].asInt()); @@ -62,7 +64,7 @@ void ButtonGetCapabilitiesResponse::Run() { hmi_apis::FunctionID::Buttons_GetCapabilities); if (hmi_apis::Common_Result::SUCCESS != code) { - LOG4CXX_ERROR(logger_, "Error is returned. Capabilities won't be updated."); + SDL_LOG_ERROR("Error is returned. Capabilities won't be updated."); return; } @@ -81,8 +83,7 @@ void ButtonGetCapabilitiesResponse::Run() { if (!hmi_capabilities_.SaveCachedCapabilitiesToFile( hmi_interface::buttons, sections_to_update, message_->getSchema())) { - LOG4CXX_ERROR(logger_, - "Failed to save Buttons.GetCapabilities response to cache"); + SDL_LOG_ERROR("Failed to save Buttons.GetCapabilities response to cache"); } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_request.cc index 988794f668..b4b838b8dd 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ClosePopupRequest::ClosePopupRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ ClosePopupRequest::ClosePopupRequest( ClosePopupRequest::~ClosePopupRequest() {} void ClosePopupRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_response.cc index 072e1960e9..76ed7a749a 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_response.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ClosePopupResponse::ClosePopupResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ ClosePopupResponse::ClosePopupResponse( ClosePopupResponse::~ClosePopupResponse() {} void ClosePopupResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // TODO(VS): Process response from HMI } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_request.cc index 71782ef575..0bc9090bbe 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + DecryptCertificateRequest::DecryptCertificateRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -50,7 +52,7 @@ DecryptCertificateRequest::DecryptCertificateRequest( policy_handle) {} void DecryptCertificateRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const uint32_t correlation_id = RequestToHMI::correlation_id(); const uint32_t app_id = RequestToHMI::application_id(); application_manager_.set_application_id(correlation_id, app_id); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_response.cc index cf2a4d092c..5c3bf9d0e2 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + DecryptCertificateResponse::DecryptCertificateResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ DecryptCertificateResponse::DecryptCertificateResponse( DecryptCertificateResponse::~DecryptCertificateResponse() {} void DecryptCertificateResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const hmi_apis::Common_Result::eType code = static_cast<hmi_apis::Common_Result::eType>( (*message_)[strings::params][hmi_response::code].asInt()); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_request.cc index 7a505a46f3..1b42abd055 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + GetSystemInfoRequest::GetSystemInfoRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ GetSystemInfoRequest::GetSystemInfoRequest( GetSystemInfoRequest::~GetSystemInfoRequest() {} void GetSystemInfoRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); uint32_t correlation_id = RequestToHMI::correlation_id(); uint32_t app_id = RequestToHMI::application_id(); application_manager_.set_application_id(correlation_id, app_id); @@ -60,7 +62,7 @@ void GetSystemInfoRequest::Run() { } void GetSystemInfoRequest::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); hmi_capabilities_.UpdateCachedCapabilities(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_response.cc index 7a7d015e21..77605b31c3 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_response.cc @@ -37,6 +37,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + GetSystemInfoResponse::GetSystemInfoResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,14 +54,14 @@ GetSystemInfoResponse::GetSystemInfoResponse( GetSystemInfoResponse::~GetSystemInfoResponse() {} void GetSystemInfoResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const auto code = static_cast<hmi_apis::Common_Result::eType>( (*message_)[strings::params][hmi_response::code].asInt()); hmi_capabilities_.set_ccpu_version(policy_handler_.GetCCPUVersionFromPT()); if (hmi_apis::Common_Result::SUCCESS != code) { - LOG4CXX_WARN(logger_, "GetSystemError returns an error code " << code); + SDL_LOG_WARN("GetSystemError returns an error code " << code); hmi_capabilities_.UpdateCachedCapabilities(); policy_handler_.SetPreloadedPtFlag(false); return; diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_request.cc index b8c61ca902..288d7c0927 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + MixingAudioSupportedRequest::MixingAudioSupportedRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ MixingAudioSupportedRequest::MixingAudioSupportedRequest( MixingAudioSupportedRequest::~MixingAudioSupportedRequest() {} void MixingAudioSupportedRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_response.cc index 089e56e598..e9dc69db2b 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_response.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + MixingAudioSupportedResponse::MixingAudioSupportedResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ MixingAudioSupportedResponse::MixingAudioSupportedResponse( MixingAudioSupportedResponse::~MixingAudioSupportedResponse() {} void MixingAudioSupportedResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); hmi_capabilities_.set_attenuated_supported( (*message_)[strings::msg_params][hmi_response::attenuated_supported] diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_request.cc index 8390fea5bc..9010e32125 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviAlertManeuverRequest::NaviAlertManeuverRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ NaviAlertManeuverRequest::NaviAlertManeuverRequest( NaviAlertManeuverRequest::~NaviAlertManeuverRequest() {} void NaviAlertManeuverRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_response.cc index a1603f069d..40f4471586 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviAlertManeuverResponse::NaviAlertManeuverResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ NaviAlertManeuverResponse::NaviAlertManeuverResponse( NaviAlertManeuverResponse::~NaviAlertManeuverResponse() {} void NaviAlertManeuverResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::Navigation_AlertManeuver); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_request.cc index 47f2f2505e..b9860bcd02 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_request.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + AudioStartStreamRequest::AudioStartStreamRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,13 +55,12 @@ AudioStartStreamRequest::AudioStartStreamRequest( policy_handle) , EventObserver(application_manager.event_dispatcher()) , retry_number_(0) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); std::pair<uint32_t, int32_t> stream_retry = application_manager_.get_settings().start_stream_retry_amount(); default_timeout_ = stream_retry.second; retry_number_ = stream_retry.first; - LOG4CXX_DEBUG(logger_, - "default_timeout_ = " << default_timeout_ + SDL_LOG_DEBUG("default_timeout_ = " << default_timeout_ << "; retry_number_ = " << retry_number_); } @@ -69,17 +70,16 @@ AudioStartStreamRequest::~AudioStartStreamRequest() { } void AudioStartStreamRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if (!app_mngr::commands::CheckAvailabilityHMIInterfaces( application_manager_, HmiInterfaces::HMI_INTERFACE_Navigation)) { - LOG4CXX_INFO(logger_, "Interface Navi is not supported by system"); + SDL_LOG_INFO("Interface Navi is not supported by system"); return; } ApplicationSharedPtr app = application_manager_.application_by_hmi_app(application_id()); if (!app) { - LOG4CXX_ERROR(logger_, - "Application with hmi_app_id " << application_id() + SDL_LOG_ERROR("Application with hmi_app_id " << application_id() << " does not exist"); return; } @@ -92,33 +92,31 @@ void AudioStartStreamRequest::Run() { void AudioStartStreamRequest::on_event(const event_engine::Event& event) { using namespace protocol_handler; - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application_by_hmi_app(application_id()); if (!app) { - LOG4CXX_ERROR(logger_, - "StartAudioStreamRequest aborted. Application not found"); + SDL_LOG_ERROR("StartAudioStreamRequest aborted. Application not found"); return; } const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::Navigation_StartAudioStream: { - LOG4CXX_DEBUG(logger_, "Received StartStream event"); + SDL_LOG_DEBUG("Received StartStream event"); const hmi_apis::Common_Result::eType code = static_cast<hmi_apis::Common_Result::eType>( message[strings::params][hmi_response::code].asInt()); if (hmi_apis::Common_Result::SUCCESS == code) { - LOG4CXX_INFO(logger_, "StartAudioStream response SUCCESS"); + SDL_LOG_INFO("StartAudioStream response SUCCESS"); if (application_manager_.HMIStateAllowsStreaming(app->app_id(), ServiceType::kAudio)) { app->set_audio_streaming_approved(true); } else { - LOG4CXX_WARN( - logger_, + SDL_LOG_WARN( "StartAudioStreamRequest aborted. Application can not stream"); } application_manager_.TerminateRequest( @@ -126,25 +124,25 @@ void AudioStartStreamRequest::on_event(const event_engine::Event& event) { break; } if (hmi_apis::Common_Result::REJECTED == code) { - LOG4CXX_INFO(logger_, "StartAudioStream response REJECTED"); + SDL_LOG_INFO("StartAudioStream response REJECTED"); RetryStartSession(); break; } } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } } void AudioStartStreamRequest::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); RetryStartSession(); } void AudioStartStreamRequest::RetryStartSession() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); application_manager_.TerminateRequest( connection_key(), correlation_id(), function_id()); @@ -152,20 +150,18 @@ void AudioStartStreamRequest::RetryStartSession() { ApplicationSharedPtr app = application_manager_.application_by_hmi_app(application_id()); if (!app) { - LOG4CXX_ERROR(logger_, - "StartAudioStreamRequest aborted. Application not found"); + SDL_LOG_ERROR("StartAudioStreamRequest aborted. Application not found"); return; } if (!app->audio_streaming_allowed()) { - LOG4CXX_WARN(logger_, "Audio streaming not allowed"); + SDL_LOG_WARN("Audio streaming not allowed"); return; } if (app->audio_streaming_approved()) { - LOG4CXX_INFO(logger_, - "AudioStartStream retry sequence stopped. " - << "SUCCESS received"); + SDL_LOG_INFO("AudioStartStream retry sequence stopped. " + << "SUCCESS received"); app->set_audio_stream_retry_number(0); return; } @@ -173,15 +169,13 @@ void AudioStartStreamRequest::RetryStartSession() { uint32_t curr_retry_number = app->audio_stream_retry_number(); if (curr_retry_number <= retry_number_) { - LOG4CXX_DEBUG( - logger_, - "Retry number " << curr_retry_number << " of " << retry_number_); + SDL_LOG_DEBUG("Retry number " << curr_retry_number << " of " + << retry_number_); MessageHelper::SendAudioStartStream(app->app_id(), application_manager_); app->set_audio_stream_retry_number(++curr_retry_number); } else { - LOG4CXX_DEBUG(logger_, - "Audio start stream retry sequence stopped. " - << "Attempts expired."); + SDL_LOG_DEBUG("Audio start stream retry sequence stopped. " + << "Attempts expired."); application_manager_.EndNaviServices(app->app_id()); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_response.cc index 61d49577f6..99ddceaa55 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_response.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + AudioStartStreamResponse::AudioStartStreamResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ AudioStartStreamResponse::AudioStartStreamResponse( AudioStartStreamResponse::~AudioStartStreamResponse() {} void AudioStartStreamResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::Navigation_StartAudioStream); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_request.cc index a5d436f015..e20d0e1cb6 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_request.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + AudioStopStreamRequest::AudioStopStreamRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,10 +53,10 @@ AudioStopStreamRequest::AudioStopStreamRequest( AudioStopStreamRequest::~AudioStopStreamRequest() {} void AudioStopStreamRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if (!app_mngr::commands::CheckAvailabilityHMIInterfaces( application_manager_, HmiInterfaces::HMI_INTERFACE_Navigation)) { - LOG4CXX_INFO(logger_, "Interface Navi is not supported by system"); + SDL_LOG_INFO("Interface Navi is not supported by system"); return; } SendRequest(); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_response.cc index 98023ab571..1b2f2c476c 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_response.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + AudioStopStreamResponse::AudioStopStreamResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ AudioStopStreamResponse::AudioStopStreamResponse( AudioStopStreamResponse::~AudioStopStreamResponse() {} void AudioStopStreamResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); } } // namespace commands diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_request.cc index edc4afe1e4..d0ef35c8fa 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviGetWayPointsRequest::NaviGetWayPointsRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ NaviGetWayPointsRequest::NaviGetWayPointsRequest( NaviGetWayPointsRequest::~NaviGetWayPointsRequest() {} void NaviGetWayPointsRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_response.cc index 0f0b652d01..97ef0cae2b 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviGetWayPointsResponse::NaviGetWayPointsResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ NaviGetWayPointsResponse::NaviGetWayPointsResponse( NaviGetWayPointsResponse::~NaviGetWayPointsResponse() {} void NaviGetWayPointsResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::Navigation_GetWayPoints); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_request.cc index 15e5b46b36..4caa307be3 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviIsReadyRequest::NaviIsReadyRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,18 +55,18 @@ NaviIsReadyRequest::NaviIsReadyRequest( NaviIsReadyRequest::~NaviIsReadyRequest() {} void NaviIsReadyRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); subscribe_on_event(hmi_apis::FunctionID::Navigation_IsReady, correlation_id()); SendRequest(); } void NaviIsReadyRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::Navigation_IsReady: { - LOG4CXX_DEBUG(logger_, "Received Navigation_IsReady event"); + SDL_LOG_DEBUG("Received Navigation_IsReady event"); unsubscribe_from_event(hmi_apis::FunctionID::Navigation_IsReady); const bool is_available = app_mngr::commands::ChangeInterfaceState( application_manager_, @@ -76,7 +78,7 @@ void NaviIsReadyRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_response.cc index 073513eda9..2d7f2ec025 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_response.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviIsReadyResponse::NaviIsReadyResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ NaviIsReadyResponse::NaviIsReadyResponse( NaviIsReadyResponse::~NaviIsReadyResponse() {} void NaviIsReadyResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::Navigation_IsReady); event.set_smart_object(*message_); event.raise(application_manager_.event_dispatcher()); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_request.cc index 360870e21c..db7e73144d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviSendLocationRequest::NaviSendLocationRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ NaviSendLocationRequest::NaviSendLocationRequest( NaviSendLocationRequest::~NaviSendLocationRequest() {} void NaviSendLocationRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_response.cc index dc60f2fbf0..d4d3ea0c2c 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_response.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviSendLocationResponse::NaviSendLocationResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ NaviSendLocationResponse::NaviSendLocationResponse( NaviSendLocationResponse::~NaviSendLocationResponse() {} void NaviSendLocationResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::Navigation_SendLocation); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_request.cc index 764315f37f..e4fbdaa0d6 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_request.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviSetVideoConfigRequest::NaviSetVideoConfigRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,19 +57,18 @@ NaviSetVideoConfigRequest::NaviSetVideoConfigRequest( NaviSetVideoConfigRequest::~NaviSetVideoConfigRequest() {} void NaviSetVideoConfigRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if (!app_mngr::commands::CheckAvailabilityHMIInterfaces( application_manager_, HmiInterfaces::HMI_INTERFACE_Navigation)) { - LOG4CXX_WARN(logger_, "HMI interface Navigation is not supported"); + SDL_LOG_WARN("HMI interface Navigation is not supported"); return; } ApplicationSharedPtr app = application_manager_.application_by_hmi_app(application_id()); if (!app) { - LOG4CXX_ERROR( - logger_, - "Application with hmi_app_id " << application_id() << "does not exist"); + SDL_LOG_ERROR("Application with hmi_app_id " << application_id() + << " does not exist"); return; } @@ -77,13 +78,12 @@ void NaviSetVideoConfigRequest::Run() { } void NaviSetVideoConfigRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application_by_hmi_app(application_id()); if (!app) { - LOG4CXX_ERROR(logger_, - "Application is not found, abort NaviSetVideoConfigRequest"); + SDL_LOG_ERROR("Application is not found, abort NaviSetVideoConfigRequest"); return; } @@ -97,12 +97,11 @@ void NaviSetVideoConfigRequest::on_event(const event_engine::Event& event) { std::vector<std::string> rejected_params; if (code == hmi_apis::Common_Result::SUCCESS) { - LOG4CXX_DEBUG(logger_, "Received SetVideoConfig success response"); + SDL_LOG_DEBUG("Received SetVideoConfig success response"); result = true; } else { - LOG4CXX_DEBUG( - logger_, - "Received SetVideoConfig failure response (" << event.id() << ")"); + SDL_LOG_DEBUG("Received SetVideoConfig failure response (" << event.id() + << ")"); result = false; if (message[strings::msg_params].keyExists(strings::rejected_params)) { const smart_objects::SmartArray* list = @@ -128,18 +127,18 @@ void NaviSetVideoConfigRequest::on_event(const event_engine::Event& event) { break; } default: - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); break; } } void NaviSetVideoConfigRequest::onTimeOut() { - LOG4CXX_WARN(logger_, "Timed out while waiting for SetVideoConfig response"); + SDL_LOG_WARN("Timed out while waiting for SetVideoConfig response"); ApplicationSharedPtr app = application_manager_.application_by_hmi_app(application_id()); if (!app) { - LOG4CXX_ERROR(logger_, "Application is not found"); + SDL_LOG_ERROR("Application is not found"); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_response.cc index e4a30c9da5..5291ef8adf 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_response.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviSetVideoConfigResponse::NaviSetVideoConfigResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ NaviSetVideoConfigResponse::NaviSetVideoConfigResponse( NaviSetVideoConfigResponse::~NaviSetVideoConfigResponse() {} void NaviSetVideoConfigResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::Navigation_SetVideoConfig); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_request.cc index 95dd4561fc..ddfc7cc187 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviShowConstantTBTRequest::NaviShowConstantTBTRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ NaviShowConstantTBTRequest::NaviShowConstantTBTRequest( NaviShowConstantTBTRequest::~NaviShowConstantTBTRequest() {} void NaviShowConstantTBTRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_response.cc index f73099d29a..869b76863d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviShowConstantTBTResponse::NaviShowConstantTBTResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ NaviShowConstantTBTResponse::NaviShowConstantTBTResponse( NaviShowConstantTBTResponse::~NaviShowConstantTBTResponse() {} void NaviShowConstantTBTResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::Navigation_ShowConstantTBT); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_request.cc index 00974085c3..d0f95ee385 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_request.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviStartStreamRequest::NaviStartStreamRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,13 +55,12 @@ NaviStartStreamRequest::NaviStartStreamRequest( policy_handle) , EventObserver(application_manager.event_dispatcher()) , retry_number_(0) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); std::pair<uint32_t, int32_t> stream_retry = application_manager_.get_settings().start_stream_retry_amount(); default_timeout_ = stream_retry.second; retry_number_ = stream_retry.first; - LOG4CXX_DEBUG(logger_, - "default_timeout_ = " << default_timeout_ + SDL_LOG_DEBUG("default_timeout_ = " << default_timeout_ << "; retry_number_ = " << retry_number_); } @@ -71,18 +72,17 @@ NaviStartStreamRequest::~NaviStartStreamRequest() { } void NaviStartStreamRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if (!app_mngr::commands::CheckAvailabilityHMIInterfaces( application_manager_, HmiInterfaces::HMI_INTERFACE_Navigation)) { - LOG4CXX_INFO(logger_, "Interface Navi is not supported by system"); + SDL_LOG_INFO("Interface Navi is not supported by system"); return; } ApplicationSharedPtr app = application_manager_.application_by_hmi_app(application_id()); if (!app) { - LOG4CXX_ERROR( - logger_, - "Application with hmi_app_id " << application_id() << "does not exist"); + SDL_LOG_ERROR("Application with hmi_app_id " << application_id() + << " does not exist"); return; } SetAllowedToTerminate(false); @@ -94,33 +94,31 @@ void NaviStartStreamRequest::Run() { void NaviStartStreamRequest::on_event(const event_engine::Event& event) { using namespace protocol_handler; - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application_by_hmi_app(application_id()); if (!app) { - LOG4CXX_ERROR(logger_, - "NaviStartStreamRequest aborted. Application not found"); + SDL_LOG_ERROR("NaviStartStreamRequest aborted. Application not found"); return; } const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::Navigation_StartStream: { - LOG4CXX_DEBUG(logger_, "Received StartStream event"); + SDL_LOG_DEBUG("Received StartStream event"); const hmi_apis::Common_Result::eType code = static_cast<hmi_apis::Common_Result::eType>( message[strings::params][hmi_response::code].asInt()); if (hmi_apis::Common_Result::SUCCESS == code) { - LOG4CXX_INFO(logger_, "NaviStartStreamResponse SUCCESS"); + SDL_LOG_INFO("NaviStartStreamResponse SUCCESS"); if (application_manager_.HMIStateAllowsStreaming( app->app_id(), ServiceType::kMobileNav)) { app->set_video_streaming_approved(true); } else { - LOG4CXX_DEBUG( - logger_, + SDL_LOG_DEBUG( "NaviStartStreamRequest aborted. Application can not stream"); } application_manager_.TerminateRequest( @@ -128,25 +126,25 @@ void NaviStartStreamRequest::on_event(const event_engine::Event& event) { break; } if (hmi_apis::Common_Result::REJECTED == code) { - LOG4CXX_INFO(logger_, "StartStream response REJECTED "); + SDL_LOG_INFO("StartStream response REJECTED"); RetryStartSession(); break; } } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } } void NaviStartStreamRequest::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); RetryStartSession(); } void NaviStartStreamRequest::RetryStartSession() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); application_manager_.TerminateRequest( connection_key(), correlation_id(), function_id()); @@ -154,20 +152,18 @@ void NaviStartStreamRequest::RetryStartSession() { ApplicationSharedPtr app = application_manager_.application_by_hmi_app(application_id()); if (!app) { - LOG4CXX_ERROR(logger_, - "NaviStartStreamRequest aborted. Application not found"); + SDL_LOG_ERROR("NaviStartStreamRequest aborted. Application not found"); return; } if (!app->video_streaming_allowed()) { - LOG4CXX_WARN(logger_, "Video streaming not allowed"); + SDL_LOG_WARN("Video streaming not allowed"); return; } if (app->video_streaming_approved()) { - LOG4CXX_INFO(logger_, - "NaviStartStream retry sequence stopped. " - << "SUCCESS received"); + SDL_LOG_INFO("NaviStartStream retry sequence stopped. " + << "SUCCESS received"); app->set_video_stream_retry_number(0); return; } @@ -175,15 +171,13 @@ void NaviStartStreamRequest::RetryStartSession() { uint32_t curr_retry_number = app->video_stream_retry_number(); if (curr_retry_number <= retry_number_) { - LOG4CXX_DEBUG( - logger_, - "Retry number " << curr_retry_number << " of " << retry_number_); + SDL_LOG_DEBUG("Retry number " << curr_retry_number << " of " + << retry_number_); MessageHelper::SendNaviStartStream(app->app_id(), application_manager_); app->set_video_stream_retry_number(++curr_retry_number); } else { - LOG4CXX_DEBUG(logger_, - "NaviStartStream retry sequence stopped. " - << "Attempts expired"); + SDL_LOG_DEBUG("NaviStartStream retry sequence stopped. " + << "Attempts expired"); application_manager_.EndNaviServices(app->app_id()); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_response.cc index eafd81148a..a6595f1b8a 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_response.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviStartStreamResponse::NaviStartStreamResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ NaviStartStreamResponse::NaviStartStreamResponse( NaviStartStreamResponse::~NaviStartStreamResponse() {} void NaviStartStreamResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::Navigation_StartStream); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_request.cc index ad09b0aee1..c86803413b 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_request.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviStopStreamRequest::NaviStopStreamRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,10 +53,10 @@ NaviStopStreamRequest::NaviStopStreamRequest( NaviStopStreamRequest::~NaviStopStreamRequest() {} void NaviStopStreamRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if (!app_mngr::commands::CheckAvailabilityHMIInterfaces( application_manager_, HmiInterfaces::HMI_INTERFACE_Navigation)) { - LOG4CXX_INFO(logger_, "Interface Navi is not supported by system"); + SDL_LOG_INFO("Interface Navi is not supported by system"); return; } SendRequest(); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_response.cc index ff8c0bddff..3c12c527d8 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_response.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviStopStreamResponse::NaviStopStreamResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ NaviStopStreamResponse::NaviStopStreamResponse( NaviStopStreamResponse::~NaviStopStreamResponse() {} void NaviStopStreamResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); } } // namespace commands diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_request.cc index ba29f552b7..c08998ddf3 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviSubscribeWayPointsRequest::NaviSubscribeWayPointsRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ NaviSubscribeWayPointsRequest::NaviSubscribeWayPointsRequest( NaviSubscribeWayPointsRequest::~NaviSubscribeWayPointsRequest() {} void NaviSubscribeWayPointsRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_response.cc index ddf8f75e58..37b4e8bbd3 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviSubscribeWayPointsResponse::NaviSubscribeWayPointsResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ NaviSubscribeWayPointsResponse::NaviSubscribeWayPointsResponse( NaviSubscribeWayPointsResponse::~NaviSubscribeWayPointsResponse() {} void NaviSubscribeWayPointsResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event( hmi_apis::FunctionID::Navigation_SubscribeWayPoints); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_request.cc index d3c998cfdf..e3a690a971 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviUnsubscribeWayPointsRequest::NaviUnsubscribeWayPointsRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ NaviUnsubscribeWayPointsRequest::NaviUnsubscribeWayPointsRequest( NaviUnsubscribeWayPointsRequest::~NaviUnsubscribeWayPointsRequest() {} void NaviUnsubscribeWayPointsRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_response.cc index beed29e1e2..b84d89e658 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_response.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviUnsubscribeWayPointsResponse::NaviUnsubscribeWayPointsResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ NaviUnsubscribeWayPointsResponse::NaviUnsubscribeWayPointsResponse( NaviUnsubscribeWayPointsResponse::~NaviUnsubscribeWayPointsResponse() {} void NaviUnsubscribeWayPointsResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event( hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_request.cc index a8a258b1c0..91c764b5b4 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviUpdateTurnListRequest::NaviUpdateTurnListRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ NaviUpdateTurnListRequest::NaviUpdateTurnListRequest( NaviUpdateTurnListRequest::~NaviUpdateTurnListRequest() {} void NaviUpdateTurnListRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_response.cc index a2f737df38..033c7f1383 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + NaviUpdateTurnListResponse::NaviUpdateTurnListResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ NaviUpdateTurnListResponse::NaviUpdateTurnListResponse( NaviUpdateTurnListResponse::~NaviUpdateTurnListResponse() {} void NaviUpdateTurnListResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::Navigation_UpdateTurnList); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_allow_sdl_functionality_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_allow_sdl_functionality_notification.cc index 204cc7d347..985056e788 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_allow_sdl_functionality_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_allow_sdl_functionality_notification.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnAllowSDLFunctionalityNotification::OnAllowSDLFunctionalityNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ OnAllowSDLFunctionalityNotification::OnAllowSDLFunctionalityNotification( OnAllowSDLFunctionalityNotification::~OnAllowSDLFunctionalityNotification() {} void OnAllowSDLFunctionalityNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); std::string device_id; if ((*message_)[strings::msg_params].keyExists("device")) { device_id = (*message_)[strings::msg_params]["device"]["id"].asString(); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_activated_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_activated_notification.cc index e882020f8b..144c184e82 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_activated_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_activated_notification.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnAppActivatedNotification::OnAppActivatedNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ OnAppActivatedNotification::OnAppActivatedNotification( OnAppActivatedNotification::~OnAppActivatedNotification() {} void OnAppActivatedNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event( hmi_apis::FunctionID::BasicCommunication_OnAppActivated); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_deactivated_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_deactivated_notification.cc index 18b796eaa8..81b07ed6f2 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_deactivated_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_deactivated_notification.cc @@ -42,6 +42,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnAppDeactivatedNotification::OnAppDeactivatedNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -57,7 +59,7 @@ OnAppDeactivatedNotification::OnAppDeactivatedNotification( OnAppDeactivatedNotification::~OnAppDeactivatedNotification() {} void OnAppDeactivatedNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event( hmi_apis::FunctionID::BasicCommunication_OnAppDeactivated); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_changed_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_changed_notification.cc index a1eb412c66..801e74eedd 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_changed_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_changed_notification.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnAppPermissionChangedNotification::OnAppPermissionChangedNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ OnAppPermissionChangedNotification::OnAppPermissionChangedNotification( OnAppPermissionChangedNotification::~OnAppPermissionChangedNotification() {} void OnAppPermissionChangedNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_consent_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_consent_notification.cc index 0033b392d2..37552e003a 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_consent_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_consent_notification.cc @@ -112,6 +112,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnAppPermissionConsentNotification::OnAppPermissionConsentNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -127,7 +129,7 @@ OnAppPermissionConsentNotification::OnAppPermissionConsentNotification( OnAppPermissionConsentNotification::~OnAppPermissionConsentNotification() {} void OnAppPermissionConsentNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params]; uint32_t connection_key = 0; diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_properties_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_properties_change_notification.cc index f1fa703bbb..d31d8436f7 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_properties_change_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_properties_change_notification.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnAppPropertiesChangeNotification::OnAppPropertiesChangeNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -50,7 +52,7 @@ OnAppPropertiesChangeNotification::OnAppPropertiesChangeNotification( policy_handle) {} void OnAppPropertiesChangeNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_registered_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_registered_notification.cc index 51c3125921..382b402383 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_registered_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_registered_notification.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnAppRegisteredNotification::OnAppRegisteredNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ OnAppRegisteredNotification::OnAppRegisteredNotification( OnAppRegisteredNotification::~OnAppRegisteredNotification() {} void OnAppRegisteredNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // SDL must notify system about app registration before any dependent actions // will be started SendNotification(); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_unregistered_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_unregistered_notification.cc index 07aadada81..4ff985cdf0 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_unregistered_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_unregistered_notification.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnAppUnregisteredNotification::OnAppUnregisteredNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,13 +56,13 @@ OnAppUnregisteredNotification::OnAppUnregisteredNotification( OnAppUnregisteredNotification::~OnAppUnregisteredNotification() {} bool OnAppUnregisteredNotification::Init() { - LOG4CXX_AUTO_TRACE(logger_); - LOG4CXX_DEBUG(logger_, "Replacement of hmi id is skipped."); + SDL_LOG_AUTO_TRACE(); + SDL_LOG_DEBUG("Replacement of hmi id is skipped."); return true; } void OnAppUnregisteredNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // sending event for delete VRCommand on PerformInteraction event_engine::Event event( diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_audio_data_streaming_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_audio_data_streaming_notification.cc index d9c1120409..d72fb1244e 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_audio_data_streaming_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_audio_data_streaming_notification.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnAudioDataStreamingNotification::OnAudioDataStreamingNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ OnAudioDataStreamingNotification::OnAudioDataStreamingNotification( OnAudioDataStreamingNotification::~OnAudioDataStreamingNotification() {} void OnAudioDataStreamingNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification.cc index 1a104c0fa1..9caec22bd2 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification.cc @@ -42,6 +42,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnBCSystemCapabilityUpdatedNotification:: OnBCSystemCapabilityUpdatedNotification( const application_manager::commands::MessageSharedPtr& message, @@ -59,10 +61,10 @@ OnBCSystemCapabilityUpdatedNotification:: ~OnBCSystemCapabilityUpdatedNotification() {} void OnBCSystemCapabilityUpdatedNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); - LOG4CXX_DEBUG(logger_, - "Sending BasicCommunication.OnSystemCapabilityUpdated " - "Notification to HMI"); + SDL_LOG_AUTO_TRACE(); + SDL_LOG_DEBUG( + "Sending BasicCommunication.OnSystemCapabilityUpdated " + "Notification to HMI"); smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params]; @@ -150,9 +152,8 @@ void OnBCSystemCapabilityUpdatedNotification::Run() { app_services->end(), matching_service_predicate); if (it != app_services->end()) { - LOG4CXX_DEBUG( - logger_, - "Replacing updated record with service_id " << service_id); + SDL_LOG_DEBUG("Replacing updated record with service_id " + << service_id); app_services->erase(it); } app_services->push_back(updated_capabilities[i]); @@ -163,7 +164,7 @@ void OnBCSystemCapabilityUpdatedNotification::Run() { } case mobile_apis::SystemCapabilityType::DISPLAYS: { if (!hmi_capabilities_.system_display_capabilities()) { - LOG4CXX_INFO(logger_, "system_display_capabilities are not available"); + SDL_LOG_INFO("system_display_capabilities are not available"); return; } msg_params[strings::system_capability][strings::display_capabilities] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification_from_hmi.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification_from_hmi.cc index f32aef1102..948a4fd418 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification_from_hmi.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification_from_hmi.cc @@ -42,6 +42,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnBCSystemCapabilityUpdatedNotificationFromHMI:: OnBCSystemCapabilityUpdatedNotificationFromHMI( const application_manager::commands::MessageSharedPtr& message, @@ -63,10 +65,10 @@ OnBCSystemCapabilityUpdatedNotificationFromHMI:: OnBCSystemCapabilityUpdatedNotificationFromHMI:: ProcessSystemDisplayCapabilities( const smart_objects::SmartObject& display_capabilities) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if (!(*message_)[strings::msg_params].keyExists(strings::app_id)) { - LOG4CXX_DEBUG(logger_, "Updating general display capabilities"); + SDL_LOG_DEBUG("Updating general display capabilities"); hmi_capabilities_.set_system_display_capabilities(display_capabilities); return ProcessSystemDisplayCapabilitiesResult::SUCCESS; } @@ -75,12 +77,11 @@ OnBCSystemCapabilityUpdatedNotificationFromHMI:: (*message_)[strings::msg_params][strings::app_id].asUInt(); auto app = application_manager_.application(app_id); if (!app) { - LOG4CXX_ERROR(logger_, - "Application with app_id " << app_id << " is not registered"); + SDL_LOG_ERROR("Application with app_id " << app_id << " is not registered"); return ProcessSystemDisplayCapabilitiesResult::FAIL; } - LOG4CXX_DEBUG(logger_, "Updating display capabilities for app " << app_id); + SDL_LOG_DEBUG("Updating display capabilities for app " << app_id); app->set_display_capabilities(display_capabilities); // Remove app_id from notification to mobile @@ -88,7 +89,7 @@ OnBCSystemCapabilityUpdatedNotificationFromHMI:: (*message_)[strings::msg_params][strings::app_id]; (*message_)[strings::msg_params].erase(strings::app_id); if (app->is_resuming() && app->is_app_data_resumption_allowed()) { - LOG4CXX_DEBUG(logger_, "Application is resuming"); + SDL_LOG_DEBUG("Application is resuming"); app->display_capabilities_builder().UpdateDisplayCapabilities( display_capabilities); return ProcessSystemDisplayCapabilitiesResult::CAPABILITIES_CACHED; @@ -98,7 +99,7 @@ OnBCSystemCapabilityUpdatedNotificationFromHMI:: } void OnBCSystemCapabilityUpdatedNotificationFromHMI::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // Prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = static_cast<int32_t>( @@ -113,15 +114,13 @@ void OnBCSystemCapabilityUpdatedNotificationFromHMI::Run() { const auto result = ProcessSystemDisplayCapabilities( system_capability[strings::display_capabilities]); if (ProcessSystemDisplayCapabilitiesResult::FAIL == result) { - LOG4CXX_ERROR( - logger_, + SDL_LOG_ERROR( "Failed to process display capabilities. Notification will " "be ignored"); return; } else if (ProcessSystemDisplayCapabilitiesResult:: CAPABILITIES_CACHED == result) { - LOG4CXX_TRACE(logger_, - "Capabilities are being cached for resuming app"); + SDL_LOG_TRACE("Capabilities are being cached for resuming app"); return; } } @@ -129,7 +128,7 @@ void OnBCSystemCapabilityUpdatedNotificationFromHMI::Run() { } case mobile_apis::SystemCapabilityType::REMOTE_CONTROL: { if (system_capability.keyExists(strings::rc_capability)) { - LOG4CXX_DEBUG(logger_, "Updating RC Capabilities"); + SDL_LOG_DEBUG("Updating RC Capabilities"); hmi_capabilities_.set_rc_capability( system_capability[strings::rc_capability]); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_event_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_event_notification.cc index f25e6202cd..f6911637f9 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_event_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_event_notification.cc @@ -42,6 +42,8 @@ namespace commands { namespace hmi { +SDL_CREATE_LOG_VARIABLE("Commands") + OnButtonEventNotification::OnButtonEventNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ OnButtonEventNotification::OnButtonEventNotification( policy_handle) {} void OnButtonEventNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); (*message_)[strings::params][strings::function_id] = static_cast<int32_t>(mobile_apis::FunctionID::OnButtonEventID); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_press_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_press_notification.cc index fee6b1b485..db2d81ccd1 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_press_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_press_notification.cc @@ -43,6 +43,8 @@ namespace commands { namespace hmi { +SDL_CREATE_LOG_VARIABLE("Commands") + OnButtonPressNotification::OnButtonPressNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,7 +58,7 @@ OnButtonPressNotification::OnButtonPressNotification( policy_handle) {} void OnButtonPressNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::Buttons_OnButtonPress); event.set_smart_object(*message_); event.raise(application_manager_.event_dispatcher()); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_subscription_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_subscription_notification.cc index 4ac752d6c5..c8d36407b8 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_subscription_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_subscription_notification.cc @@ -39,6 +39,8 @@ namespace commands { namespace hmi { +SDL_CREATE_LOG_VARIABLE("Commands") + OnButtonSubscriptionNotification::OnButtonSubscriptionNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ OnButtonSubscriptionNotification::OnButtonSubscriptionNotification( OnButtonSubscriptionNotification::~OnButtonSubscriptionNotification() {} void OnButtonSubscriptionNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_chosen_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_chosen_notification.cc index f27c1fe5e5..9938c26192 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_chosen_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_chosen_notification.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnDeviceChosenNotification::OnDeviceChosenNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ OnDeviceChosenNotification::OnDeviceChosenNotification( OnDeviceChosenNotification::~OnDeviceChosenNotification() {} void OnDeviceChosenNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if ((*message_)[strings::msg_params].keyExists(strings::device_info)) { application_manager_.ConnectToDevice( diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_state_changed_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_state_changed_notification.cc index 129ba8c9ba..a6619c579c 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_state_changed_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_state_changed_notification.cc @@ -80,6 +80,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnDeviceStateChangedNotification::OnDeviceStateChangedNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -95,7 +97,7 @@ OnDeviceStateChangedNotification::OnDeviceStateChangedNotification( OnDeviceStateChangedNotification::~OnDeviceStateChangedNotification() {} void OnDeviceStateChangedNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if ((*message_)[strings::msg_params]["deviceState"] == hmi_apis::Common_DeviceState::UNPAIRED) { @@ -110,11 +112,11 @@ void OnDeviceStateChangedNotification::Run() { } } else { // Policy uses hashed MAC address as device_id - LOG4CXX_DEBUG(logger_, "Device_id from HMI: " << device_id); + SDL_LOG_DEBUG("Device_id from HMI: " << device_id); std::string bt_mac = convert_to_bt_mac(device_id); - LOG4CXX_DEBUG(logger_, "Device_id as BT MAC: " << bt_mac); + SDL_LOG_DEBUG("Device_id as BT MAC: " << bt_mac); device_id = encryption::MakeHash(bt_mac); - LOG4CXX_DEBUG(logger_, "Device_id hashed as BT MAC : " << device_id); + SDL_LOG_DEBUG("Device_id hashed as BT MAC : " << device_id); } policy_handler_.RemoveDevice(device_id); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_driver_distraction_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_driver_distraction_notification.cc index a743c58672..f701713d96 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_driver_distraction_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_driver_distraction_notification.cc @@ -124,6 +124,8 @@ struct OnDriverDistractionProcessor { }; } // namespace +SDL_CREATE_LOG_VARIABLE("Commands") + OnDriverDistractionNotification::OnDriverDistractionNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -139,7 +141,7 @@ OnDriverDistractionNotification::OnDriverDistractionNotification( OnDriverDistractionNotification::~OnDriverDistractionNotification() {} void OnDriverDistractionNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const auto state = static_cast<hmi_apis::Common_DriverDistractionState::eType>( (*message_)[strings::msg_params][hmi_notification::state].asInt()); @@ -147,7 +149,7 @@ void OnDriverDistractionNotification::Run() { auto on_driver_distraction = std::make_shared<smart_objects::SmartObject>(); if (!on_driver_distraction) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); return; } (*on_driver_distraction)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_event_changed_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_event_changed_notification.cc index f6ea22ae34..13e76979a4 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_event_changed_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_event_changed_notification.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnEventChangedNotification::OnEventChangedNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ OnEventChangedNotification::OnEventChangedNotification( OnEventChangedNotification::~OnEventChangedNotification() {} void OnEventChangedNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event( hmi_apis::FunctionID::BasicCommunication_OnEventChanged); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_all_applications_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_all_applications_notification.cc index 4c168f9eff..079e4f3d10 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_all_applications_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_all_applications_notification.cc @@ -46,6 +46,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnExitAllApplicationsNotification::OnExitAllApplicationsNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -61,12 +63,12 @@ OnExitAllApplicationsNotification::OnExitAllApplicationsNotification( OnExitAllApplicationsNotification::~OnExitAllApplicationsNotification() {} void OnExitAllApplicationsNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const hmi_apis::Common_ApplicationsCloseReason::eType reason = static_cast<hmi_apis::Common_ApplicationsCloseReason::eType>( (*message_)[strings::msg_params][hmi_request::reason].asInt()); - LOG4CXX_DEBUG(logger_, "Reason " << reason); + SDL_LOG_DEBUG("Reason " << reason); mobile_api::AppInterfaceUnregisteredReason::eType mob_reason = mobile_api::AppInterfaceUnregisteredReason::INVALID_ENUM; @@ -90,7 +92,7 @@ void OnExitAllApplicationsNotification::Run() { return; } default: { - LOG4CXX_ERROR(logger_, "Unknown Application close reason" << reason); + SDL_LOG_ERROR("Unknown Application close reason" << reason); return; } } @@ -106,7 +108,7 @@ void OnExitAllApplicationsNotification::Run() { } void OnExitAllApplicationsNotification::SendOnSDLPersistenceComplete() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); smart_objects::SmartObjectSPtr message = std::make_shared<smart_objects::SmartObject>( diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_application_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_application_notification.cc index 34365c12e5..2b95d2e3e8 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_application_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_application_notification.cc @@ -44,6 +44,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnExitApplicationNotification::OnExitApplicationNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -59,7 +61,7 @@ OnExitApplicationNotification::OnExitApplicationNotification( OnExitApplicationNotification::~OnExitApplicationNotification() {} void OnExitApplicationNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace mobile_apis; using namespace hmi_apis; @@ -68,7 +70,7 @@ void OnExitApplicationNotification::Run() { ApplicationSharedPtr app_impl = application_manager_.application(app_id); if (app_impl.use_count() == 0) { - LOG4CXX_ERROR(logger_, "Application does not exist"); + SDL_LOG_ERROR("Application does not exist"); return; } @@ -122,7 +124,7 @@ void OnExitApplicationNotification::Run() { } default: { - LOG4CXX_WARN(logger_, "Unhandled reason"); + SDL_LOG_WARN("Unhandled reason"); return; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_file_removed_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_file_removed_notification.cc index e1f0e2b104..d96f0498a5 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_file_removed_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_file_removed_notification.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnFileRemovedNotification::OnFileRemovedNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ OnFileRemovedNotification::OnFileRemovedNotification( OnFileRemovedNotification::~OnFileRemovedNotification() {} void OnFileRemovedNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_find_applications.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_find_applications.cc index 2e8f15387f..5f03d5ffa0 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_find_applications.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_find_applications.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnFindApplications::OnFindApplications( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ OnFindApplications::OnFindApplications( OnFindApplications::~OnFindApplications() {} void OnFindApplications::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // TODO(PV): add UpdateAppsOnDevice to ApplicationManager } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ignition_cycle_over_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ignition_cycle_over_notification.cc index 1e8da19c0a..2af2d1c2d6 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ignition_cycle_over_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ignition_cycle_over_notification.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnIgnitionCycleOverNotification::OnIgnitionCycleOverNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ OnIgnitionCycleOverNotification::OnIgnitionCycleOverNotification( OnIgnitionCycleOverNotification::~OnIgnitionCycleOverNotification() {} void OnIgnitionCycleOverNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); policy_handler_.OnIgnitionCycleOver(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_tbt_client_state_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_tbt_client_state_notification.cc index f611b81764..01de5ccb06 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_tbt_client_state_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_tbt_client_state_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnNaviTBTClientStateNotification::OnNaviTBTClientStateNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnNaviTBTClientStateNotification::OnNaviTBTClientStateNotification( OnNaviTBTClientStateNotification::~OnNaviTBTClientStateNotification() {} void OnNaviTBTClientStateNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_way_point_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_way_point_change_notification.cc index 2a1a9c29fb..2440e918b7 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_way_point_change_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_way_point_change_notification.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnNaviWayPointChangeNotification::OnNaviWayPointChangeNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& app_man, @@ -49,7 +51,7 @@ OnNaviWayPointChangeNotification::OnNaviWayPointChangeNotification( OnNaviWayPointChangeNotification::~OnNaviWayPointChangeNotification() {} void OnNaviWayPointChangeNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_policy_update.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_policy_update.cc index a0e75371b5..b883ac5c16 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_policy_update.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_policy_update.cc @@ -38,6 +38,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnPolicyUpdate::OnPolicyUpdate( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnPolicyUpdate::OnPolicyUpdate( OnPolicyUpdate::~OnPolicyUpdate() {} void OnPolicyUpdate::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); policy_handler_.OnPTExchangeNeeded(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_put_file_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_put_file_notification.cc index 441e36a385..9349bc326d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_put_file_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_put_file_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnPutFileNotification::OnPutFileNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnPutFileNotification::OnPutFileNotification( OnPutFileNotification::~OnPutFileNotification() {} void OnPutFileNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ready_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ready_notification.cc index c9270fd80b..ef92c28ba4 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ready_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ready_notification.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnReadyNotification::OnReadyNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ OnReadyNotification::OnReadyNotification( OnReadyNotification::~OnReadyNotification() {} void OnReadyNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); application_manager_.OnHMIReady(); event_engine::Event event(hmi_apis::FunctionID::BasicCommunication_OnReady); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_received_policy_update.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_received_policy_update.cc index b2c9151b40..2f5901c9e2 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_received_policy_update.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_received_policy_update.cc @@ -41,6 +41,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnReceivedPolicyUpdate::OnReceivedPolicyUpdate( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,20 +58,20 @@ OnReceivedPolicyUpdate::OnReceivedPolicyUpdate( OnReceivedPolicyUpdate::~OnReceivedPolicyUpdate() {} void OnReceivedPolicyUpdate::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); #if defined(PROPRIETARY_MODE) || defined(EXTERNAL_PROPRIETARY_MODE) const std::string& file_path = (*message_)[strings::msg_params][hmi_notification::policyfile].asString(); policy::BinaryMessage file_content; if (!file_system::ReadBinaryFile(file_path, file_content)) { - LOG4CXX_ERROR(logger_, "Failed to read Update file."); + SDL_LOG_ERROR("Failed to read Update file."); return; } policy_handler_.ReceiveMessageFromSDK(file_path, file_content); #else - LOG4CXX_WARN(logger_, - "This RPC is part of extended policy flow." - "Please re-build with extended policy mode enabled."); + SDL_LOG_WARN( + "This RPC is part of extended policy flow. " + "Please re-build with extended policy mode enabled."); #endif } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_record_start_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_record_start_notification.cc index dbef717539..e05c5860db 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_record_start_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_record_start_notification.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnRecordStartdNotification::OnRecordStartdNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ OnRecordStartdNotification::OnRecordStartdNotification( OnRecordStartdNotification::~OnRecordStartdNotification() {} void OnRecordStartdNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_resume_audio_source_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_resume_audio_source_notification.cc index 11d549655e..a56a6a26e1 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_resume_audio_source_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_resume_audio_source_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnResumeAudioSourceNotification::OnResumeAudioSourceNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnResumeAudioSourceNotification::OnResumeAudioSourceNotification( OnResumeAudioSourceNotification::~OnResumeAudioSourceNotification() {} void OnResumeAudioSourceNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_close_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_close_notification.cc index d0c584c66c..90a6cdf1ce 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_close_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_close_notification.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnSDLCloseNotification::OnSDLCloseNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ OnSDLCloseNotification::OnSDLCloseNotification( OnSDLCloseNotification::~OnSDLCloseNotification() {} void OnSDLCloseNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_consent_needed_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_consent_needed_notification.cc index 314a9e8f71..0774414222 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_consent_needed_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_consent_needed_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnSDLConsentNeededNotification::OnSDLConsentNeededNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnSDLConsentNeededNotification::OnSDLConsentNeededNotification( OnSDLConsentNeededNotification::~OnSDLConsentNeededNotification() {} void OnSDLConsentNeededNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_persistence_complete_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_persistence_complete_notification.cc index 5db38d070b..efa880f484 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_persistence_complete_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_persistence_complete_notification.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnSDLPersistenceCompleteNotification::OnSDLPersistenceCompleteNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ OnSDLPersistenceCompleteNotification::OnSDLPersistenceCompleteNotification( OnSDLPersistenceCompleteNotification::~OnSDLPersistenceCompleteNotification() {} void OnSDLPersistenceCompleteNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_service_update_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_service_update_notification.cc index de03b75214..c1f8c337bb 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_service_update_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_service_update_notification.cc @@ -39,6 +39,8 @@ namespace commands { namespace hmi { +SDL_CREATE_LOG_VARIABLE("Commands") + OnServiceUpdateNotification::OnServiceUpdateNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ OnServiceUpdateNotification::OnServiceUpdateNotification( OnServiceUpdateNotification::~OnServiceUpdateNotification() {} void OnServiceUpdateNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_start_device_discovery.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_start_device_discovery.cc index 035def10e0..5e86618b31 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_start_device_discovery.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_start_device_discovery.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnStartDeviceDiscovery::OnStartDeviceDiscovery( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ OnStartDeviceDiscovery::OnStartDeviceDiscovery( OnStartDeviceDiscovery::~OnStartDeviceDiscovery() {} void OnStartDeviceDiscovery::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); application_manager_.StartDevicesDiscovery(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_status_update_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_status_update_notification.cc index 5ee2ede198..4a2e310151 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_status_update_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_status_update_notification.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnStatusUpdateNotification::OnStatusUpdateNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ OnStatusUpdateNotification::OnStatusUpdateNotification( OnStatusUpdateNotification::~OnStatusUpdateNotification() {} void OnStatusUpdateNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_context_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_context_notification.cc index bf52492ae1..c86ef48225 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_context_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_context_notification.cc @@ -40,6 +40,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnSystemContextNotification::OnSystemContextNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ OnSystemContextNotification::OnSystemContextNotification( OnSystemContextNotification::~OnSystemContextNotification() {} void OnSystemContextNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); mobile_api::SystemContext::eType system_context = static_cast<mobile_api::SystemContext::eType>( @@ -93,7 +95,7 @@ void OnSystemContextNotification::Run() { application_manager_.state_controller().SetRegularState( app, window_id, system_context); } else { - LOG4CXX_ERROR(logger_, "Application does not exist"); + SDL_LOG_ERROR("Application does not exist"); } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_error_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_error_notification.cc index 9b8523e882..1f0d02ac83 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_error_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_error_notification.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnSystemErrorNotification::OnSystemErrorNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ OnSystemErrorNotification::OnSystemErrorNotification( OnSystemErrorNotification::~OnSystemErrorNotification() {} void OnSystemErrorNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const int code = (*message_)[strings::msg_params][hmi_notification::error].asInt(); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_info_changed_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_info_changed_notification.cc index 171c144055..6a3b814d05 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_info_changed_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_info_changed_notification.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnSystemInfoChangedNotification::OnSystemInfoChangedNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ OnSystemInfoChangedNotification::OnSystemInfoChangedNotification( OnSystemInfoChangedNotification::~OnSystemInfoChangedNotification() {} void OnSystemInfoChangedNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); uint32_t lang_code = (*message_)[strings::msg_params][strings::language].asUInt(); const std::string language = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_request_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_request_notification.cc index 4f83e3e653..b75081e30f 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_request_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_request_notification.cc @@ -48,6 +48,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnSystemRequestNotification::OnSystemRequestNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -63,7 +65,7 @@ OnSystemRequestNotification::OnSystemRequestNotification( OnSystemRequestNotification::~OnSystemRequestNotification() {} void OnSystemRequestNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); smart_objects::SmartObject& params = (*message_)[strings::params]; smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params]; @@ -96,8 +98,7 @@ void OnSystemRequestNotification::Run() { msg_params[strings::url] = policy_handler_.GetNextUpdateUrl( policy::PTUIterationType::DefaultIteration, app_id); if (0 == app_id) { - LOG4CXX_WARN(logger_, - "Can't select application to forward OnSystemRequest."); + SDL_LOG_WARN("Can't select application to forward OnSystemRequest."); return; } msg_params[strings::app_id] = app_id; @@ -110,26 +111,24 @@ void OnSystemRequestNotification::Run() { ApplicationSharedPtr app; if (msg_params.keyExists(strings::app_id)) { const uint32_t app_id = msg_params[strings::app_id].asUInt(); - LOG4CXX_DEBUG(logger_, "Received OnSystemRequest for appID " << app_id); - LOG4CXX_DEBUG(logger_, "Searching app to send OnSystemRequest by appID."); + SDL_LOG_DEBUG("Received OnSystemRequest for appID " << app_id); + SDL_LOG_DEBUG("Searching app to send OnSystemRequest by appID."); app = application_manager_.application(app_id); } else { - LOG4CXX_DEBUG(logger_, - "Received OnSystemRequest without appID." - " One of registered apps will be used."); - LOG4CXX_DEBUG(logger_, "Searching registered app to send OnSystemRequest."); + SDL_LOG_DEBUG( + "Received OnSystemRequest without appID." + " One of registered apps will be used."); + SDL_LOG_DEBUG("Searching registered app to send OnSystemRequest."); const uint32_t selected_app_id = policy_handler_.GetAppIdForSending(); if (0 == selected_app_id) { - LOG4CXX_WARN(logger_, - "Can't select application to forward OnSystemRequest."); + SDL_LOG_WARN("Can't select application to forward OnSystemRequest."); return; } app = application_manager_.application(selected_app_id); } if (app.use_count() == 0) { - LOG4CXX_WARN(logger_, - "No valid application found to forward OnSystemRequest."); + SDL_LOG_WARN("No valid application found to forward OnSystemRequest."); return; } @@ -140,16 +139,14 @@ void OnSystemRequestNotification::Run() { if (policy::kDeviceAllowed != policy_handler_.GetUserConsentForDevice(device_mac)) { - LOG4CXX_WARN(logger_, - "Application " - << app->policy_app_id() - << " is registered from non-consented device." - "Can't forward notification to application."); + SDL_LOG_WARN("Application " + << app->policy_app_id() + << " is registered from non-consented device. " + "Can't forward notification to application."); return; } - LOG4CXX_DEBUG(logger_, - "Sending request with application id " << app->policy_app_id()); + SDL_LOG_DEBUG("Sending request with application id " << app->policy_app_id()); params[strings::connection_key] = app->app_id(); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_time_ready_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_time_ready_notification.cc index b068835545..980c2ded17 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_time_ready_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_time_ready_notification.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnSystemTimeReadyNotification::OnSystemTimeReadyNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& app_man, diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc index 293857f8d5..f652761178 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc @@ -42,6 +42,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnTTSLanguageChangeNotification::OnTTSLanguageChangeNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -57,7 +59,7 @@ OnTTSLanguageChangeNotification::OnTTSLanguageChangeNotification( OnTTSLanguageChangeNotification::~OnTTSLanguageChangeNotification() {} void OnTTSLanguageChangeNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); hmi_capabilities_.set_active_tts_language( static_cast<hmi_apis::Common_Language::eType>( @@ -72,14 +74,12 @@ void OnTTSLanguageChangeNotification::Run() { std::vector<std::string> sections_to_update{hmi_response::language}; if (!hmi_capabilities_.SaveCachedCapabilitiesToFile( hmi_interface::tts, sections_to_update, message_->getSchema())) { - LOG4CXX_ERROR(logger_, - "Failed to save TTS.OnLanguageChange response to cache"); + SDL_LOG_ERROR("Failed to save TTS.OnLanguageChange response to cache"); } if (!hmi_capabilities_.SaveCachedCapabilitiesToFile( hmi_interface::vr, sections_to_update, message_->getSchema())) { - LOG4CXX_ERROR(logger_, - "Failed to save VR.OnLanguageChange response to cache"); + SDL_LOG_ERROR("Failed to save VR.OnLanguageChange response to cache"); } (*message_)[strings::msg_params][strings::hmi_display_language] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_reset_timeout_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_reset_timeout_notification.cc index 8b60762b31..96f6c5cd5b 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_reset_timeout_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_reset_timeout_notification.cc @@ -40,6 +40,8 @@ namespace commands { namespace hmi { +SDL_CREATE_LOG_VARIABLE("Commands") + OnTTSResetTimeoutNotification::OnTTSResetTimeoutNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ OnTTSResetTimeoutNotification::OnTTSResetTimeoutNotification( OnTTSResetTimeoutNotification::~OnTTSResetTimeoutNotification() {} void OnTTSResetTimeoutNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::TTS_OnResetTimeout); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_started_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_started_notification.cc index 2d215b2ec9..4126a1bd21 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_started_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_started_notification.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnTTSStartedNotification::OnTTSStartedNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ OnTTSStartedNotification::OnTTSStartedNotification( OnTTSStartedNotification::~OnTTSStartedNotification() {} void OnTTSStartedNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::TTS_Started); event.set_smart_object(*message_); event.raise(application_manager_.event_dispatcher()); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_stopped_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_stopped_notification.cc index 6910b188f2..da69c4670e 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_stopped_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_stopped_notification.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnTTSStoppedNotification::OnTTSStoppedNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ OnTTSStoppedNotification::OnTTSStoppedNotification( OnTTSStoppedNotification::~OnTTSStoppedNotification() {} void OnTTSStoppedNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::TTS_Stopped); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_command_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_command_notification.cc index 6cc9f85d6f..939e3ad649 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_command_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_command_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnUICommandNotification::OnUICommandNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnUICommandNotification::OnUICommandNotification( OnUICommandNotification::~OnUICommandNotification() {} void OnUICommandNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); (*message_)[strings::params][strings::function_id] = static_cast<int32_t>(mobile_apis::FunctionID::eType::OnCommandID); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_keyboard_input_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_keyboard_input_notification.cc index f069e4ed65..d1aa146e4f 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_keyboard_input_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_keyboard_input_notification.cc @@ -40,6 +40,8 @@ namespace commands { namespace hmi { +SDL_CREATE_LOG_VARIABLE("Commands") + OnUIKeyBoardInputNotification::OnUIKeyBoardInputNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ OnUIKeyBoardInputNotification::OnUIKeyBoardInputNotification( OnUIKeyBoardInputNotification::~OnUIKeyBoardInputNotification() {} void OnUIKeyBoardInputNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_language_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_language_change_notification.cc index 995d69cc45..2f2cb2ddc6 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_language_change_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_language_change_notification.cc @@ -42,6 +42,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnUILanguageChangeNotification::OnUILanguageChangeNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -57,7 +59,7 @@ OnUILanguageChangeNotification::OnUILanguageChangeNotification( OnUILanguageChangeNotification::~OnUILanguageChangeNotification() {} void OnUILanguageChangeNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); hmi_capabilities_.set_active_ui_language( static_cast<hmi_apis::Common_Language::eType>( @@ -66,8 +68,7 @@ void OnUILanguageChangeNotification::Run() { std::vector<std::string> sections_to_update{hmi_response::language}; if (!hmi_capabilities_.SaveCachedCapabilitiesToFile( hmi_interface::ui, sections_to_update, message_->getSchema())) { - LOG4CXX_ERROR(logger_, - "Failed to save UI.OnLanguageChange response to cache"); + SDL_LOG_ERROR("Failed to save UI.OnLanguageChange response to cache"); } (*message_)[strings::msg_params][strings::hmi_display_language] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_reset_timeout_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_reset_timeout_notification.cc index bd1e1b8ea7..d8de31cfbc 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_reset_timeout_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_reset_timeout_notification.cc @@ -41,6 +41,8 @@ namespace commands { namespace hmi { +SDL_CREATE_LOG_VARIABLE("Commands") + OnUIResetTimeoutNotification::OnUIResetTimeoutNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,7 +58,7 @@ OnUIResetTimeoutNotification::OnUIResetTimeoutNotification( OnUIResetTimeoutNotification::~OnUIResetTimeoutNotification() {} void OnUIResetTimeoutNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_OnResetTimeout); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_subtle_alert_pressed_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_subtle_alert_pressed_notification.cc index b2f5f80055..dedeb38a34 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_subtle_alert_pressed_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_subtle_alert_pressed_notification.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnUISubtleAlertPressedNotification::OnUISubtleAlertPressedNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ OnUISubtleAlertPressedNotification::OnUISubtleAlertPressedNotification( OnUISubtleAlertPressedNotification::~OnUISubtleAlertPressedNotification() {} void OnUISubtleAlertPressedNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); (*message_)[strings::params][strings::function_id] = static_cast<int32_t>( mobile_apis::FunctionID::eType::OnSubtleAlertPressedID); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_touch_event_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_touch_event_notification.cc index 193c3666d2..ae980070ea 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_touch_event_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_touch_event_notification.cc @@ -40,6 +40,8 @@ namespace commands { namespace hmi { +SDL_CREATE_LOG_VARIABLE("Commands") + OnUITouchEventNotification::OnUITouchEventNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ OnUITouchEventNotification::OnUITouchEventNotification( OnUITouchEventNotification::~OnUITouchEventNotification() {} void OnUITouchEventNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_update_file_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_update_file_notification.cc index 4c6157c48d..b0821a0890 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_update_file_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_update_file_notification.cc @@ -40,6 +40,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnUIUpdateFileNotification::OnUIUpdateFileNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ OnUIUpdateFileNotification::OnUIUpdateFileNotification( OnUIUpdateFileNotification::~OnUIUpdateFileNotification() {} void OnUIUpdateFileNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // Prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = @@ -66,8 +68,7 @@ void OnUIUpdateFileNotification::Run() { auto app = application_manager_.application(app_id); if (!app) { - LOG4CXX_ERROR(logger_, - "Application with app_id " << app_id << " is not registered"); + SDL_LOG_ERROR("Application with app_id " << app_id << " is not registered"); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_update_sub_menu_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_update_sub_menu_notification.cc index 4f867fd3bd..2e8c37f7cd 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_update_sub_menu_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_update_sub_menu_notification.cc @@ -39,6 +39,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnUIUpdateSubMenuNotification::OnUIUpdateSubMenuNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ OnUIUpdateSubMenuNotification::OnUIUpdateSubMenuNotification( OnUIUpdateSubMenuNotification::~OnUIUpdateSubMenuNotification() {} void OnUIUpdateSubMenuNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // Prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = static_cast<int32_t>(mobile_apis::FunctionID::OnUpdateSubMenuID); @@ -64,8 +66,7 @@ void OnUIUpdateSubMenuNotification::Run() { auto app = application_manager_.application(app_id); if (!app) { - LOG4CXX_ERROR(logger_, - "Application with app_id " << app_id << " is not registered"); + SDL_LOG_ERROR("Application with app_id " << app_id << " is not registered"); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_update_device_list.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_update_device_list.cc index e6275adab2..0ff97a664c 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_update_device_list.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_update_device_list.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnUpdateDeviceList::OnUpdateDeviceList( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ OnUpdateDeviceList::OnUpdateDeviceList( OnUpdateDeviceList::~OnUpdateDeviceList() {} void OnUpdateDeviceList::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); } } // namespace commands diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_acc_pedal_position_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_acc_pedal_position_notification.cc index 99c6520fee..9f4e707b83 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_acc_pedal_position_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_acc_pedal_position_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVIAccPedalPositionNotification::OnVIAccPedalPositionNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVIAccPedalPositionNotification::OnVIAccPedalPositionNotification( OnVIAccPedalPositionNotification::~OnVIAccPedalPositionNotification() {} void OnVIAccPedalPositionNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_belt_status_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_belt_status_notification.cc index dbfd9487e3..4227847153 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_belt_status_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_belt_status_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVIBeltStatusNotification::OnVIBeltStatusNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVIBeltStatusNotification::OnVIBeltStatusNotification( OnVIBeltStatusNotification::~OnVIBeltStatusNotification() {} void OnVIBeltStatusNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_body_information_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_body_information_notification.cc index b8e66b9c0f..663f9342f4 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_body_information_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_body_information_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVIBodyInformationNotification::OnVIBodyInformationNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVIBodyInformationNotification::OnVIBodyInformationNotification( OnVIBodyInformationNotification::~OnVIBodyInformationNotification() {} void OnVIBodyInformationNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_device_status_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_device_status_notification.cc index 418c751d1c..62bec16546 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_device_status_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_device_status_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVIDeviceStatusNotification::OnVIDeviceStatusNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVIDeviceStatusNotification::OnVIDeviceStatusNotification( OnVIDeviceStatusNotification::~OnVIDeviceStatusNotification() {} void OnVIDeviceStatusNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_driver_braking_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_driver_braking_notification.cc index 29545fcd87..722fddc5f1 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_driver_braking_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_driver_braking_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVIDriverBrakingNotification::OnVIDriverBrakingNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVIDriverBrakingNotification::OnVIDriverBrakingNotification( OnVIDriverBrakingNotification::~OnVIDriverBrakingNotification() {} void OnVIDriverBrakingNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_engine_torque_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_engine_torque_notification.cc index 4c2fb94400..8c524a3f1d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_engine_torque_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_engine_torque_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVIEngineTorqueNotification::OnVIEngineTorqueNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVIEngineTorqueNotification::OnVIEngineTorqueNotification( OnVIEngineTorqueNotification::~OnVIEngineTorqueNotification() {} void OnVIEngineTorqueNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_external_temperature_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_external_temperature_notification.cc index 6ac26a74fc..3cbd22eb97 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_external_temperature_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_external_temperature_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVIExternalTemperatureNotification::OnVIExternalTemperatureNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVIExternalTemperatureNotification::OnVIExternalTemperatureNotification( OnVIExternalTemperatureNotification::~OnVIExternalTemperatureNotification() {} void OnVIExternalTemperatureNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_notification.cc index 1f1cad5b8b..8065434063 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVIFuelLevelNotification::OnVIFuelLevelNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVIFuelLevelNotification::OnVIFuelLevelNotification( OnVIFuelLevelNotification::~OnVIFuelLevelNotification() {} void OnVIFuelLevelNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_state_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_state_notification.cc index 31c80860fd..c0c60108f3 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_state_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_state_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVIFuelLevelStateNotification::OnVIFuelLevelStateNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVIFuelLevelStateNotification::OnVIFuelLevelStateNotification( OnVIFuelLevelStateNotification::~OnVIFuelLevelStateNotification() {} void OnVIFuelLevelStateNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_gps_data_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_gps_data_notification.cc index 43ae3524ad..1e18d18eba 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_gps_data_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_gps_data_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVIGpsDataNotification::OnVIGpsDataNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVIGpsDataNotification::OnVIGpsDataNotification( OnVIGpsDataNotification::~OnVIGpsDataNotification() {} void OnVIGpsDataNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_head_lamp_status_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_head_lamp_status_notification.cc index 282a173b69..29906df43f 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_head_lamp_status_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_head_lamp_status_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVIHeadLampStatusNotification::OnVIHeadLampStatusNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVIHeadLampStatusNotification::OnVIHeadLampStatusNotification( OnVIHeadLampStatusNotification::~OnVIHeadLampStatusNotification() {} void OnVIHeadLampStatusNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc index f9bb3eca3f..c4bc32e825 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVIInstantFuelConsumptionNotification::OnVIInstantFuelConsumptionNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ OnVIInstantFuelConsumptionNotification:: ~OnVIInstantFuelConsumptionNotification() {} void OnVIInstantFuelConsumptionNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_my_key_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_my_key_notification.cc index 8f5e845c02..6139d143f6 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_my_key_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_my_key_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVIMyKeyNotification::OnVIMyKeyNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVIMyKeyNotification::OnVIMyKeyNotification( OnVIMyKeyNotification::~OnVIMyKeyNotification() {} void OnVIMyKeyNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_odometer_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_odometer_notification.cc index ea5d8be9ca..92f4b47fcf 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_odometer_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_odometer_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVIOdometerNotification::OnVIOdometerNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVIOdometerNotification::OnVIOdometerNotification( OnVIOdometerNotification::~OnVIOdometerNotification() {} void OnVIOdometerNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_prndl_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_prndl_notification.cc index 73231ff4de..c2afd7d697 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_prndl_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_prndl_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVIPrndlNotification::OnVIPrndlNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVIPrndlNotification::OnVIPrndlNotification( OnVIPrndlNotification::~OnVIPrndlNotification() {} void OnVIPrndlNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_rpm_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_rpm_notification.cc index 4587939b8f..f41f5d3f56 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_rpm_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_rpm_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVIRpmNotification::OnVIRpmNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVIRpmNotification::OnVIRpmNotification( OnVIRpmNotification::~OnVIRpmNotification() {} void OnVIRpmNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_speed_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_speed_notification.cc index df0bfd5cd7..73313b6ea4 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_speed_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_speed_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVISpeedNotification::OnVISpeedNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVISpeedNotification::OnVISpeedNotification( OnVISpeedNotification::~OnVISpeedNotification() {} void OnVISpeedNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc index b7eaad7edf..e04eaab3b4 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVISteeringWheelAngleNotification::OnVISteeringWheelAngleNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVISteeringWheelAngleNotification::OnVISteeringWheelAngleNotification( OnVISteeringWheelAngleNotification::~OnVISteeringWheelAngleNotification() {} void OnVISteeringWheelAngleNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_tire_pressure_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_tire_pressure_notification.cc index 5f438ef8d1..bc013c2e2c 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_tire_pressure_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_tire_pressure_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVITirePressureNotification::OnVITirePressureNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVITirePressureNotification::OnVITirePressureNotification( OnVITirePressureNotification::~OnVITirePressureNotification() {} void OnVITirePressureNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_vin_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_vin_notification.cc index 1b40da4c40..4b33c2d589 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_vin_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_vin_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVIVinNotification::OnVIVinNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVIVinNotification::OnVIVinNotification( OnVIVinNotification::~OnVIVinNotification() {} void OnVIVinNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_wiper_status_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_wiper_status_notification.cc index 7221e88ef1..dde1e642c3 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_wiper_status_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_wiper_status_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVIWiperStatusNotification::OnVIWiperStatusNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVIWiperStatusNotification::OnVIWiperStatusNotification( OnVIWiperStatusNotification::~OnVIWiperStatusNotification() {} void OnVIWiperStatusNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // prepare SmartObject for mobile factory (*message_)[strings::params][strings::function_id] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_video_data_streaming_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_video_data_streaming_notification.cc index 7d5c0165aa..a2e56300f0 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_video_data_streaming_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_video_data_streaming_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVideoDataStreamingNotification::OnVideoDataStreamingNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnVideoDataStreamingNotification::OnVideoDataStreamingNotification( OnVideoDataStreamingNotification::~OnVideoDataStreamingNotification() {} void OnVideoDataStreamingNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_command_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_command_notification.cc index c4678f69e0..366a17ec64 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_command_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_command_notification.cc @@ -45,6 +45,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVRCommandNotification::OnVRCommandNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -60,14 +62,14 @@ OnVRCommandNotification::OnVRCommandNotification( OnVRCommandNotification::~OnVRCommandNotification() {} void OnVRCommandNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const uint32_t cmd_id = (*message_)[strings::msg_params][strings::cmd_id].asUInt(); uint32_t max_cmd_id = application_manager_.get_settings().max_cmd_id(); // Check if this is one of standard VR commands (i.e. "Help") if (cmd_id > max_cmd_id + 1) { - LOG4CXX_INFO(logger_, "Switched App"); + SDL_LOG_INFO("Switched App"); const uint32_t app_id = cmd_id - max_cmd_id; ApplicationSharedPtr app = application_manager_.application(app_id); if (app) { @@ -77,7 +79,7 @@ void OnVRCommandNotification::Run() { mobile_apis::HMILevel::HMI_FULL, true); } else { - LOG4CXX_ERROR(logger_, "Unable to find appication " << app_id); + SDL_LOG_ERROR("Unable to find appication " << app_id); } return; } @@ -90,7 +92,7 @@ void OnVRCommandNotification::Run() { (*message_)[strings::msg_params][strings::app_id].asUInt(); ApplicationSharedPtr app = application_manager_.application(app_id); if (!app) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); return; } /* check if perform interaction is active diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_language_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_language_change_notification.cc index 1500f272ab..0fe84bc0df 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_language_change_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_language_change_notification.cc @@ -43,6 +43,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVRLanguageChangeNotification::OnVRLanguageChangeNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -58,7 +60,7 @@ OnVRLanguageChangeNotification::OnVRLanguageChangeNotification( OnVRLanguageChangeNotification::~OnVRLanguageChangeNotification() {} void OnVRLanguageChangeNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); hmi_capabilities_.set_active_vr_language( static_cast<hmi_apis::Common_Language::eType>( @@ -67,8 +69,7 @@ void OnVRLanguageChangeNotification::Run() { std::vector<std::string> sections_to_update{hmi_response::language}; if (!hmi_capabilities_.SaveCachedCapabilitiesToFile( hmi_interface::vr, sections_to_update, message_->getSchema())) { - LOG4CXX_ERROR(logger_, - "Failed to save VR.OnLanguageChange response to cache"); + SDL_LOG_ERROR("Failed to save VR.OnLanguageChange response to cache"); } (*message_)[strings::msg_params][strings::hmi_display_language] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_started_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_started_notification.cc index bfc033a865..ab0ef67535 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_started_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_started_notification.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVRStartedNotification::OnVRStartedNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ OnVRStartedNotification::OnVRStartedNotification( OnVRStartedNotification::~OnVRStartedNotification() {} void OnVRStartedNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::VR_Started); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_stopped_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_stopped_notification.cc index ede1efab85..e784eac244 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_stopped_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_stopped_notification.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnVRStoppedNotification::OnVRStoppedNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ OnVRStoppedNotification::OnVRStoppedNotification( OnVRStoppedNotification::~OnVRStoppedNotification() {} void OnVRStoppedNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::VR_Stopped); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_request.cc index d882dcd6e7..774acf54f1 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + RCGetCapabilitiesRequest::RCGetCapabilitiesRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,13 +54,13 @@ RCGetCapabilitiesRequest::RCGetCapabilitiesRequest( RCGetCapabilitiesRequest::~RCGetCapabilitiesRequest() {} void RCGetCapabilitiesRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } void RCGetCapabilitiesRequest::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); hmi_capabilities_.UpdateRequestsRequiredForCapabilities( hmi_apis::FunctionID::RC_GetCapabilities); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_response.cc index 910c12e979..10507a516f 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_response.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + RCGetCapabilitiesResponse::RCGetCapabilitiesResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ RCGetCapabilitiesResponse::RCGetCapabilitiesResponse( RCGetCapabilitiesResponse::~RCGetCapabilitiesResponse() {} void RCGetCapabilitiesResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const auto result_code = static_cast<hmi_apis::Common_Result::eType>( (*message_)[strings::params][hmi_response::code].asInt()); @@ -60,8 +62,7 @@ void RCGetCapabilitiesResponse::Run() { hmi_apis::FunctionID::RC_GetCapabilities); if (hmi_apis::Common_Result::SUCCESS != result_code) { - LOG4CXX_DEBUG(logger_, - "Request was not successful. Don't change HMI capabilities"); + SDL_LOG_DEBUG("Request was not successful. Don't change HMI capabilities"); return; } @@ -89,8 +90,7 @@ void RCGetCapabilitiesResponse::Run() { if (!hmi_capabilities_.SaveCachedCapabilitiesToFile( hmi_interface::rc, sections_to_update, message_->getSchema())) { - LOG4CXX_ERROR(logger_, - "Failed to save RC.GetCapabilities response to cache"); + SDL_LOG_ERROR("Failed to save RC.GetCapabilities response to cache"); } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_request.cc index 4ea0d43dc3..c9a9af87fb 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_request.cc @@ -41,6 +41,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + RCIsReadyRequest::RCIsReadyRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -57,17 +59,17 @@ RCIsReadyRequest::RCIsReadyRequest( RCIsReadyRequest::~RCIsReadyRequest() {} void RCIsReadyRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); subscribe_on_event(hmi_apis::FunctionID::RC_IsReady, correlation_id()); SendRequest(); } void RCIsReadyRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::RC_IsReady: { - LOG4CXX_DEBUG(logger_, "Received RC_IsReady event"); + SDL_LOG_DEBUG("Received RC_IsReady event"); unsubscribe_from_event(hmi_apis::FunctionID::RC_IsReady); const bool is_available = app_mngr::commands::ChangeInterfaceState( application_manager_, message, HmiInterfaces::HMI_INTERFACE_RC); @@ -82,15 +84,14 @@ void RCIsReadyRequest::on_event(const event_engine::Event& event) { application_manager_, HmiInterfaces::HMI_INTERFACE_RC)) { hmi_capabilities_.UpdateRequestsRequiredForCapabilities( hmi_apis::FunctionID::RC_GetCapabilities); - LOG4CXX_INFO(logger_, - "HmiInterfaces::HMI_INTERFACE_RC isn't available"); + SDL_LOG_INFO("HmiInterfaces::HMI_INTERFACE_RC isn't available"); return; } RequestInterfaceCapabilities(hmi_interface::rc); break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_response.cc index 71e16a831c..1ad9a30a23 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_response.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + RCIsReadyResponse::RCIsReadyResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ RCIsReadyResponse::RCIsReadyResponse( RCIsReadyResponse::~RCIsReadyResponse() {} void RCIsReadyResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::RC_IsReady); event.set_smart_object(*message_); event.raise(application_manager_.event_dispatcher()); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_request.cc index 0a6632fca8..527cf911b9 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_request.cc @@ -82,6 +82,8 @@ struct SendLaunchApp }; } // namespace +SDL_CREATE_LOG_VARIABLE("Commands") + SDLActivateAppRequest::SDLActivateAppRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -99,12 +101,11 @@ SDLActivateAppRequest::~SDLActivateAppRequest() {} uint32_t SDLActivateAppRequest::app_id() const { using namespace strings; if (!(*message_).keyExists(msg_params)) { - LOG4CXX_DEBUG(logger_, msg_params << " section is absent in the message."); + SDL_LOG_DEBUG(msg_params << " section is absent in the message."); return 0; } if (!(*message_)[msg_params].keyExists(strings::app_id)) { - LOG4CXX_DEBUG(logger_, - strings::app_id << " section is absent in the message."); + SDL_LOG_DEBUG(strings::app_id << " section is absent in the message."); return 0; } return (*message_)[msg_params][strings::app_id].asUInt(); @@ -112,22 +113,22 @@ uint32_t SDLActivateAppRequest::app_id() const { #ifdef EXTERNAL_PROPRIETARY_MODE void SDLActivateAppRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace hmi_apis::FunctionID; ApplicationConstSharedPtr app = application_manager_.WaitingApplicationByID(app_id()); if (application_manager_.state_controller().IsStateActive( HmiState::STATE_ID_DEACTIVATE_HMI)) { - LOG4CXX_DEBUG(logger_, - "DeactivateHmi state is active. " - "Sends response with result code REJECTED"); + SDL_LOG_DEBUG( + "DeactivateHmi state is active. " + "Sends response with result code REJECTED"); SendErrorResponse(correlation_id(), static_cast<eType>(function_id()), hmi_apis::Common_Result::REJECTED, "HMIDeactivate is active"); } else if (app && !app->IsRegistered() && app->is_cloud_app()) { - LOG4CXX_DEBUG(logger_, "Starting cloud application."); + SDL_LOG_DEBUG("Starting cloud application."); const ApplicationManagerSettings& settings = application_manager_.get_settings(); uint32_t total_retry_timeout = (settings.cloud_app_retry_timeout() * @@ -144,7 +145,7 @@ void SDLActivateAppRequest::Run() { #else // EXTERNAL_PROPRIETARY_MODE void SDLActivateAppRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace hmi_apis::FunctionID; using namespace hmi_apis::Common_Result; @@ -162,22 +163,20 @@ void SDLActivateAppRequest::Run() { application_manager_.WaitingApplicationByID(application_id); if (!app_to_activate) { - LOG4CXX_WARN( - logger_, + SDL_LOG_WARN( "Can't find application within waiting apps: " << application_id); return; } } - LOG4CXX_DEBUG(logger_, - "Found application to activate. Application id is " - << app_to_activate->app_id()); + SDL_LOG_DEBUG("Found application to activate. Application id is " + << app_to_activate->app_id()); if (application_manager_.state_controller().IsStateActive( HmiState::StateID::STATE_ID_DEACTIVATE_HMI)) { - LOG4CXX_WARN(logger_, - "DeactivateHmi state is active. " - "Sends response with result code REJECTED"); + SDL_LOG_WARN( + "DeactivateHmi state is active. " + "Sends response with result code REJECTED"); SendErrorResponse(correlation_id(), static_cast<hmi_apis::FunctionID::eType>(function_id()), hmi_apis::Common_Result::REJECTED, @@ -186,11 +185,11 @@ void SDLActivateAppRequest::Run() { } if (app_to_activate->IsRegistered()) { - LOG4CXX_DEBUG(logger_, "Application is registered. Activating."); + SDL_LOG_DEBUG("Application is registered. Activating."); policy_handler_.OnActivateApp(application_id, correlation_id()); return; } else if (app_to_activate->is_cloud_app()) { - LOG4CXX_DEBUG(logger_, "Starting cloud application."); + SDL_LOG_DEBUG("Starting cloud application."); const ApplicationManagerSettings& settings = application_manager_.get_settings(); uint32_t total_retry_timeout = (settings.cloud_app_retry_timeout() * @@ -208,29 +207,29 @@ void SDLActivateAppRequest::Run() { V4ProtoApps v4_proto_apps = get_v4_proto_apps(device_handle); if (!foreground_v4_app && v4_proto_apps.empty()) { - LOG4CXX_ERROR(logger_, - "Can't find regular foreground app with the same " - "connection id:" - << device_handle); + SDL_LOG_ERROR( + "Can't find regular foreground app with the same " + "connection id: " + << device_handle); SendErrorResponse( correlation_id(), SDL_ActivateApp, NO_APPS_REGISTERED, ""); return; } - LOG4CXX_DEBUG(logger_, - "Application is not registered yet. " - "Sending launch request."); + SDL_LOG_DEBUG( + "Application is not registered yet. " + "Sending launch request."); if (foreground_v4_app) { - LOG4CXX_DEBUG(logger_, "Sending request to foreground application."); + SDL_LOG_DEBUG("Sending request to foreground application."); MessageHelper::SendLaunchApp(foreground_v4_app->app_id(), app_to_activate->SchemaUrl(), app_to_activate->PackageName(), application_manager_); } else { - LOG4CXX_DEBUG(logger_, - "No preffered (foreground) application is found. " - "Sending request to all v4 applications."); + SDL_LOG_DEBUG( + "No preffered (foreground) application is found. " + "Sending request to all v4 applications."); std::for_each(v4_proto_apps.begin(), v4_proto_apps.end(), SendLaunchApp(app_to_activate, application_manager_)); @@ -266,8 +265,8 @@ void SDLActivateAppRequest::on_event(const event_engine::Event& event) { ApplicationSharedPtr app = application_manager_.application_by_hmi_app(hmi_application_id); if (!app) { - LOG4CXX_ERROR( - logger_, "Application not found by HMI app id: " << hmi_application_id); + SDL_LOG_ERROR( + "Application not found by HMI app id: " << hmi_application_id); return; } policy_handler_.OnActivateApp(app->app_id(), correlation_id()); @@ -277,16 +276,15 @@ uint32_t SDLActivateAppRequest::hmi_app_id( const smart_objects::SmartObject& so) const { using namespace strings; if (!so.keyExists(params)) { - LOG4CXX_DEBUG(logger_, params << " section is absent in the message."); + SDL_LOG_DEBUG(params << " section is absent in the message."); return 0; } if (!so[msg_params].keyExists(application)) { - LOG4CXX_DEBUG(logger_, application << " section is absent in the message."); + SDL_LOG_DEBUG(application << " section is absent in the message."); return 0; } if (!so[msg_params][application].keyExists(strings::app_id)) { - LOG4CXX_DEBUG(logger_, - strings::app_id << " section is absent in the message."); + SDL_LOG_DEBUG(strings::app_id << " section is absent in the message."); return 0; } return so[msg_params][application][strings::app_id].asUInt(); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_response.cc index 560b75213c..2748c23a65 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SDLActivateAppResponse::SDLActivateAppResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ SDLActivateAppResponse::SDLActivateAppResponse( SDLActivateAppResponse::~SDLActivateAppResponse() {} void SDLActivateAppResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_; (*message_)[strings::params][strings::protocol_version] = protocol_version_; diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_request.cc index c8266e0f39..6cf855904c 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_request.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SDLGetListOfPermissionsRequest::SDLGetListOfPermissionsRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ SDLGetListOfPermissionsRequest::SDLGetListOfPermissionsRequest( SDLGetListOfPermissionsRequest::~SDLGetListOfPermissionsRequest() {} void SDLGetListOfPermissionsRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); uint32_t connection_key = 0; if ((*message_)[strings::msg_params].keyExists(strings::app_id)) { connection_key = (*message_)[strings::msg_params][strings::app_id].asUInt(); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_response.cc index 280d2cb071..b27fe08b47 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SDLGetListOfPermissionsResponse::SDLGetListOfPermissionsResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ SDLGetListOfPermissionsResponse::SDLGetListOfPermissionsResponse( SDLGetListOfPermissionsResponse::~SDLGetListOfPermissionsResponse() {} void SDLGetListOfPermissionsResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_; (*message_)[strings::params][strings::protocol_version] = protocol_version_; diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_request.cc index 52b7f83e9b..7478a40eeb 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_request.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SDLGetPolicyConfigurationDataRequest::SDLGetPolicyConfigurationDataRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ SDLGetPolicyConfigurationDataRequest::SDLGetPolicyConfigurationDataRequest( SDLGetPolicyConfigurationDataRequest::~SDLGetPolicyConfigurationDataRequest() {} void SDLGetPolicyConfigurationDataRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); smart_objects::SmartObject response_value( smart_objects::SmartType::SmartType_Array); @@ -63,7 +65,7 @@ void SDLGetPolicyConfigurationDataRequest::Run() { PrepareResponseParams(response_value); if (hmi_apis::Common_Result::SUCCESS != result_code) { - LOG4CXX_ERROR(logger_, "Unable to PrepareResponseParams"); + SDL_LOG_ERROR("Unable to PrepareResponseParams"); SendErrorResponse( correlation_id(), hmi_apis::FunctionID::SDL_GetPolicyConfigurationData, @@ -87,7 +89,7 @@ void SDLGetPolicyConfigurationDataRequest::Run() { hmi_apis::Common_Result::eType SDLGetPolicyConfigurationDataRequest::PrepareResponseParams( smart_objects::SmartObject& response_out) const { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const auto policy_type = (*message_)[strings::msg_params][strings::policy_type].asString(); @@ -96,17 +98,15 @@ SDLGetPolicyConfigurationDataRequest::PrepareResponseParams( auto policy_table_data = policy_handler_.GetPolicyTableData(); if (!policy_table_data.isMember(policy_type)) { - LOG4CXX_ERROR( - logger_, - "policy_type " << policy_type << " doesn't exist in policy table."); + SDL_LOG_ERROR("policy_type " << policy_type + << " doesn't exist in policy table."); return hmi_apis::Common_Result::DATA_NOT_AVAILABLE; } auto& policy_section_table_data = policy_table_data[policy_type]; if (!policy_section_table_data.isMember(property)) { - LOG4CXX_ERROR( - logger_, - "property " << property << " doesn't exist in " << policy_type); + SDL_LOG_ERROR("property " << property << " doesn't exist in " + << policy_type); return hmi_apis::Common_Result::DATA_NOT_AVAILABLE; } @@ -126,7 +126,7 @@ void clear_new_line_symbol(std::string& str_to_clear) { smart_objects::SmartObject SDLGetPolicyConfigurationDataRequest::GetValueParam( const Json::Value& policy_property) const { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); smart_objects::SmartObject value(smart_objects::SmartType_Array); auto put_element_in_value_array = [&value](const Json::Value& element, diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_response.cc index 21b7dea41c..c934ef7bab 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SDLGetPolicyConfigurationDataResponse::SDLGetPolicyConfigurationDataResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ SDLGetPolicyConfigurationDataResponse:: ~SDLGetPolicyConfigurationDataResponse() {} void SDLGetPolicyConfigurationDataResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_; (*message_)[strings::params][strings::protocol_version] = protocol_version_; rpc_service_.SendMessageToHMI(message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_request.cc index b494be56e8..ce1cb6b098 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_request.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SDLGetStatusUpdateRequest::SDLGetStatusUpdateRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ SDLGetStatusUpdateRequest::SDLGetStatusUpdateRequest( SDLGetStatusUpdateRequest::~SDLGetStatusUpdateRequest() {} void SDLGetStatusUpdateRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); policy_handler_.OnGetStatusUpdate( (*message_)[strings::params][strings::correlation_id].asUInt()); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_response.cc index 4b0f3d0ca8..122c209906 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SDLGetStatusUpdateResponse::SDLGetStatusUpdateResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ SDLGetStatusUpdateResponse::SDLGetStatusUpdateResponse( SDLGetStatusUpdateResponse::~SDLGetStatusUpdateResponse() {} void SDLGetStatusUpdateResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_; (*message_)[strings::params][strings::protocol_version] = protocol_version_; diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_request.cc index f853cf814c..e58961e581 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_request.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SDLGetUserFriendlyMessageRequest::SDLGetUserFriendlyMessageRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,11 +56,10 @@ SDLGetUserFriendlyMessageRequest::SDLGetUserFriendlyMessageRequest( SDLGetUserFriendlyMessageRequest::~SDLGetUserFriendlyMessageRequest() {} void SDLGetUserFriendlyMessageRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const std::string messageCodes = "messageCodes"; if (!(*message_)[strings::msg_params].keyExists(messageCodes)) { - LOG4CXX_WARN(logger_, - "Mandatory parameter '" + messageCodes + "'' is missing"); + SDL_LOG_WARN("Mandatory parameter '" + messageCodes + "'' is missing"); return; } smart_objects::SmartArray* msg = @@ -71,7 +72,7 @@ void SDLGetUserFriendlyMessageRequest::Run() { for (; it != it_end; ++it) { std::string str = (*it).asString(); if (!CheckSyntax(str)) { - LOG4CXX_WARN(logger_, "Invalid data"); + SDL_LOG_WARN("Invalid data"); SendErrorResponse(correlation_id(), static_cast<hmi_apis::FunctionID::eType>(function_id()), hmi_apis::Common_Result::INVALID_DATA, diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_response.cc index b95591c4fa..b56a664e4a 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SDLGetUserFriendlyMessageResponse::SDLGetUserFriendlyMessageResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ SDLGetUserFriendlyMessageResponse::SDLGetUserFriendlyMessageResponse( SDLGetUserFriendlyMessageResponse::~SDLGetUserFriendlyMessageResponse() {} void SDLGetUserFriendlyMessageResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_; (*message_)[strings::params][strings::protocol_version] = protocol_version_; diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update.cc index 5f69903548..fa5e1beeb9 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SDLPolicyUpdate::SDLPolicyUpdate( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,13 +54,13 @@ SDLPolicyUpdate::SDLPolicyUpdate( SDLPolicyUpdate::~SDLPolicyUpdate() {} void SDLPolicyUpdate::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); #if defined(PROPRIETARY_MODE) || defined(EXTERNAL_PROPRIETARY_MODE) SendRequest(); #else - LOG4CXX_WARN(logger_, - "This RPC is part of extended policy flow." - "Please re-build with extended policy mode enabled."); + SDL_LOG_WARN( + "This RPC is part of extended policy flow. " + "Please re-build with extended policy mode enabled."); #endif } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update_response.cc index bfbf73270e..5b76a405d6 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update_response.cc @@ -37,6 +37,9 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { + +SDL_CREATE_LOG_VARIABLE("Commands") + SDLPolicyUpdateResponse::SDLPolicyUpdateResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +55,7 @@ SDLPolicyUpdateResponse::SDLPolicyUpdateResponse( SDLPolicyUpdateResponse::~SDLPolicyUpdateResponse() {} void SDLPolicyUpdateResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const hmi_apis::Common_Result::eType code = static_cast<hmi_apis::Common_Result::eType>( (*message_)[strings::params][hmi_response::code].asInt()); @@ -62,7 +65,7 @@ void SDLPolicyUpdateResponse::Run() { helpers::ALL>(code, hmi_apis::Common_Result::SUCCESS, hmi_apis::Common_Result::WARNINGS)) { - LOG4CXX_ERROR(logger_, "Error is returned. PTU won't be started."); + SDL_LOG_ERROR("Error is returned. PTU won't be started."); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_request.cc index 988be68a80..84ea5590d3 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + TTSChangeRegistrationRequest::TTSChangeRegistrationRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ TTSChangeRegistrationRequest::TTSChangeRegistrationRequest( TTSChangeRegistrationRequest::~TTSChangeRegistrationRequest() {} void TTSChangeRegistrationRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_response.cc index e5e38ef34a..521df2ed6d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + TTSChangeRegistratioResponse::TTSChangeRegistratioResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ TTSChangeRegistratioResponse::TTSChangeRegistratioResponse( TTSChangeRegistratioResponse::~TTSChangeRegistratioResponse() {} void TTSChangeRegistratioResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::TTS_ChangeRegistration); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_request.cc index 85f0b93b8c..3bca6c05c1 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + TTSGetCapabilitiesRequest::TTSGetCapabilitiesRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,13 +54,13 @@ TTSGetCapabilitiesRequest::TTSGetCapabilitiesRequest( TTSGetCapabilitiesRequest::~TTSGetCapabilitiesRequest() {} void TTSGetCapabilitiesRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } void TTSGetCapabilitiesRequest::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); hmi_capabilities_.UpdateRequestsRequiredForCapabilities( hmi_apis::FunctionID::TTS_GetCapabilities); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_response.cc index e6edcdb365..167966e55b 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_response.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + TTSGetCapabilitiesResponse::TTSGetCapabilitiesResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ TTSGetCapabilitiesResponse::TTSGetCapabilitiesResponse( TTSGetCapabilitiesResponse::~TTSGetCapabilitiesResponse() {} void TTSGetCapabilitiesResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const auto result_code = static_cast<hmi_apis::Common_Result::eType>( (*message_)[strings::params][hmi_response::code].asInt()); @@ -59,8 +61,7 @@ void TTSGetCapabilitiesResponse::Run() { hmi_apis::FunctionID::TTS_GetCapabilities); if (hmi_apis::Common_Result::SUCCESS != result_code) { - LOG4CXX_DEBUG(logger_, - "Request was not successful. Don't change HMI capabilities"); + SDL_LOG_DEBUG("Request was not successful. Don't change HMI capabilities"); return; } @@ -81,8 +82,7 @@ void TTSGetCapabilitiesResponse::Run() { if (!hmi_capabilities_.SaveCachedCapabilitiesToFile( hmi_interface::tts, sections_to_update, message_->getSchema())) { - LOG4CXX_ERROR(logger_, - "Failed to save TTS.GetCapabilities response to cache"); + SDL_LOG_ERROR("Failed to save TTS.GetCapabilities response to cache"); } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_request.cc index d62c9627f5..2b409c68de 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + TTSGetLanguageRequest::TTSGetLanguageRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,13 +54,13 @@ TTSGetLanguageRequest::TTSGetLanguageRequest( TTSGetLanguageRequest::~TTSGetLanguageRequest() {} void TTSGetLanguageRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } void TTSGetLanguageRequest::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); hmi_capabilities_.UpdateRequestsRequiredForCapabilities( hmi_apis::FunctionID::TTS_GetLanguage); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_response.cc index 1487fd7915..2b14bea681 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + TTSGetLanguageResponse::TTSGetLanguageResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ TTSGetLanguageResponse::TTSGetLanguageResponse( TTSGetLanguageResponse::~TTSGetLanguageResponse() {} void TTSGetLanguageResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace hmi_apis; const Common_Result::eType result_code = static_cast<Common_Result::eType>( @@ -63,8 +65,7 @@ void TTSGetLanguageResponse::Run() { hmi_apis::FunctionID::TTS_GetLanguage); if (Common_Result::SUCCESS != result_code) { - LOG4CXX_DEBUG(logger_, - "Request was not successful. Don't change HMI capabilities"); + SDL_LOG_DEBUG("Request was not successful. Don't change HMI capabilities"); return; } @@ -81,13 +82,11 @@ void TTSGetLanguageResponse::Run() { std::vector<std::string> sections_to_update{hmi_response::language}; if (!hmi_capabilities_.SaveCachedCapabilitiesToFile( hmi_interface::tts, sections_to_update, message_->getSchema())) { - LOG4CXX_DEBUG(logger_, "Failed to save TTS.GetLanguage response to cache"); + SDL_LOG_DEBUG("Failed to save TTS.GetLanguage response to cache"); } - LOG4CXX_DEBUG(logger_, - "Raising event for function_id " << function_id() - << " and correlation_id " - << correlation_id()); + SDL_LOG_DEBUG("Raising event for function_id " + << function_id() << " and correlation_id " << correlation_id()); event_engine::Event event(FunctionID::TTS_GetLanguage); event.set_smart_object(*message_); event.raise(application_manager_.event_dispatcher()); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_request.cc index 5d758c84b7..87df2402bb 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + TTSGetSupportedLanguagesRequest::TTSGetSupportedLanguagesRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,13 +54,13 @@ TTSGetSupportedLanguagesRequest::TTSGetSupportedLanguagesRequest( TTSGetSupportedLanguagesRequest::~TTSGetSupportedLanguagesRequest() {} void TTSGetSupportedLanguagesRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } void TTSGetSupportedLanguagesRequest::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); hmi_capabilities_.UpdateRequestsRequiredForCapabilities( hmi_apis::FunctionID::TTS_GetSupportedLanguages); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_response.cc index baa10394c5..6b074005b2 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + TTSGetSupportedLanguagesResponse::TTSGetSupportedLanguagesResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ TTSGetSupportedLanguagesResponse::TTSGetSupportedLanguagesResponse( TTSGetSupportedLanguagesResponse::~TTSGetSupportedLanguagesResponse() {} void TTSGetSupportedLanguagesResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const hmi_apis::Common_Result::eType code = static_cast<hmi_apis::Common_Result::eType>( @@ -63,8 +65,7 @@ void TTSGetSupportedLanguagesResponse::Run() { hmi_apis::FunctionID::TTS_GetSupportedLanguages); if (hmi_apis::Common_Result::SUCCESS != code) { - LOG4CXX_DEBUG(logger_, - "Request was not successful. Don't change HMI capabilities"); + SDL_LOG_DEBUG("Request was not successful. Don't change HMI capabilities"); return; } @@ -74,8 +75,7 @@ void TTSGetSupportedLanguagesResponse::Run() { std::vector<std::string> sections_to_update{hmi_response::languages}; if (!hmi_capabilities_.SaveCachedCapabilitiesToFile( hmi_interface::tts, sections_to_update, message_->getSchema())) { - LOG4CXX_ERROR(logger_, - "Failed to save TTS.GetSupportedLanguages response to cache"); + SDL_LOG_ERROR("Failed to save TTS.GetSupportedLanguages response to cache"); } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_request.cc index 4ae737bec4..1f1f3e7eab 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_request.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + TTSIsReadyRequest::TTSIsReadyRequest( const app_mngr::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,18 +56,18 @@ TTSIsReadyRequest::TTSIsReadyRequest( TTSIsReadyRequest::~TTSIsReadyRequest() {} void TTSIsReadyRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); subscribe_on_event(hmi_apis::FunctionID::TTS_IsReady, correlation_id()); SendRequest(); } void TTSIsReadyRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::TTS_IsReady: { - LOG4CXX_DEBUG(logger_, "Received TTS_IsReady event"); + SDL_LOG_DEBUG("Received TTS_IsReady event"); unsubscribe_from_event(hmi_apis::FunctionID::TTS_IsReady); const bool is_available = app_mngr::commands::ChangeInterfaceState( application_manager_, message, HmiInterfaces::HMI_INTERFACE_TTS); @@ -74,8 +76,7 @@ void TTSIsReadyRequest::on_event(const event_engine::Event& event) { if (!app_mngr::commands::CheckAvailabilityHMIInterfaces( application_manager_, HmiInterfaces::HMI_INTERFACE_TTS)) { UpdateRequiredInterfaceCapabilitiesRequests(hmi_interface::tts); - LOG4CXX_INFO(logger_, - "HmiInterfaces::HMI_INTERFACE_TTS isn't available"); + SDL_LOG_INFO("HmiInterfaces::HMI_INTERFACE_TTS isn't available"); return; } @@ -83,7 +84,7 @@ void TTSIsReadyRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_response.cc index 67e0fb6396..c94210e330 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_response.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + TTSIsReadyResponse::TTSIsReadyResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ TTSIsReadyResponse::TTSIsReadyResponse( TTSIsReadyResponse::~TTSIsReadyResponse() {} void TTSIsReadyResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::TTS_IsReady); event.set_smart_object(*message_); event.raise(application_manager_.event_dispatcher()); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_request.cc index 0b3d9a77bf..f2a8dad4bc 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + TTSSetGlobalPropertiesRequest::TTSSetGlobalPropertiesRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ TTSSetGlobalPropertiesRequest::TTSSetGlobalPropertiesRequest( TTSSetGlobalPropertiesRequest::~TTSSetGlobalPropertiesRequest() {} void TTSSetGlobalPropertiesRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_response.cc index 0901378c4a..35b3ce87d3 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + TTSSetGlobalPropertiesResponse::TTSSetGlobalPropertiesResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ TTSSetGlobalPropertiesResponse::TTSSetGlobalPropertiesResponse( TTSSetGlobalPropertiesResponse::~TTSSetGlobalPropertiesResponse() {} void TTSSetGlobalPropertiesResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::TTS_SetGlobalProperties); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_request.cc index 6dce94f931..0dd48f90a9 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + TTSSpeakRequest::TTSSpeakRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ TTSSpeakRequest::TTSSpeakRequest( TTSSpeakRequest::~TTSSpeakRequest() {} void TTSSpeakRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_response.cc index 69be5ab160..c461996358 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_response.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + TTSSpeakResponse::TTSSpeakResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ TTSSpeakResponse::TTSSpeakResponse( TTSSpeakResponse::~TTSSpeakResponse() {} void TTSSpeakResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::TTS_Speak); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_request.cc index 43c595040c..8e6270e643 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + TTSStopSpeakingRequest::TTSStopSpeakingRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ TTSStopSpeakingRequest::TTSStopSpeakingRequest( TTSStopSpeakingRequest::~TTSStopSpeakingRequest() {} void TTSStopSpeakingRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_response.cc index 892b3e6295..64d76dcec2 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + TTSStopSpeakingResponse::TTSStopSpeakingResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ TTSStopSpeakingResponse::TTSStopSpeakingResponse( TTSStopSpeakingResponse::~TTSStopSpeakingResponse() {} void TTSStopSpeakingResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::TTS_StopSpeaking); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_request.cc index 7c95e8a919..eadd0f59cd 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIAddCommandRequest::UIAddCommandRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UIAddCommandRequest::UIAddCommandRequest( UIAddCommandRequest::~UIAddCommandRequest() {} void UIAddCommandRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_response.cc index 72d841a878..9a582807a9 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIAddCommandResponse::UIAddCommandResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ UIAddCommandResponse::UIAddCommandResponse( UIAddCommandResponse::~UIAddCommandResponse() {} void UIAddCommandResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_AddCommand); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_request.cc index 15342c6ecb..a854a115b6 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIAddSubmenuRequest::UIAddSubmenuRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UIAddSubmenuRequest::UIAddSubmenuRequest( UIAddSubmenuRequest::~UIAddSubmenuRequest() {} void UIAddSubmenuRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_response.cc index ae699dc2bd..89aa425cfb 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIAddSubmenuResponse::UIAddSubmenuResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ UIAddSubmenuResponse::UIAddSubmenuResponse( UIAddSubmenuResponse::~UIAddSubmenuResponse() {} void UIAddSubmenuResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_AddSubMenu); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_request.cc index 793e70d9e1..def1636fbd 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIAlertRequest::UIAlertRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,7 +58,7 @@ UIAlertRequest::UIAlertRequest( UIAlertRequest::~UIAlertRequest() {} void UIAlertRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_response.cc index f53f14e050..e1a5afa5e5 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIAlertResponse::UIAlertResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ UIAlertResponse::UIAlertResponse( UIAlertResponse::~UIAlertResponse() {} void UIAlertResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_Alert); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_cancel_interaction_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_cancel_interaction_request.cc index c186077b1e..db35e550bc 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_cancel_interaction_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_cancel_interaction_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UICancelInteractionRequest::UICancelInteractionRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UICancelInteractionRequest::UICancelInteractionRequest( UICancelInteractionRequest::~UICancelInteractionRequest() {} void UICancelInteractionRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_cancel_interaction_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_cancel_interaction_response.cc index 2d5db4eecb..29d18ba384 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_cancel_interaction_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_cancel_interaction_response.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UICancelInteractionResponse::UICancelInteractionResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UICancelInteractionResponse::UICancelInteractionResponse( UICancelInteractionResponse::~UICancelInteractionResponse() {} void UICancelInteractionResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_CancelInteraction); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_request.cc index bb001b37c7..3ba9d149c4 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIChangeRegistrationRequest::UIChangeRegistrationRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UIChangeRegistrationRequest::UIChangeRegistrationRequest( UIChangeRegistrationRequest::~UIChangeRegistrationRequest() {} void UIChangeRegistrationRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_response.cc index 8acd654488..1790f44bce 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIChangeRegistratioResponse::UIChangeRegistratioResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ UIChangeRegistratioResponse::UIChangeRegistratioResponse( UIChangeRegistratioResponse::~UIChangeRegistratioResponse() {} void UIChangeRegistratioResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_ChangeRegistration); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_create_window_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_create_window_request.cc index b354009e3f..90071bb351 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_create_window_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_create_window_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UICreateWindowRequest::UICreateWindowRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UICreateWindowRequest::UICreateWindowRequest( UICreateWindowRequest::~UICreateWindowRequest() {} void UICreateWindowRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_create_window_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_create_window_response.cc index c3a323818d..1021e47595 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_create_window_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_create_window_response.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UICreateWindowResponse::UICreateWindowResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ UICreateWindowResponse::UICreateWindowResponse( UICreateWindowResponse::~UICreateWindowResponse() {} void UICreateWindowResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_CreateWindow); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_request.cc index 1d741bba74..2b46723216 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIDeleteCommandRequest::UIDeleteCommandRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UIDeleteCommandRequest::UIDeleteCommandRequest( UIDeleteCommandRequest::~UIDeleteCommandRequest() {} void UIDeleteCommandRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_response.cc index 40a5ec8a73..0cd3e1943d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIDeleteCommandResponse::UIDeleteCommandResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ UIDeleteCommandResponse::UIDeleteCommandResponse( UIDeleteCommandResponse::~UIDeleteCommandResponse() {} void UIDeleteCommandResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_DeleteCommand); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_request.cc index fdca37cee6..ea5745486a 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIDeleteSubmenuRequest::UIDeleteSubmenuRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UIDeleteSubmenuRequest::UIDeleteSubmenuRequest( UIDeleteSubmenuRequest::~UIDeleteSubmenuRequest() {} void UIDeleteSubmenuRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_response.cc index 9d522431dc..0d2d5360cc 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIDeleteSubmenuResponse::UIDeleteSubmenuResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ UIDeleteSubmenuResponse::UIDeleteSubmenuResponse( UIDeleteSubmenuResponse::~UIDeleteSubmenuResponse() {} void UIDeleteSubmenuResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_DeleteSubMenu); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_window_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_window_request.cc index 7933574d92..066b5969a6 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_window_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_window_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIDeleteWindowRequest::UIDeleteWindowRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UIDeleteWindowRequest::UIDeleteWindowRequest( UIDeleteWindowRequest::~UIDeleteWindowRequest() {} void UIDeleteWindowRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_window_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_window_response.cc index ba703e18ae..507369c4f7 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_window_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_window_response.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIDeleteWindowResponse::UIDeleteWindowResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ UIDeleteWindowResponse::UIDeleteWindowResponse( UIDeleteWindowResponse::~UIDeleteWindowResponse() {} void UIDeleteWindowResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_DeleteWindow); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_request.cc index 92f51bc9cf..3e99b5298e 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIEndAudioPassThruRequest::UIEndAudioPassThruRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UIEndAudioPassThruRequest::UIEndAudioPassThruRequest( UIEndAudioPassThruRequest::~UIEndAudioPassThruRequest() {} void UIEndAudioPassThruRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_response.cc index b6639dcbb9..3b9f56f7e6 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIEndAudioPassThruResponse::UIEndAudioPassThruResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ UIEndAudioPassThruResponse::UIEndAudioPassThruResponse( UIEndAudioPassThruResponse::~UIEndAudioPassThruResponse() {} void UIEndAudioPassThruResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_EndAudioPassThru); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_request.cc index 32c19eabcd..00a8ad761e 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIGetCapabilitiesRequest::UIGetCapabilitiesRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,13 +54,13 @@ UIGetCapabilitiesRequest::UIGetCapabilitiesRequest( UIGetCapabilitiesRequest::~UIGetCapabilitiesRequest() {} void UIGetCapabilitiesRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } void UIGetCapabilitiesRequest::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); hmi_capabilities_.UpdateRequestsRequiredForCapabilities( hmi_apis::FunctionID::UI_GetCapabilities); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_response.cc index f966f299c1..31dda22709 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_response.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIGetCapabilitiesResponse::UIGetCapabilitiesResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ UIGetCapabilitiesResponse::UIGetCapabilitiesResponse( UIGetCapabilitiesResponse::~UIGetCapabilitiesResponse() {} void UIGetCapabilitiesResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const auto result_code = static_cast<hmi_apis::Common_Result::eType>( (*message_)[strings::params][hmi_response::code].asInt()); @@ -60,8 +62,7 @@ void UIGetCapabilitiesResponse::Run() { hmi_apis::FunctionID::UI_GetCapabilities); if (hmi_apis::Common_Result::SUCCESS != result_code) { - LOG4CXX_DEBUG(logger_, - "Request was not successful. Don't change HMI capabilities"); + SDL_LOG_DEBUG("Request was not successful. Don't change HMI capabilities"); return; } @@ -166,8 +167,7 @@ void UIGetCapabilitiesResponse::Run() { if (!hmi_capabilities_.SaveCachedCapabilitiesToFile( hmi_interface::ui, sections_to_update, message_->getSchema())) { - LOG4CXX_ERROR(logger_, - "Failed to save UI.GetCapabilities response to cache"); + SDL_LOG_ERROR("Failed to save UI.GetCapabilities response to cache"); } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_request.cc index 948adbdece..bf91b7e294 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIGetLanguageRequest::UIGetLanguageRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,13 +54,13 @@ UIGetLanguageRequest::UIGetLanguageRequest( UIGetLanguageRequest::~UIGetLanguageRequest() {} void UIGetLanguageRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } void UIGetLanguageRequest::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); hmi_capabilities_.UpdateRequestsRequiredForCapabilities( hmi_apis::FunctionID::UI_GetLanguage); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_response.cc index e32dbf3c47..ffeec025be 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIGetLanguageResponse::UIGetLanguageResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ UIGetLanguageResponse::UIGetLanguageResponse( UIGetLanguageResponse::~UIGetLanguageResponse() {} void UIGetLanguageResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace hmi_apis; const Common_Result::eType result_code = static_cast<Common_Result::eType>( (*message_)[strings::params][hmi_response::code].asInt()); @@ -63,8 +65,7 @@ void UIGetLanguageResponse::Run() { hmi_apis::FunctionID::UI_GetLanguage); if (Common_Result::SUCCESS != result_code) { - LOG4CXX_DEBUG(logger_, - "Request was not successful. Don't change HMI capabilities"); + SDL_LOG_DEBUG("Request was not successful. Don't change HMI capabilities"); return; } @@ -81,13 +82,11 @@ void UIGetLanguageResponse::Run() { std::vector<std::string> sections_to_update{hmi_response::language}; if (!hmi_capabilities_.SaveCachedCapabilitiesToFile( hmi_interface::ui, sections_to_update, message_->getSchema())) { - LOG4CXX_ERROR(logger_, "Failed to save UI.GetLanguage response to cache"); + SDL_LOG_ERROR("Failed to save UI.GetLanguage response to cache"); } - LOG4CXX_DEBUG(logger_, - "Raising event for function_id " << function_id() - << " and correlation_id " - << correlation_id()); + SDL_LOG_DEBUG("Raising event for function_id " + << function_id() << " and correlation_id " << correlation_id()); event_engine::Event event(FunctionID::UI_GetLanguage); event.set_smart_object(*message_); event.raise(application_manager_.event_dispatcher()); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_request.cc index 0001af9203..480fa2499f 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIGetSupportedLanguagesRequest::UIGetSupportedLanguagesRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,13 +54,13 @@ UIGetSupportedLanguagesRequest::UIGetSupportedLanguagesRequest( UIGetSupportedLanguagesRequest::~UIGetSupportedLanguagesRequest() {} void UIGetSupportedLanguagesRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } void UIGetSupportedLanguagesRequest::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); hmi_capabilities_.UpdateRequestsRequiredForCapabilities( hmi_apis::FunctionID::UI_GetSupportedLanguages); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_response.cc index 53704b3705..20606294ae 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIGetSupportedLanguagesResponse::UIGetSupportedLanguagesResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ UIGetSupportedLanguagesResponse::UIGetSupportedLanguagesResponse( UIGetSupportedLanguagesResponse::~UIGetSupportedLanguagesResponse() {} void UIGetSupportedLanguagesResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const hmi_apis::Common_Result::eType code = static_cast<hmi_apis::Common_Result::eType>( @@ -63,8 +65,7 @@ void UIGetSupportedLanguagesResponse::Run() { hmi_apis::FunctionID::UI_GetSupportedLanguages); if (hmi_apis::Common_Result::SUCCESS != code) { - LOG4CXX_DEBUG(logger_, - "Request was not successful. Don't change HMI capabilities"); + SDL_LOG_DEBUG("Request was not successful. Don't change HMI capabilities"); return; } @@ -74,8 +75,7 @@ void UIGetSupportedLanguagesResponse::Run() { std::vector<std::string> sections_to_update{hmi_response::languages}; if (!hmi_capabilities_.SaveCachedCapabilitiesToFile( hmi_interface::ui, sections_to_update, message_->getSchema())) { - LOG4CXX_ERROR(logger_, - "Failed to save UI.GetSupportedLanguages response to cache"); + SDL_LOG_ERROR("Failed to save UI.GetSupportedLanguages response to cache"); } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_request.cc index 4882095d42..d020972ce6 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_request.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIIsReadyRequest::UIIsReadyRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,17 +56,17 @@ UIIsReadyRequest::UIIsReadyRequest( UIIsReadyRequest::~UIIsReadyRequest() {} void UIIsReadyRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); subscribe_on_event(hmi_apis::FunctionID::UI_IsReady, correlation_id()); SendRequest(); } void UIIsReadyRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::UI_IsReady: { - LOG4CXX_DEBUG(logger_, "Received UI_IsReady event"); + SDL_LOG_DEBUG("Received UI_IsReady event"); unsubscribe_from_event(hmi_apis::FunctionID::UI_IsReady); const bool is_available = app_mngr::commands::ChangeInterfaceState( application_manager_, message, HmiInterfaces::HMI_INTERFACE_UI); @@ -73,8 +75,7 @@ void UIIsReadyRequest::on_event(const event_engine::Event& event) { if (!app_mngr::commands::CheckAvailabilityHMIInterfaces( application_manager_, HmiInterfaces::HMI_INTERFACE_UI)) { UpdateRequiredInterfaceCapabilitiesRequests(hmi_interface::ui); - LOG4CXX_INFO(logger_, - "HmiInterfaces::HMI_INTERFACE_UI isn't available"); + SDL_LOG_INFO("HmiInterfaces::HMI_INTERFACE_UI isn't available"); return; } @@ -82,7 +83,7 @@ void UIIsReadyRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_response.cc index 96a2d1212c..99730691de 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_response.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIIsReadyResponse::UIIsReadyResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ UIIsReadyResponse::UIIsReadyResponse( UIIsReadyResponse::~UIIsReadyResponse() {} void UIIsReadyResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_IsReady); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_request.cc index 18d5376b25..c8a3dc3704 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIPerformAudioPassThruRequest::UIPerformAudioPassThruRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UIPerformAudioPassThruRequest::UIPerformAudioPassThruRequest( UIPerformAudioPassThruRequest::~UIPerformAudioPassThruRequest() {} void UIPerformAudioPassThruRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_response.cc index afbd1bbed7..b953dc73e6 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIPerformAudioPassThruResponse::UIPerformAudioPassThruResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ UIPerformAudioPassThruResponse::UIPerformAudioPassThruResponse( UIPerformAudioPassThruResponse::~UIPerformAudioPassThruResponse() {} void UIPerformAudioPassThruResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_PerformAudioPassThru); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_request.cc index a07c72cbf4..83e63c006d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIPerformInteractionRequest::UIPerformInteractionRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,7 +58,7 @@ UIPerformInteractionRequest::UIPerformInteractionRequest( UIPerformInteractionRequest::~UIPerformInteractionRequest() {} void UIPerformInteractionRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_response.cc index 4cbc58d278..00f6f702cd 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIPerformInteractionResponse::UIPerformInteractionResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ UIPerformInteractionResponse::UIPerformInteractionResponse( UIPerformInteractionResponse::~UIPerformInteractionResponse() {} void UIPerformInteractionResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_PerformInteraction); event.set_smart_object(*message_); event.raise(application_manager_.event_dispatcher()); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_request.cc index cad68e23aa..366235bb6d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIScrollableMessageRequest::UIScrollableMessageRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,7 +58,7 @@ UIScrollableMessageRequest::UIScrollableMessageRequest( UIScrollableMessageRequest::~UIScrollableMessageRequest() {} void UIScrollableMessageRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_response.cc index 4e844095b4..b9a184528e 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIScrollableMessageResponse::UIScrollableMessageResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ UIScrollableMessageResponse::UIScrollableMessageResponse( UIScrollableMessageResponse::~UIScrollableMessageResponse() {} void UIScrollableMessageResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_ScrollableMessage); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_request.cc index 4a538ac992..9e8f4837f8 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UISendHapticDataRequest::UISendHapticDataRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UISendHapticDataRequest::UISendHapticDataRequest( UISendHapticDataRequest::~UISendHapticDataRequest() {} void UISendHapticDataRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_response.cc index 92afdaaa4a..9b55d6d63d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UISendHapticDataResponse::UISendHapticDataResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ UISendHapticDataResponse::UISendHapticDataResponse( UISendHapticDataResponse::~UISendHapticDataResponse() {} void UISendHapticDataResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_SendHapticData); event.set_smart_object(*message_); event.raise(application_manager_.event_dispatcher()); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_request.cc index 821f78a046..4d158bfc20 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UISetAppIconRequest::UISetAppIconRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UISetAppIconRequest::UISetAppIconRequest( UISetAppIconRequest::~UISetAppIconRequest() {} void UISetAppIconRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_response.cc index 68e96725d4..91e341375b 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UISetAppIconResponse::UISetAppIconResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ UISetAppIconResponse::UISetAppIconResponse( UISetAppIconResponse::~UISetAppIconResponse() {} void UISetAppIconResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_SetAppIcon); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_request.cc index 63166157c8..df0f2a9f98 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UiSetDisplayLayoutRequest::UiSetDisplayLayoutRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UiSetDisplayLayoutRequest::UiSetDisplayLayoutRequest( UiSetDisplayLayoutRequest::~UiSetDisplayLayoutRequest() {} void UiSetDisplayLayoutRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_response.cc index f35427895e..35fe55ec4d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UiSetDisplayLayoutResponse::UiSetDisplayLayoutResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ UiSetDisplayLayoutResponse::UiSetDisplayLayoutResponse( UiSetDisplayLayoutResponse::~UiSetDisplayLayoutResponse() {} void UiSetDisplayLayoutResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_SetDisplayLayout); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_request.cc index 0aaaae7cc7..231796f2d5 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UISetGlobalPropertiesRequest::UISetGlobalPropertiesRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UISetGlobalPropertiesRequest::UISetGlobalPropertiesRequest( UISetGlobalPropertiesRequest::~UISetGlobalPropertiesRequest() {} void UISetGlobalPropertiesRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_response.cc index 48d73d146c..e0d7f8136e 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UISetGlobalPropertiesResponse::UISetGlobalPropertiesResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ UISetGlobalPropertiesResponse::UISetGlobalPropertiesResponse( UISetGlobalPropertiesResponse::~UISetGlobalPropertiesResponse() {} void UISetGlobalPropertiesResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_SetGlobalProperties); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_request.cc index 4c8fcefcdf..fdb477e41e 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UISetMediaClockTimerRequest::UISetMediaClockTimerRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UISetMediaClockTimerRequest::UISetMediaClockTimerRequest( UISetMediaClockTimerRequest::~UISetMediaClockTimerRequest() {} void UISetMediaClockTimerRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_response.cc index fb5b25fc2b..3df2a14863 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UISetMediaClockTimerResponse::UISetMediaClockTimerResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ UISetMediaClockTimerResponse::UISetMediaClockTimerResponse( UISetMediaClockTimerResponse::~UISetMediaClockTimerResponse() {} void UISetMediaClockTimerResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_SetMediaClockTimer); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_request.cc index c2c8566e82..beba7ebba9 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_request.cc @@ -37,6 +37,8 @@ namespace app_mngr = application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIShowAppMenuRequest::UIShowAppMenuRequest( const app_mngr::commands::MessageSharedPtr& message, app_mngr::ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UIShowAppMenuRequest::UIShowAppMenuRequest( UIShowAppMenuRequest::~UIShowAppMenuRequest() {} void UIShowAppMenuRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_response.cc index 14bbc79e03..c0e13d377a 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_response.cc @@ -37,6 +37,9 @@ namespace sdl_rpc_plugin { namespace app_mngr = application_manager; namespace commands { + +SDL_CREATE_LOG_VARIABLE("Commands") + UIShowAppMenuResponse::UIShowAppMenuResponse( const app_mngr::commands::MessageSharedPtr& message, app_mngr::ApplicationManager& application_manager, @@ -52,7 +55,7 @@ UIShowAppMenuResponse::UIShowAppMenuResponse( UIShowAppMenuResponse::~UIShowAppMenuResponse() {} void UIShowAppMenuResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); app_mngr::event_engine::Event event(hmi_apis::FunctionID::UI_ShowAppMenu); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_request.cc index d7160dc70b..4312a4d252 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIShowRequest::UIShowRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UIShowRequest::UIShowRequest( UIShowRequest::~UIShowRequest() {} void UIShowRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_response.cc index 768069bf3a..7e57aec971 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_response.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UIShowResponse::UIShowResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UIShowResponse::UIShowResponse( UIShowResponse::~UIShowResponse() {} void UIShowResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_Show); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_request.cc index eae8cc523c..63bc1e0c0e 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UISliderRequest::UISliderRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,7 +58,7 @@ UISliderRequest::UISliderRequest( UISliderRequest::~UISliderRequest() {} void UISliderRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_response.cc index 9cf7224ddb..3c78e73fdd 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UISliderResponse::UISliderResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ UISliderResponse::UISliderResponse( UISliderResponse::~UISliderResponse() {} void UISliderResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_Slider); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_subtle_alert_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_subtle_alert_request.cc index 02e9af4c3c..7136a533e6 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_subtle_alert_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_subtle_alert_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UISubtleAlertRequest::UISubtleAlertRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -60,7 +62,7 @@ UISubtleAlertRequest::UISubtleAlertRequest( UISubtleAlertRequest::~UISubtleAlertRequest() {} void UISubtleAlertRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_subtle_alert_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_subtle_alert_response.cc index 51e9802db7..a551988c07 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_subtle_alert_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_subtle_alert_response.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UISubtleAlertResponse::UISubtleAlertResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UISubtleAlertResponse::UISubtleAlertResponse( UISubtleAlertResponse::~UISubtleAlertResponse() {} void UISubtleAlertResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::UI_SubtleAlert); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_request.cc index c5966fcb36..ca23f36d5c 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UpdateAppListRequest::UpdateAppListRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UpdateAppListRequest::UpdateAppListRequest( UpdateAppListRequest::~UpdateAppListRequest() {} void UpdateAppListRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_response.cc index 7fc830b4e6..3468a7a253 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_response.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UpdateAppListResponse::UpdateAppListResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UpdateAppListResponse::UpdateAppListResponse( UpdateAppListResponse::~UpdateAppListResponse() {} void UpdateAppListResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // TODO(PV): add check } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_request.cc index 3a014480c1..c8aa295645 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_request.cc @@ -41,6 +41,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UpdateDeviceListRequest::UpdateDeviceListRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -57,7 +59,7 @@ UpdateDeviceListRequest::UpdateDeviceListRequest( UpdateDeviceListRequest::~UpdateDeviceListRequest() {} void UpdateDeviceListRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); sync_primitives::AutoLock auto_lock(wait_hmi_lock); // Fix problem with SDL and HMI HTML. This problem is not actual for HMI PASA. // Flag conditional compilation for specific customer is used in order to @@ -65,10 +67,10 @@ void UpdateDeviceListRequest::Run() { // hit code to RTC if (true == application_manager_.get_settings().launch_hmi()) { if (!application_manager_.IsHMICooperating()) { - LOG4CXX_INFO(logger_, "Wait for HMI Cooperation"); + SDL_LOG_INFO("Wait for HMI Cooperation"); subscribe_on_event(hmi_apis::FunctionID::BasicCommunication_OnReady); termination_condition_.Wait(auto_lock); - LOG4CXX_DEBUG(logger_, "HMI Cooperation OK"); + SDL_LOG_DEBUG("HMI Cooperation OK"); } } @@ -76,17 +78,17 @@ void UpdateDeviceListRequest::Run() { } void UpdateDeviceListRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); sync_primitives::AutoLock auto_lock(wait_hmi_lock); switch (event.id()) { case hmi_apis::FunctionID::BasicCommunication_OnReady: { - LOG4CXX_INFO(logger_, "received OnReady"); + SDL_LOG_INFO("received OnReady"); unsubscribe_from_event(hmi_apis::FunctionID::BasicCommunication_OnReady); termination_condition_.Broadcast(); break; }; default: { - LOG4CXX_ERROR(logger_, "Unknown event "); + SDL_LOG_ERROR("Unknown event " << event.id()); break; }; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_response.cc index d69e683f2b..9458c22aa2 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_response.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UpdateDeviceListResponse::UpdateDeviceListResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ UpdateDeviceListResponse::UpdateDeviceListResponse( UpdateDeviceListResponse::~UpdateDeviceListResponse() {} void UpdateDeviceListResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // TODO(PV): add check for correctness. } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_request.cc index a52f03b998..b9c06945b6 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_request.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UpdateSDLRequest::UpdateSDLRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ UpdateSDLRequest::UpdateSDLRequest( UpdateSDLRequest::~UpdateSDLRequest() {} void UpdateSDLRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); policy_handler_.PTExchangeAtUserRequest( (*message_)[strings::params][strings::correlation_id].asInt()); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_response.cc index c02cde4111..a6981b6d82 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_response.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UpdateSDLResponse::UpdateSDLResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ UpdateSDLResponse::UpdateSDLResponse( UpdateSDLResponse::~UpdateSDLResponse() {} void UpdateSDLResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_; (*message_)[strings::params][strings::protocol_version] = protocol_version_; diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_request.cc index 788eda5a87..a26e0479c8 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + VRAddCommandRequest::VRAddCommandRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ VRAddCommandRequest::VRAddCommandRequest( VRAddCommandRequest::~VRAddCommandRequest() {} void VRAddCommandRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_response.cc index 37b3e4696d..111fd1ffe5 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + VRAddCommandResponse::VRAddCommandResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ VRAddCommandResponse::VRAddCommandResponse( VRAddCommandResponse::~VRAddCommandResponse() {} void VRAddCommandResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::VR_AddCommand); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_request.cc index d1be04ad44..32d326687a 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + VRChangeRegistrationRequest::VRChangeRegistrationRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ VRChangeRegistrationRequest::VRChangeRegistrationRequest( VRChangeRegistrationRequest::~VRChangeRegistrationRequest() {} void VRChangeRegistrationRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_response.cc index 27bde2bafa..85c346421d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + VRChangeRegistrationResponse::VRChangeRegistrationResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ VRChangeRegistrationResponse::VRChangeRegistrationResponse( VRChangeRegistrationResponse::~VRChangeRegistrationResponse() {} void VRChangeRegistrationResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::VR_ChangeRegistration); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_request.cc index ebcfe78fa9..cc6650a7ae 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + VRDeleteCommandRequest::VRDeleteCommandRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ VRDeleteCommandRequest::VRDeleteCommandRequest( VRDeleteCommandRequest::~VRDeleteCommandRequest() {} void VRDeleteCommandRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_response.cc index d1d725b356..ae40f3c1f8 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + VRDeleteCommandResponse::VRDeleteCommandResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ VRDeleteCommandResponse::VRDeleteCommandResponse( VRDeleteCommandResponse::~VRDeleteCommandResponse() {} void VRDeleteCommandResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::VR_DeleteCommand); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_request.cc index dd0d78cf2d..3f528f2f58 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + VRGetCapabilitiesRequest::VRGetCapabilitiesRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,13 +54,13 @@ VRGetCapabilitiesRequest::VRGetCapabilitiesRequest( VRGetCapabilitiesRequest::~VRGetCapabilitiesRequest() {} void VRGetCapabilitiesRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } void VRGetCapabilitiesRequest::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); hmi_capabilities_.UpdateRequestsRequiredForCapabilities( hmi_apis::FunctionID::VR_GetCapabilities); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_response.cc index 79d532bff8..315107d94a 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_response.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + VRGetCapabilitiesResponse::VRGetCapabilitiesResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ VRGetCapabilitiesResponse::VRGetCapabilitiesResponse( VRGetCapabilitiesResponse::~VRGetCapabilitiesResponse() {} void VRGetCapabilitiesResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const auto result_code = static_cast<hmi_apis::Common_Result::eType>( (*message_)[strings::params][hmi_response::code].asInt()); @@ -59,8 +61,7 @@ void VRGetCapabilitiesResponse::Run() { hmi_apis::FunctionID::VR_GetCapabilities); if (hmi_apis::Common_Result::SUCCESS != result_code) { - LOG4CXX_DEBUG(logger_, - "Request was not successful. Don't change HMI capabilities"); + SDL_LOG_DEBUG("Request was not successful. Don't change HMI capabilities"); return; } @@ -75,8 +76,7 @@ void VRGetCapabilitiesResponse::Run() { if (!hmi_capabilities_.SaveCachedCapabilitiesToFile( hmi_interface::vr, sections_to_update, message_->getSchema())) { - LOG4CXX_ERROR(logger_, - "Failed to save VR.GetCapabilities response to cache"); + SDL_LOG_ERROR("Failed to save VR.GetCapabilities response to cache"); } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_request.cc index 3aa36aee33..f5e9b0e848 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + VRGetLanguageRequest::VRGetLanguageRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,13 +54,13 @@ VRGetLanguageRequest::VRGetLanguageRequest( VRGetLanguageRequest::~VRGetLanguageRequest() {} void VRGetLanguageRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } void VRGetLanguageRequest::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); hmi_capabilities_.UpdateRequestsRequiredForCapabilities( hmi_apis::FunctionID::VR_GetLanguage); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_response.cc index 462ccc529c..e8c881f6f8 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + VRGetLanguageResponse::VRGetLanguageResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ VRGetLanguageResponse::VRGetLanguageResponse( VRGetLanguageResponse::~VRGetLanguageResponse() {} void VRGetLanguageResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace hmi_apis; const Common_Result::eType result_code = static_cast<Common_Result::eType>( (*message_)[strings::params][hmi_response::code].asInt()); @@ -63,8 +65,7 @@ void VRGetLanguageResponse::Run() { hmi_apis::FunctionID::VR_GetLanguage); if (Common_Result::SUCCESS != result_code) { - LOG4CXX_DEBUG(logger_, - "Request was not successful. Don't change HMI capabilities"); + SDL_LOG_DEBUG("Request was not successful. Don't change HMI capabilities"); return; } @@ -81,13 +82,11 @@ void VRGetLanguageResponse::Run() { std::vector<std::string> sections_to_update{hmi_response::language}; if (!hmi_capabilities_.SaveCachedCapabilitiesToFile( hmi_interface::vr, sections_to_update, message_->getSchema())) { - LOG4CXX_ERROR(logger_, "Failed to save VR.GetLanguage response to cache"); + SDL_LOG_ERROR("Failed to save VR.GetLanguage response to cache"); } - LOG4CXX_DEBUG(logger_, - "Raising event for function_id " << function_id() - << " and correlation_id " - << correlation_id()); + SDL_LOG_DEBUG("Raising event for function_id " + << function_id() << " and correlation_id " << correlation_id()); event_engine::Event event(FunctionID::VR_GetLanguage); event.set_smart_object(*message_); event.raise(application_manager_.event_dispatcher()); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_request.cc index 5755b91ab6..73e68e8503 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + VRGetSupportedLanguagesRequest::VRGetSupportedLanguagesRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,13 +54,13 @@ VRGetSupportedLanguagesRequest::VRGetSupportedLanguagesRequest( VRGetSupportedLanguagesRequest::~VRGetSupportedLanguagesRequest() {} void VRGetSupportedLanguagesRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } void VRGetSupportedLanguagesRequest::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); hmi_capabilities_.UpdateRequestsRequiredForCapabilities( hmi_apis::FunctionID::VR_GetSupportedLanguages); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_response.cc index 59602cf10a..72278fcddd 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + VRGetSupportedLanguagesResponse::VRGetSupportedLanguagesResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ VRGetSupportedLanguagesResponse::VRGetSupportedLanguagesResponse( VRGetSupportedLanguagesResponse::~VRGetSupportedLanguagesResponse() {} void VRGetSupportedLanguagesResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const hmi_apis::Common_Result::eType code = static_cast<hmi_apis::Common_Result::eType>( @@ -71,8 +73,8 @@ void VRGetSupportedLanguagesResponse::Run() { std::vector<std::string> sections_to_update{hmi_response::languages}; if (!hmi_capabilities_.SaveCachedCapabilitiesToFile( hmi_interface::vr, sections_to_update, message_->getSchema())) { - LOG4CXX_ERROR( - logger_, "Failed to save VR.GetSupportedLanguages response to cache"); + SDL_LOG_ERROR( + "Failed to save VR.GetSupportedLanguages response to cache"); } } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_request.cc index f65f58f423..303e7a6843 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_request.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + VRIsReadyRequest::VRIsReadyRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,17 +56,17 @@ VRIsReadyRequest::VRIsReadyRequest( VRIsReadyRequest::~VRIsReadyRequest() {} void VRIsReadyRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); subscribe_on_event(hmi_apis::FunctionID::VR_IsReady, correlation_id()); SendRequest(); } void VRIsReadyRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::VR_IsReady: { - LOG4CXX_DEBUG(logger_, "Received VR_IsReady event"); + SDL_LOG_DEBUG("Received VR_IsReady event"); unsubscribe_from_event(hmi_apis::FunctionID::VR_IsReady); const bool is_available = app_mngr::commands::ChangeInterfaceState( application_manager_, message, HmiInterfaces::HMI_INTERFACE_VR); @@ -74,8 +76,7 @@ void VRIsReadyRequest::on_event(const event_engine::Event& event) { if (!app_mngr::commands::CheckAvailabilityHMIInterfaces( application_manager_, HmiInterfaces::HMI_INTERFACE_VR)) { UpdateRequiredInterfaceCapabilitiesRequests(hmi_interface::vr); - LOG4CXX_INFO(logger_, - "HmiInterfaces::HMI_INTERFACE_VR isn't available"); + SDL_LOG_INFO("HmiInterfaces::HMI_INTERFACE_VR isn't available"); return; } @@ -83,7 +84,7 @@ void VRIsReadyRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_response.cc index 373f97bf80..486cf32890 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_response.cc @@ -36,6 +36,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + VRIsReadyResponse::VRIsReadyResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ VRIsReadyResponse::VRIsReadyResponse( VRIsReadyResponse::~VRIsReadyResponse() {} void VRIsReadyResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::VR_IsReady); event.set_smart_object(*message_); event.raise(application_manager_.event_dispatcher()); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_request.cc index 4257158f6a..db834f05a8 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + VRPerformInteractionRequest::VRPerformInteractionRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,7 +58,7 @@ VRPerformInteractionRequest::VRPerformInteractionRequest( VRPerformInteractionRequest::~VRPerformInteractionRequest() {} void VRPerformInteractionRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_response.cc index 16378ab55a..2622b4f493 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_response.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + VRPerformInteractionResponse::VRPerformInteractionResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ VRPerformInteractionResponse::VRPerformInteractionResponse( VRPerformInteractionResponse::~VRPerformInteractionResponse() {} void VRPerformInteractionResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::VR_PerformInteraction); event.set_smart_object(*message_); event.raise(application_manager_.event_dispatcher()); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_request.cc index 1dbfc97458..0267073e41 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_request.cc @@ -45,6 +45,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + namespace custom_str = utils::custom_string; AddCommandRequest::AddCommandRequest( @@ -68,7 +70,7 @@ AddCommandRequest::AddCommandRequest( AddCommandRequest::~AddCommandRequest() {} void AddCommandRequest::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); RemoveCommand(); CommandRequestImpl::onTimeOut(); } @@ -79,13 +81,13 @@ bool AddCommandRequest::Init() { } void AddCommandRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application( (*message_)[strings::params][strings::connection_key].asUInt()); if (!app) { - LOG4CXX_ERROR(logger_, "No application associated with session key"); + SDL_LOG_ERROR("No application associated with session key"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -97,22 +99,22 @@ void AddCommandRequest::Run() { application_manager_); if (mobile_apis::Result::INVALID_DATA == verification_result) { - LOG4CXX_ERROR( - logger_, "MessageHelper::VerifyImage return " << verification_result); + SDL_LOG_ERROR("MessageHelper::VerifyImage return " + << verification_result); SendResponse(false, verification_result); return; } } if (!((*message_)[strings::msg_params].keyExists(strings::cmd_id))) { - LOG4CXX_ERROR(logger_, "INVALID_DATA"); + SDL_LOG_ERROR("INVALID_DATA"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } if (app->FindCommand( (*message_)[strings::msg_params][strings::cmd_id].asUInt())) { - LOG4CXX_ERROR(logger_, "INVALID_ID"); + SDL_LOG_ERROR("INVALID_ID"); SendResponse(false, mobile_apis::Result::INVALID_ID); return; } @@ -149,13 +151,13 @@ void AddCommandRequest::Run() { } if (!data_exist) { - LOG4CXX_ERROR(logger_, "INVALID_DATA"); + SDL_LOG_ERROR("INVALID_DATA"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } if (IsWhiteSpaceExist()) { - LOG4CXX_ERROR(logger_, "Incoming add command has contains \t\n \\t \\n"); + SDL_LOG_ERROR("Incoming add command has contains \t\n \\t \\n"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -245,9 +247,9 @@ bool AddCommandRequest::CheckCommandName(ApplicationConstSharedPtr app) { [strings::menu_name] .asString()) && (saved_parent_id == parent_id)) { - LOG4CXX_INFO(logger_, - "AddCommandRequest::CheckCommandName received" - " command name already exist in same level menu"); + SDL_LOG_INFO( + "AddCommandRequest::CheckCommandName received" + " command name already exist in same level menu"); return false; } } @@ -279,9 +281,9 @@ bool AddCommandRequest::CheckCommandVRSynonym(ApplicationConstSharedPtr app) { .asCustomString(); if (vr_cmd_i.CompareIgnoreCase(vr_cmd_j)) { - LOG4CXX_INFO(logger_, - "AddCommandRequest::CheckCommandVRSynonym" - " received command vr synonym already exist"); + SDL_LOG_INFO( + "AddCommandRequest::CheckCommandVRSynonym" + " received command vr synonym already exist"); return false; } } @@ -302,9 +304,9 @@ bool AddCommandRequest::CheckCommandParentId(ApplicationConstSharedPtr app) { smart_objects::SmartObject* parent = app->FindSubMenu(parent_id); if (!parent) { - LOG4CXX_INFO(logger_, - "AddCommandRequest::CheckCommandParentId received" - " submenu doesn't exist"); + SDL_LOG_INFO( + "AddCommandRequest::CheckCommandParentId received" + " submenu doesn't exist"); return false; } return true; @@ -312,7 +314,7 @@ bool AddCommandRequest::CheckCommandParentId(ApplicationConstSharedPtr app) { // TODO(AKUTSAN) APPLINK-26973: Refactor AddCommandRequest void AddCommandRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace helpers; const smart_objects::SmartObject& message = event.smart_object(); @@ -321,7 +323,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) { application_manager_.application(connection_key()); if (!application) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); return; } @@ -333,7 +335,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) { switch (event.id()) { case hmi_apis::FunctionID::UI_AddCommand: { - LOG4CXX_INFO(logger_, "Received UI_AddCommand event"); + SDL_LOG_INFO("Received UI_AddCommand event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI); is_ui_received_ = true; ui_result_ = static_cast<hmi_apis::Common_Result::eType>( @@ -345,7 +347,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) { break; } case hmi_apis::FunctionID::VR_AddCommand: { - LOG4CXX_INFO(logger_, "Received VR_AddCommand event"); + SDL_LOG_INFO("Received VR_AddCommand event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR); is_vr_received_ = true; vr_result_ = static_cast<hmi_apis::Common_Result::eType>( @@ -357,7 +359,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } @@ -411,8 +413,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) { (is_no_ui_error && is_vr_invalid_unsupported) || (is_no_vr_error && is_ui_invalid_unsupported); - LOG4CXX_DEBUG(logger_, - "calculated result " << ui_result_ << " " << is_no_ui_error + SDL_LOG_DEBUG("calculated result " << ui_result_ << " " << is_no_ui_error << " " << is_no_vr_error); const bool is_vr_or_ui_warning = Compare<hmi_apis::Common_Result::eType, EQ, ONE>( @@ -445,7 +446,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) { if (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == vr_result_) { result_code = MessageHelper::HMIToMobileResult(ui_result_); } - LOG4CXX_DEBUG(logger_, "HMIToMobileResult " << result_code); + SDL_LOG_DEBUG("HMIToMobileResult " << result_code); } if (BothSend() && hmi_apis::Common_Result::SUCCESS == vr_result_) { @@ -466,7 +467,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) { SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_params); application->RemoveCommand(cmd_id); result = false; - LOG4CXX_DEBUG(logger_, "Result " << result); + SDL_LOG_DEBUG("Result " << result); } } @@ -481,7 +482,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) { application->RemoveCommand(cmd_id); result = false; - LOG4CXX_DEBUG(logger_, "Result " << result); + SDL_LOG_DEBUG("Result " << result); } HmiInterfaces::InterfaceState ui_interface_state = @@ -496,12 +497,12 @@ void AddCommandRequest::on_event(const event_engine::Event& event) { HmiInterfaces::STATE_NOT_AVAILABLE == vr_interface_state) || (is_ui_unsupported && HmiInterfaces::STATE_NOT_AVAILABLE == ui_interface_state))) { - LOG4CXX_DEBUG(logger_, "!BothSend() && is_vr_or_ui_unsupported"); + SDL_LOG_DEBUG("!BothSend() && is_vr_or_ui_unsupported"); result = false; } if (is_vr_and_ui_unsupported) { - LOG4CXX_DEBUG(logger_, "UI and VR interface both unsupported"); + SDL_LOG_DEBUG("UI and VR interface both unsupported"); result = false; } @@ -524,7 +525,7 @@ bool AddCommandRequest::IsPendingResponseExist() { } bool AddCommandRequest::IsWhiteSpaceExist() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const char* str = NULL; if ((*message_)[strings::msg_params].keyExists(strings::menu_params)) { @@ -532,7 +533,7 @@ bool AddCommandRequest::IsWhiteSpaceExist() { [strings::menu_name] .asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid menu name syntax check failed."); + SDL_LOG_ERROR("Invalid menu name syntax check failed."); return true; } } @@ -545,7 +546,7 @@ bool AddCommandRequest::IsWhiteSpaceExist() { str = (*message_)[strings::msg_params][strings::vr_commands][i] .asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid vr_commands syntax check failed"); + SDL_LOG_ERROR("Invalid vr_commands syntax check failed"); return true; } } @@ -555,7 +556,7 @@ bool AddCommandRequest::IsWhiteSpaceExist() { str = (*message_)[strings::msg_params][strings::cmd_icon][strings::value] .asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid cmd_icon value syntax check failed"); + SDL_LOG_ERROR("Invalid cmd_icon value syntax check failed"); return true; } } @@ -596,10 +597,10 @@ const std::string AddCommandRequest::GenerateMobileResponseInfo() { } void AddCommandRequest::RemoveCommand() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (app.use_count() == 0) { - LOG4CXX_ERROR(logger_, "No application associated with session key"); + SDL_LOG_ERROR("No application associated with session key"); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_response.cc index 24ff3b5a28..6e8c589cb6 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + AddCommandResponse::AddCommandResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ AddCommandResponse::AddCommandResponse( AddCommandResponse::~AddCommandResponse() {} void AddCommandResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_request.cc index 71bf867054..d79cd57953 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_request.cc @@ -42,6 +42,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + AddSubMenuRequest::AddSubMenuRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -57,12 +59,12 @@ AddSubMenuRequest::AddSubMenuRequest( AddSubMenuRequest::~AddSubMenuRequest() {} void AddSubMenuRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -77,8 +79,8 @@ void AddSubMenuRequest::Run() { received_msg_params[strings::menu_icon], app, application_manager_); if (mobile_apis::Result::INVALID_DATA == verification_result) { - LOG4CXX_ERROR( - logger_, "MessageHelper::VerifyImage return " << verification_result); + SDL_LOG_ERROR("MessageHelper::VerifyImage return " + << verification_result); SendResponse(false, verification_result); return; } @@ -86,7 +88,7 @@ void AddSubMenuRequest::Run() { const int32_t menu_id = received_msg_params[strings::menu_id].asInt(); if (app->FindSubMenu(menu_id)) { - LOG4CXX_ERROR(logger_, "Menu with id " << menu_id << " is not found."); + SDL_LOG_ERROR("Menu with id " << menu_id << " is not found."); SendResponse(false, mobile_apis::Result::INVALID_ID); return; } @@ -100,13 +102,13 @@ void AddSubMenuRequest::Run() { : 0; if (app->IsSubMenuNameAlreadyExist(menu_name, parent_id)) { - LOG4CXX_ERROR(logger_, "Menu name " << menu_name << " is duplicated."); + SDL_LOG_ERROR("Menu name " << menu_name << " is duplicated."); SendResponse(false, mobile_apis::Result::DUPLICATE_NAME); return; } if (!CheckSubMenuName()) { - LOG4CXX_ERROR(logger_, "Sub-menu name is not valid."); + SDL_LOG_ERROR("Sub-menu name is not valid."); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -146,7 +148,7 @@ void AddSubMenuRequest::Run() { } void AddSubMenuRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { @@ -164,7 +166,7 @@ void AddSubMenuRequest::on_event(const event_engine::Event& event) { application_manager_.application(connection_key()); if (!application) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); return; } @@ -191,7 +193,7 @@ void AddSubMenuRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } @@ -203,12 +205,12 @@ bool AddSubMenuRequest::Init() { } bool AddSubMenuRequest::CheckSubMenuName() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const char* str = NULL; str = (*message_)[strings::msg_params][strings::menu_name].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_INFO(logger_, "Invalid subMenu name."); + SDL_LOG_INFO("Invalid subMenu name."); return false; } return true; diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_response.cc index d91f13f1df..c9e8d1809f 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_response.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + AddSubMenuResponse::AddSubMenuResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ AddSubMenuResponse::AddSubMenuResponse( AddSubMenuResponse::~AddSubMenuResponse() {} void AddSubMenuResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_request.cc index 9f36f260ae..47b3a87d52 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_request.cc @@ -37,6 +37,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + AlertManeuverRequest::AlertManeuverRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,11 +58,11 @@ AlertManeuverRequest::AlertManeuverRequest( AlertManeuverRequest::~AlertManeuverRequest() {} void AlertManeuverRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if ((!(*message_)[strings::msg_params].keyExists(strings::soft_buttons)) && (!(*message_)[strings::msg_params].keyExists(strings::tts_chunks))) { - LOG4CXX_ERROR(logger_, "AlertManeuverRequest::Request without parameters!"); + SDL_LOG_ERROR("AlertManeuverRequest::Request without parameters!"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -69,15 +71,15 @@ void AlertManeuverRequest::Run() { (*message_)[strings::params][strings::connection_key].asUInt()); if (NULL == app.get()) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } if (IsWhiteSpaceExist()) { - LOG4CXX_ERROR(logger_, - "Incoming alert maneuver has contains \\t\\n \\\\t \\\\n" - "text contains only whitespace in ttsChunks"); + SDL_LOG_ERROR( + "Incoming alert maneuver has contains \\t\\n \\\\t \\\\n" + "text contains only whitespace in ttsChunks"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -91,7 +93,7 @@ void AlertManeuverRequest::Run() { application_manager_); if (mobile_apis::Result::SUCCESS != processing_result) { - LOG4CXX_ERROR(logger_, "Wrong soft buttons parameters!"); + SDL_LOG_ERROR("Wrong soft buttons parameters!"); SendResponse(false, processing_result); return; } @@ -107,9 +109,8 @@ void AlertManeuverRequest::Run() { MessageHelper::VerifyTtsFiles(tts_chunks, app, application_manager_); if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) { - LOG4CXX_ERROR( - logger_, - "MessageHelper::VerifyTtsFiles return " << verification_result); + SDL_LOG_ERROR("MessageHelper::VerifyTtsFiles return " + << verification_result); SendResponse(false, mobile_apis::Result::FILE_NOT_FOUND, "One or more files needed for tts_chunks are not present"); @@ -154,12 +155,12 @@ void AlertManeuverRequest::Run() { } void AlertManeuverRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); hmi_apis::FunctionID::eType event_id = event.id(); switch (event_id) { case hmi_apis::FunctionID::Navigation_AlertManeuver: { - LOG4CXX_INFO(logger_, "Received Navigation_AlertManeuver event"); + SDL_LOG_INFO("Received Navigation_AlertManeuver event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation); pending_requests_.Remove(event_id); navi_alert_maneuver_result_code_ = @@ -169,7 +170,7 @@ void AlertManeuverRequest::on_event(const event_engine::Event& event) { break; } case hmi_apis::FunctionID::TTS_Speak: { - LOG4CXX_INFO(logger_, "Received TTS_Speak event"); + SDL_LOG_INFO("Received TTS_Speak event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS); pending_requests_.Remove(event_id); tts_speak_result_code_ = static_cast<hmi_apis::Common_Result::eType>( @@ -178,24 +179,24 @@ void AlertManeuverRequest::on_event(const event_engine::Event& event) { break; } case hmi_apis::FunctionID::TTS_OnResetTimeout: { - LOG4CXX_INFO(logger_, "Received TTS_OnResetTimeout event"); + SDL_LOG_INFO("Received TTS_OnResetTimeout event"); application_manager_.updateRequestTimeout( connection_key(), correlation_id(), default_timeout()); break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); SendResponse( - false, mobile_apis::Result::INVALID_ENUM, "Received unknown event"); + false, mobile_apis::Result::INVALID_ENUM, "Received unknown event "); return; } } if (!pending_requests_.IsFinal(event_id)) { - LOG4CXX_DEBUG(logger_, - "There are some pending responses from HMI." - "AlertManeuverRequest still waiting."); + SDL_LOG_DEBUG( + "There are some pending responses from HMI. " + "AlertManeuverRequest still waiting."); return; } std::string return_info; @@ -214,7 +215,7 @@ void AlertManeuverRequest::on_event(const event_engine::Event& event) { bool AlertManeuverRequest::PrepareResponseParameters( mobile_apis::Result::eType& result_code, std::string& return_info) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace helpers; app_mngr::commands::ResponseInfo navigation_alert_info( @@ -246,7 +247,7 @@ bool AlertManeuverRequest::PrepareResponseParameters( } bool AlertManeuverRequest::IsWhiteSpaceExist() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using smart_objects::SmartArray; if ((*message_)[strings::msg_params].keyExists(strings::tts_chunks)) { @@ -258,7 +259,7 @@ bool AlertManeuverRequest::IsWhiteSpaceExist() { for (; it_tts_chunk != tts_chunks_arr->end(); ++it_tts_chunk) { const char* tts_chunk_text = (*it_tts_chunk)[strings::text].asCharArray(); if (strlen(tts_chunk_text) && !CheckSyntax(tts_chunk_text)) { - LOG4CXX_ERROR(logger_, "Invalid tts_chunks syntax check failed"); + SDL_LOG_ERROR("Invalid tts_chunks syntax check failed"); return true; } } @@ -277,7 +278,7 @@ bool AlertManeuverRequest::IsWhiteSpaceExist() { const char* soft_button_text = (*it_soft_button)[strings::text].asCharArray(); if (!CheckSyntax(soft_button_text)) { - LOG4CXX_ERROR(logger_, "Invalid soft_buttons syntax check failed"); + SDL_LOG_ERROR("Invalid soft_buttons syntax check failed"); return true; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_response.cc index 97c93d7455..993dc75548 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_response.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + AlertManeuverResponse::AlertManeuverResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ AlertManeuverResponse::AlertManeuverResponse( AlertManeuverResponse::~AlertManeuverResponse() {} void AlertManeuverResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc index a0544ee444..55783be4cd 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc @@ -47,6 +47,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + AlertRequest::AlertRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -81,9 +83,9 @@ bool AlertRequest::Init() { // If soft buttons are present, SDL will not use initiate timeout tracking for // response. if (msg_params.keyExists(strings::soft_buttons)) { - LOG4CXX_INFO(logger_, - "Request contains soft buttons - request timeout " - "will be set to 0."); + SDL_LOG_INFO( + "Request contains soft buttons - request timeout " + "will be set to 0."); default_timeout_ = 0; } @@ -91,7 +93,7 @@ bool AlertRequest::Init() { } void AlertRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); uint32_t app_id = (*message_)[strings::params][strings::connection_key].asInt(); @@ -122,24 +124,24 @@ void AlertRequest::Run() { } void AlertRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::TTS_OnResetTimeout: case hmi_apis::FunctionID::UI_OnResetTimeout: { - LOG4CXX_INFO(logger_, - "Received UI_OnResetTimeout event " - " or TTS_OnResetTimeout event" - << awaiting_tts_speak_response_ << " " - << awaiting_tts_stop_speaking_response_ << " " - << awaiting_ui_alert_response_); + SDL_LOG_INFO( + "Received UI_OnResetTimeout event " + " or TTS_OnResetTimeout event " + << awaiting_tts_speak_response_ << " " + << awaiting_tts_stop_speaking_response_ << " " + << awaiting_ui_alert_response_); application_manager_.updateRequestTimeout( connection_key(), correlation_id(), default_timeout()); break; } case hmi_apis::FunctionID::UI_Alert: { - LOG4CXX_INFO(logger_, "Received UI_Alert event"); + SDL_LOG_INFO("Received UI_Alert event"); // Unsubscribe from event to avoid unwanted messages EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI); unsubscribe_from_event(hmi_apis::FunctionID::UI_Alert); @@ -163,7 +165,7 @@ void AlertRequest::on_event(const event_engine::Event& event) { break; } case hmi_apis::FunctionID::TTS_Speak: { - LOG4CXX_INFO(logger_, "Received TTS_Speak event"); + SDL_LOG_INFO("Received TTS_Speak event"); // Unsubscribe from event to avoid unwanted messages EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS); unsubscribe_from_event(hmi_apis::FunctionID::TTS_Speak); @@ -174,7 +176,7 @@ void AlertRequest::on_event(const event_engine::Event& event) { break; } case hmi_apis::FunctionID::TTS_StopSpeaking: { - LOG4CXX_INFO(logger_, "Received TTS_StopSpeaking event"); + SDL_LOG_INFO("Received TTS_StopSpeaking event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS); // Unsubscribe from event to avoid unwanted messages unsubscribe_from_event(hmi_apis::FunctionID::TTS_StopSpeaking); @@ -182,7 +184,7 @@ void AlertRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } @@ -238,11 +240,11 @@ bool AlertRequest::PrepareResponseParameters( } bool AlertRequest::Validate(uint32_t app_id) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(app_id); if (!app) { - LOG4CXX_ERROR(logger_, "No application associated with session key"); + SDL_LOG_ERROR("No application associated with session key"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return false; } @@ -252,7 +254,7 @@ bool AlertRequest::Validate(uint32_t app_id) { app->AreCommandLimitsExceeded( static_cast<mobile_apis::FunctionID::eType>(function_id()), application_manager::TLimitSource::POLICY_TABLE)) { - LOG4CXX_ERROR(logger_, "Alert frequency is too high."); + SDL_LOG_ERROR("Alert frequency is too high."); SendResponse(false, mobile_apis::Result::REJECTED); return false; } @@ -271,7 +273,7 @@ bool AlertRequest::Validate(uint32_t app_id) { application_manager_); if (mobile_apis::Result::SUCCESS != processing_result) { - LOG4CXX_ERROR(logger_, "INVALID_DATA!"); + SDL_LOG_ERROR("INVALID_DATA!"); SendResponse(false, processing_result); return false; } @@ -281,7 +283,7 @@ bool AlertRequest::Validate(uint32_t app_id) { (!(*message_)[strings::msg_params].keyExists(strings::alert_text2)) && (!(*message_)[strings::msg_params].keyExists(strings::tts_chunks) && (1 > (*message_)[strings::msg_params][strings::tts_chunks].length()))) { - LOG4CXX_ERROR(logger_, "Mandatory parameters are missing"); + SDL_LOG_ERROR("Mandatory parameters are missing"); SendResponse(false, mobile_apis::Result::INVALID_DATA, "Mandatory parameters are missing"); @@ -295,9 +297,8 @@ bool AlertRequest::Validate(uint32_t app_id) { MessageHelper::VerifyTtsFiles(tts_chunks, app, application_manager_); if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) { - LOG4CXX_ERROR( - logger_, - "MessageHelper::VerifyTtsFiles return " << verification_result); + SDL_LOG_ERROR("MessageHelper::VerifyTtsFiles return " + << verification_result); SendResponse(false, mobile_apis::Result::FILE_NOT_FOUND, "One or more files needed for tts_chunks are not present"); @@ -309,7 +310,7 @@ bool AlertRequest::Validate(uint32_t app_id) { } void AlertRequest::SendAlertRequest(int32_t app_id) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(app_id); smart_objects::SmartObject msg_params = @@ -364,7 +365,7 @@ void AlertRequest::SendAlertRequest(int32_t app_id) { application_manager_); if (mobile_apis::Result::INVALID_DATA == verification_result) { - LOG4CXX_ERROR(logger_, "Image verification failed."); + SDL_LOG_ERROR("Image verification failed."); SendResponse(false, verification_result); return; } @@ -401,7 +402,7 @@ void AlertRequest::SendAlertRequest(int32_t app_id) { void AlertRequest::SendSpeakRequest(int32_t app_id, bool tts_chunks_exists, size_t length_tts_chunks) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace hmi_apis; using namespace smart_objects; // crate HMI speak request @@ -423,13 +424,13 @@ void AlertRequest::SendSpeakRequest(int32_t app_id, } bool AlertRequest::CheckStrings() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const char* str = NULL; if ((*message_)[strings::msg_params].keyExists(strings::alert_text1)) { str = (*message_)[strings::msg_params][strings::alert_text1].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid alert_text_1 syntax check failed"); + SDL_LOG_ERROR("Invalid alert_text_1 syntax check failed"); return false; } } @@ -437,7 +438,7 @@ bool AlertRequest::CheckStrings() { if ((*message_)[strings::msg_params].keyExists(strings::alert_text2)) { str = (*message_)[strings::msg_params][strings::alert_text2].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid alert_text_2 syntax check failed"); + SDL_LOG_ERROR("Invalid alert_text_2 syntax check failed"); return false; } } @@ -445,7 +446,7 @@ bool AlertRequest::CheckStrings() { if ((*message_)[strings::msg_params].keyExists(strings::alert_text3)) { str = (*message_)[strings::msg_params][strings::alert_text3].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid alert_text_3 syntax check failed"); + SDL_LOG_ERROR("Invalid alert_text_3 syntax check failed"); return false; } } @@ -456,7 +457,7 @@ bool AlertRequest::CheckStrings() { for (size_t i = 0; i < tts_chunks_array.length(); ++i) { str = tts_chunks_array[i][strings::text].asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid tts_chunks text syntax check failed"); + SDL_LOG_ERROR("Invalid tts_chunks text syntax check failed"); return false; } } @@ -465,7 +466,7 @@ bool AlertRequest::CheckStrings() { } bool AlertRequest::HasHmiResponsesToWait() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); return awaiting_ui_alert_response_ || awaiting_tts_speak_response_ || awaiting_tts_stop_speaking_response_; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_response.cc index b709d13958..1b8eebe7d7 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_response.cc @@ -42,6 +42,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + AlertResponse::AlertResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -57,7 +59,7 @@ AlertResponse::AlertResponse( AlertResponse::~AlertResponse() {} void AlertResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/cancel_interaction_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/cancel_interaction_request.cc index 6873cb7bf1..27020f2719 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/cancel_interaction_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/cancel_interaction_request.cc @@ -41,6 +41,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + CancelInteractionRequest::CancelInteractionRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,7 +58,7 @@ CancelInteractionRequest::CancelInteractionRequest( CancelInteractionRequest::~CancelInteractionRequest() {} void CancelInteractionRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); auto function_id = static_cast<mobile_apis::FunctionID::eType>( (*message_)[strings::msg_params][strings::func_id].asInt()); @@ -69,7 +71,7 @@ void CancelInteractionRequest::Run() { mobile_apis::FunctionID::SubtleAlertID, mobile_apis::FunctionID::ScrollableMessageID, mobile_apis::FunctionID::SliderID)) { - LOG4CXX_ERROR(logger_, "Bad function ID" << function_id); + SDL_LOG_ERROR("Bad function ID " << function_id); SendResponse(false, mobile_apis::Result::INVALID_ID); return; } @@ -87,10 +89,10 @@ void CancelInteractionRequest::Run() { } void CancelInteractionRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if (event.id() != hmi_apis::FunctionID::UI_CancelInteraction) { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/cancel_interaction_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/cancel_interaction_response.cc index af73e72a6f..9adec06c9f 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/cancel_interaction_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/cancel_interaction_response.cc @@ -37,6 +37,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + CancelInteractionResponse::CancelInteractionResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,9 +54,9 @@ CancelInteractionResponse::CancelInteractionResponse( CancelInteractionResponse::~CancelInteractionResponse() {} void CancelInteractionResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } } // namespace commands -} // namespace sdl_rpc_plugin
\ No newline at end of file +} // namespace sdl_rpc_plugin diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_request.cc index 27cac83fad..8e13110515 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_request.cc @@ -59,6 +59,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ChangeRegistrationRequest::ChangeRegistrationRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -144,19 +146,18 @@ void ChangeRegistrationRequest::SendUIRequest( } void ChangeRegistrationRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace smart_objects; ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } if (IsWhiteSpaceExist()) { - LOG4CXX_INFO(logger_, - "Incoming request contains \t\n \\t \\n or whitespace"); + SDL_LOG_INFO("Incoming request contains \t\n \\t \\n or whitespace"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -176,14 +177,14 @@ void ChangeRegistrationRequest::Run() { if (false == (IsLanguageSupportedByUI(hmi_language) && IsLanguageSupportedByVR(language) && IsLanguageSupportedByTTS(language))) { - LOG4CXX_ERROR(logger_, "Language is not supported"); + SDL_LOG_ERROR("Language is not supported"); SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE); return; } if (msg_params.keyExists(strings::app_name) && !IsNicknameAllowed(msg_params[strings::app_name].asCustomString())) { - LOG4CXX_ERROR(logger_, "Nickname is not allowed."); + SDL_LOG_ERROR("Nickname is not allowed."); SendResponse(false, mobile_apis::Result::DISALLOWED); return; } @@ -195,9 +196,8 @@ void ChangeRegistrationRequest::Run() { MessageHelper::VerifyTtsFiles(tts_name, app, application_manager_); if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) { - LOG4CXX_ERROR( - logger_, - "MessageHelper::VerifyTtsFiles return " << verification_result); + SDL_LOG_ERROR("MessageHelper::VerifyTtsFiles return " + << verification_result); SendResponse(false, mobile_apis::Result::FILE_NOT_FOUND, "One or more files needed for tts_name are not present"); @@ -244,14 +244,14 @@ void ChangeRegistrationRequest::Run() { } void ChangeRegistrationRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); hmi_apis::FunctionID::eType event_id = event.id(); switch (event_id) { case hmi_apis::FunctionID::UI_ChangeRegistration: { - LOG4CXX_INFO(logger_, "Received UI_ChangeRegistration event"); + SDL_LOG_INFO("Received UI_ChangeRegistration event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI); pending_requests_.Remove(event_id); ui_result_ = static_cast<hmi_apis::Common_Result::eType>( @@ -260,7 +260,7 @@ void ChangeRegistrationRequest::on_event(const event_engine::Event& event) { break; } case hmi_apis::FunctionID::VR_ChangeRegistration: { - LOG4CXX_INFO(logger_, "Received VR_ChangeRegistration event"); + SDL_LOG_INFO("Received VR_ChangeRegistration event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR); pending_requests_.Remove(event_id); vr_result_ = static_cast<hmi_apis::Common_Result::eType>( @@ -269,7 +269,7 @@ void ChangeRegistrationRequest::on_event(const event_engine::Event& event) { break; } case hmi_apis::FunctionID::TTS_ChangeRegistration: { - LOG4CXX_INFO(logger_, "Received TTS_ChangeRegistration event"); + SDL_LOG_INFO("Received TTS_ChangeRegistration event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS); pending_requests_.Remove(event_id); tts_result_ = static_cast<hmi_apis::Common_Result::eType>( @@ -278,7 +278,7 @@ void ChangeRegistrationRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event_id); + SDL_LOG_ERROR("Received unknown event " << event_id); return; } } @@ -288,7 +288,7 @@ void ChangeRegistrationRequest::on_event(const event_engine::Event& event) { application_manager_.application(connection_key()); if (!application) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); return; } @@ -315,9 +315,9 @@ void ChangeRegistrationRequest::on_event(const event_engine::Event& event) { response_info.empty() ? NULL : response_info.c_str(), &(message[strings::msg_params])); } else { - LOG4CXX_INFO(logger_, - "There are some pending responses from HMI." - "ChangeRegistrationRequest still waiting."); + SDL_LOG_INFO( + "There are some pending responses from HMI." + "ChangeRegistrationRequest still waiting."); } } @@ -331,7 +331,7 @@ void CheckInfo(std::string& str) { bool ChangeRegistrationRequest::PrepareResponseParameters( mobile_apis::Result::eType& result_code, std::string& response_info) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace helpers; const bool is_tts_succeeded_unsupported = Compare<hmi_apis::Common_Result::eType, EQ, ONE>( @@ -463,7 +463,7 @@ bool ChangeRegistrationRequest::IsLanguageSupportedByUI( const auto ui_languages = hmi_capabilities.ui_supported_languages(); if (!ui_languages) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); return false; } @@ -473,7 +473,7 @@ bool ChangeRegistrationRequest::IsLanguageSupportedByUI( } } - LOG4CXX_ERROR(logger_, "Language isn't supported by UI"); + SDL_LOG_ERROR("Language isn't supported by UI"); return false; } @@ -484,7 +484,7 @@ bool ChangeRegistrationRequest::IsLanguageSupportedByVR( const auto vr_languages = hmi_capabilities.vr_supported_languages(); if (!vr_languages) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); return false; } @@ -494,7 +494,7 @@ bool ChangeRegistrationRequest::IsLanguageSupportedByVR( } } - LOG4CXX_ERROR(logger_, "Language isn't supported by VR"); + SDL_LOG_ERROR("Language isn't supported by VR"); return false; } @@ -505,7 +505,7 @@ bool ChangeRegistrationRequest::IsLanguageSupportedByTTS( const auto tts_languages = hmi_capabilities.tts_supported_languages(); if (!tts_languages) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); return false; } @@ -516,7 +516,7 @@ bool ChangeRegistrationRequest::IsLanguageSupportedByTTS( } } - LOG4CXX_ERROR(logger_, "Language isn't supported by TTS"); + SDL_LOG_ERROR("Language isn't supported by TTS"); return false; } @@ -526,7 +526,7 @@ bool ChangeRegistrationRequest::IsWhiteSpaceExist() { if ((*message_)[strings::msg_params].keyExists(strings::app_name)) { str = (*message_)[strings::msg_params][strings::app_name].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid app_name syntax check failed"); + SDL_LOG_ERROR("Invalid app_name syntax check failed"); return true; } } @@ -541,7 +541,7 @@ bool ChangeRegistrationRequest::IsWhiteSpaceExist() { for (; it_tn != it_tn_end; ++it_tn) { str = (*it_tn)[strings::text].asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid tts_name syntax check failed"); + SDL_LOG_ERROR("Invalid tts_name syntax check failed"); return true; } } @@ -552,8 +552,7 @@ bool ChangeRegistrationRequest::IsWhiteSpaceExist() { str = (*message_)[strings::msg_params][strings::ngn_media_screen_app_name] .asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, - "Invalid ngn_media_screen_app_name syntax check failed"); + SDL_LOG_ERROR("Invalid ngn_media_screen_app_name syntax check failed"); return true; } } @@ -568,7 +567,7 @@ bool ChangeRegistrationRequest::IsWhiteSpaceExist() { for (; it_vs != it_vs_end; ++it_vs) { str = (*it_vs).asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid vr_synonyms syntax check failed"); + SDL_LOG_ERROR("Invalid vr_synonyms syntax check failed"); return true; } } @@ -578,7 +577,7 @@ bool ChangeRegistrationRequest::IsWhiteSpaceExist() { mobile_apis::Result::eType ChangeRegistrationRequest::CheckCoincidence( const connection_handler::DeviceHandle& device_id) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params]; @@ -610,7 +609,7 @@ mobile_apis::Result::eType ChangeRegistrationRequest::CheckCoincidence( const auto& cur_name = app->name(); if (msg_params.keyExists(strings::app_name)) { if (app_name.CompareIgnoreCase(cur_name)) { - LOG4CXX_ERROR(logger_, "Application name is known already."); + SDL_LOG_ERROR("Application name is known already."); return mobile_apis::Result::DUPLICATE_NAME; } const auto vr = app->vr_synonyms(); @@ -619,7 +618,7 @@ mobile_apis::Result::eType ChangeRegistrationRequest::CheckCoincidence( CoincidencePredicateVR v(app_name); if (0 != std::count_if(curr_vr->begin(), curr_vr->end(), v)) { - LOG4CXX_ERROR(logger_, "Application name is known already."); + SDL_LOG_ERROR("Application name is known already."); return mobile_apis::Result::DUPLICATE_NAME; } } @@ -631,7 +630,7 @@ mobile_apis::Result::eType ChangeRegistrationRequest::CheckCoincidence( CoincidencePredicateVR v(cur_name); if (0 != std::count_if(new_vr->begin(), new_vr->end(), v)) { - LOG4CXX_ERROR(logger_, "vr_synonyms duplicated with app_name ."); + SDL_LOG_ERROR("vr_synonyms duplicated with app_name ."); return mobile_apis::Result::DUPLICATE_NAME; } } // End vr check @@ -646,11 +645,9 @@ mobile_apis::Result::eType ChangeRegistrationRequest::CheckCoincidence( tts_curr->end(), compare_tts_name); if (it_tts != tts_array->end()) { - LOG4CXX_ERROR( - logger_, - "TTS name: " - << (*it_tts)[strings::text].asCustomString().AsMBString() - << " is known already"); + SDL_LOG_ERROR("TTS name: " + << (*it_tts)[strings::text].asCustomString().AsMBString() + << " is known already"); return mobile_apis::Result::DUPLICATE_NAME; } } // End tts check @@ -661,13 +658,12 @@ mobile_apis::Result::eType ChangeRegistrationRequest::CheckCoincidence( bool ChangeRegistrationRequest::IsNicknameAllowed( const custom_str::CustomString& app_name) const { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR( - logger_, - "Can't find appication with connection key " << connection_key()); + SDL_LOG_ERROR("Can't find appication with connection key " + << connection_key()); return false; } @@ -680,9 +676,8 @@ bool ChangeRegistrationRequest::IsNicknameAllowed( policy_app_id, &app_nicknames, &app_hmi_types); if (!init_result) { - LOG4CXX_ERROR(logger_, - "Error during getting of nickname list for application " - << policy_app_id); + SDL_LOG_ERROR("Error during getting of nickname list for application " + << policy_app_id); return false; } @@ -691,8 +686,7 @@ bool ChangeRegistrationRequest::IsNicknameAllowed( policy::StringArray::const_iterator it = std::find_if(app_nicknames.begin(), app_nicknames.end(), compare); if (app_nicknames.end() == it) { - LOG4CXX_WARN(logger_, - "Application name was not found in nicknames list."); + SDL_LOG_WARN("Application name was not found in nicknames list."); usage_statistics::AppCounter count_of_rejections_nickname_mismatch( policy_handler_.GetStatisticManager(), diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_response.cc index 78c60bc746..58bf5f4caa 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ChangeRegistrationResponse::ChangeRegistrationResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ ChangeRegistrationResponse::ChangeRegistrationResponse( ChangeRegistrationResponse::~ChangeRegistrationResponse() {} void ChangeRegistrationResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/close_application_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/close_application_request.cc index 275f1d82a6..b4a09844f2 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/close_application_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/close_application_request.cc @@ -39,6 +39,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + CloseApplicationRequest::CloseApplicationRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,11 +56,11 @@ CloseApplicationRequest::CloseApplicationRequest( CloseApplicationRequest::~CloseApplicationRequest() {} void CloseApplicationRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (app.use_count() == 0) { - LOG4CXX_ERROR(logger_, "Application does not exist"); + SDL_LOG_ERROR("Application does not exist"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -71,7 +73,7 @@ void CloseApplicationRequest::Run() { } void CloseApplicationRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); auto msg_params = message[strings::msg_params]; @@ -89,7 +91,7 @@ void CloseApplicationRequest::on_event(const event_engine::Event& event) { application_manager_.application(connection_key()); if (app.use_count() == 0) { - LOG4CXX_ERROR(logger_, "Application does not exist"); + SDL_LOG_ERROR("Application does not exist"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/close_application_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/close_application_response.cc index 934804e1b1..a03c7a64f4 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/close_application_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/close_application_response.cc @@ -38,6 +38,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + CloseApplicationResponse::CloseApplicationResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ CloseApplicationResponse::CloseApplicationResponse( CloseApplicationResponse::~CloseApplicationResponse() {} void CloseApplicationResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } 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 258aefd63f..6b7e1d917d 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 @@ -47,6 +47,8 @@ const char* kInvalidImageWarningInfo = "Requested image(s) not found."; namespace sdl_rpc_plugin { namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + using namespace application_manager; CreateInteractionChoiceSetRequest::CreateInteractionChoiceSetRequest( @@ -68,16 +70,16 @@ CreateInteractionChoiceSetRequest::CreateInteractionChoiceSetRequest( , is_timed_out_(false) {} CreateInteractionChoiceSetRequest::~CreateInteractionChoiceSetRequest() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); } void CreateInteractionChoiceSetRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace mobile_apis; ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -105,7 +107,7 @@ void CreateInteractionChoiceSetRequest::Run() { } if (verification_result_image == Result::INVALID_DATA || verification_result_secondary_image == Result::INVALID_DATA) { - LOG4CXX_ERROR(logger_, "Image verification failed."); + SDL_LOG_ERROR("Image verification failed."); SendResponse(false, Result::INVALID_DATA); return; } else if (verification_result_image == Result::WARNINGS || @@ -120,8 +122,7 @@ void CreateInteractionChoiceSetRequest::Run() { .asInt(); if (app->FindChoiceSet(choice_set_id_)) { - LOG4CXX_ERROR(logger_, - "Choice set with id " << choice_set_id_ << " is not found."); + SDL_LOG_ERROR("Choice set with id " << choice_set_id_ << " is not found."); SendResponse(false, Result::INVALID_ID); return; } @@ -160,7 +161,7 @@ void CreateInteractionChoiceSetRequest::Run() { mobile_apis::Result::eType CreateInteractionChoiceSetRequest::CheckChoiceSet( ApplicationConstSharedPtr app) { using namespace smart_objects; - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); std::set<uint32_t> choice_id_set; @@ -175,15 +176,14 @@ mobile_apis::Result::eType CreateInteractionChoiceSetRequest::CheckChoiceSet( choice_id_set.insert( (*current_choice_set_it)[strings::choice_id].asInt()); if (!ins_res.second) { - LOG4CXX_ERROR(logger_, - "Choice with ID " - << (*current_choice_set_it)[strings::choice_id].asInt() - << " already exists"); + SDL_LOG_ERROR("Choice with ID " + << (*current_choice_set_it)[strings::choice_id].asInt() + << " already exists"); return mobile_apis::Result::INVALID_ID; } if (IsWhiteSpaceExist(*current_choice_set_it)) { - LOG4CXX_ERROR(logger_, "Incoming choice set has contains \t\n \\t \\n"); + SDL_LOG_ERROR("Incoming choice set has contains \t\n \\t \\n"); return mobile_apis::Result::INVALID_DATA; } for (next_choice_set_it = current_choice_set_it + 1; @@ -218,9 +218,8 @@ bool CreateInteractionChoiceSetRequest::compareSynonyms( CreateInteractionChoiceSetRequest::compareStr); if (it != vr_cmds_1->end()) { - LOG4CXX_INFO( - logger_, - "Incoming choice set has duplicated VR synonyms " << it->asString()); + SDL_LOG_INFO("Incoming choice set has duplicated VR synonyms " + << it->asString()); return true; } @@ -235,19 +234,19 @@ bool CreateInteractionChoiceSetRequest::compareStr( bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist( const smart_objects::SmartObject& choice_set) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const char* str = NULL; str = choice_set[strings::menu_name].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid menu_name syntax check failed"); + SDL_LOG_ERROR("Invalid menu_name syntax check failed"); return true; } if (choice_set.keyExists(strings::secondary_text)) { str = choice_set[strings::secondary_text].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid secondary_text syntax check failed"); + SDL_LOG_ERROR("Invalid secondary_text syntax check failed"); return true; } } @@ -255,7 +254,7 @@ bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist( if (choice_set.keyExists(strings::tertiary_text)) { str = choice_set[strings::tertiary_text].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid tertiary_text syntax check failed"); + SDL_LOG_ERROR("Invalid tertiary_text syntax check failed"); return true; } } @@ -266,7 +265,7 @@ bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist( for (size_t i = 0; i < len; ++i) { str = choice_set[strings::vr_commands][i].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid vr_commands syntax check failed"); + SDL_LOG_ERROR("Invalid vr_commands syntax check failed"); return true; } } @@ -275,7 +274,7 @@ bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist( if (choice_set.keyExists(strings::image)) { str = choice_set[strings::image][strings::value].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid image value syntax check failed"); + SDL_LOG_ERROR("Invalid image value syntax check failed"); return true; } } @@ -283,9 +282,9 @@ bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist( if (choice_set.keyExists(strings::secondary_image)) { str = choice_set[strings::secondary_image][strings::value].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, - "Invalid secondary_image value. " - "Syntax check failed"); + SDL_LOG_ERROR( + "Invalid secondary_image value. " + "Syntax check failed"); return true; } } @@ -294,7 +293,7 @@ bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist( void CreateInteractionChoiceSetRequest::SendVRAddCommandRequests( application_manager::ApplicationSharedPtr const app) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); smart_objects::SmartObject& choice_set = (*message_)[strings::msg_params]; smart_objects::SmartObject msg_params = @@ -311,8 +310,7 @@ void CreateInteractionChoiceSetRequest::SendVRAddCommandRequests( { sync_primitives::AutoLock error_lock(error_from_hmi_lock_); if (error_from_hmi_) { - LOG4CXX_WARN(logger_, - "Error from HMI received. Stop sending VRCommands"); + SDL_LOG_WARN("Error from HMI received. Stop sending VRCommands"); break; } } @@ -332,19 +330,17 @@ void CreateInteractionChoiceSetRequest::SendVRAddCommandRequests( VRCommandInfo vr_command(vr_cmd_id); sent_commands_map_[vr_corr_id] = vr_command; - LOG4CXX_DEBUG( - logger_, - "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; - LOG4CXX_DEBUG(logger_, "expected_chs_count_ = " << expected_chs_count_); + SDL_LOG_DEBUG("expected_chs_count_ = " << expected_chs_count_); } void CreateInteractionChoiceSetRequest::ProcessHmiError( const hmi_apis::Common_Result::eType vr_result) { - LOG4CXX_DEBUG(logger_, - "Hmi response is not Success: " - << vr_result << ". Stop sending VRAddCommand requests"); + SDL_LOG_DEBUG("Hmi response is not Success: " + << vr_result << ". Stop sending VRAddCommand requests"); if (!error_from_hmi_) { error_from_hmi_ = true; std::string info = @@ -359,7 +355,7 @@ bool CreateInteractionChoiceSetRequest::ProcessSuccesfulHMIResponse( const uint32_t corr_id) { SentCommandsMap::iterator it = sent_commands_map_.find(corr_id); if (sent_commands_map_.end() == it) { - LOG4CXX_WARN(logger_, "HMI response for unknown VR command received"); + SDL_LOG_WARN("HMI response for unknown VR command received"); return false; } VRCommandInfo& vr_command = it->second; @@ -369,14 +365,13 @@ bool CreateInteractionChoiceSetRequest::ProcessSuccesfulHMIResponse( void CreateInteractionChoiceSetRequest::CountReceivedVRResponses() { received_chs_count_++; - LOG4CXX_DEBUG(logger_, - "Got VR.AddCommand response, there are " - << expected_chs_count_ - received_chs_count_ - << " more to wait."); + SDL_LOG_DEBUG("Got VR.AddCommand response, there are " + << expected_chs_count_ - received_chs_count_ + << " more to wait."); if (received_chs_count_ < expected_chs_count_) { application_manager_.updateRequestTimeout( connection_key(), correlation_id(), default_timeout()); - LOG4CXX_DEBUG(logger_, "Timeout for request was updated"); + SDL_LOG_DEBUG("Timeout for request was updated"); } else { OnAllHMIResponsesReceived(); } @@ -386,7 +381,7 @@ void CreateInteractionChoiceSetRequest::on_event( const event_engine::Event& event) { using namespace hmi_apis; using namespace helpers; - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); const Common_Result::eType result = static_cast<Common_Result::eType>( @@ -412,7 +407,7 @@ void CreateInteractionChoiceSetRequest::on_event( } void CreateInteractionChoiceSetRequest::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if (!error_from_hmi_) { SendResponse(false, mobile_apis::Result::GENERIC_ERROR); @@ -434,12 +429,12 @@ bool CreateInteractionChoiceSetRequest::Init() { } void CreateInteractionChoiceSetRequest::DeleteChoices() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr application = application_manager_.application(connection_key()); if (!application) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); return; } application->RemoveChoiceSet(choice_set_id_); @@ -455,16 +450,15 @@ void CreateInteractionChoiceSetRequest::DeleteChoices() { msg_param[strings::cmd_id] = vr_command_info.cmd_id_; SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_param); } else { - LOG4CXX_WARN(logger_, - "succesful response has not been received for cmd_id = " - << vr_command_info.cmd_id_); + SDL_LOG_WARN("succesful response has not been received for cmd_id = " + << vr_command_info.cmd_id_); } } sent_commands_map_.clear(); } void CreateInteractionChoiceSetRequest::OnAllHMIResponsesReceived() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if (!error_from_hmi_ && should_send_warnings_) { SendResponse(true, mobile_apis::Result::WARNINGS, kInvalidImageWarningInfo); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_response.cc index 43dba2f238..5b274adeb3 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_response.cc @@ -41,6 +41,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + CreateInteractionChoiceSetResponse::CreateInteractionChoiceSetResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,12 +58,12 @@ CreateInteractionChoiceSetResponse::CreateInteractionChoiceSetResponse( CreateInteractionChoiceSetResponse::~CreateInteractionChoiceSetResponse() {} void CreateInteractionChoiceSetResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // check if response false if (true == (*message_)[strings::msg_params].keyExists(strings::success)) { if ((*message_)[strings::msg_params][strings::success].asBool() == false) { - LOG4CXX_ERROR(logger_, "Success = false"); + SDL_LOG_ERROR("Success = false"); SendResponse(false); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_request.cc index b69b0ee801..2a0ca4ddb3 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_request.cc @@ -45,6 +45,8 @@ using app_mngr::ApplicationSharedPtr; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + CreateWindowRequest::CreateWindowRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -64,17 +66,15 @@ bool CreateWindowRequest::CheckWindowName( const app_mngr::WindowID window_id, const std::string& window_name) const { if (mobile_apis::PredefinedWindows::PRIMARY_WIDGET == window_id) { - LOG4CXX_DEBUG(logger_, - "Window name check is ignored for the primary widgets"); + SDL_LOG_DEBUG("Window name check is ignored for the primary widgets"); return true; } const bool names_are_equal = window_name == app->name().c_str(); if (names_are_equal && mobile_apis::PredefinedWindows::DEFAULT_WINDOW != window_id) { - LOG4CXX_ERROR(logger_, - "Regular widget can't have the same name as application: " - << window_name); + SDL_LOG_ERROR("Regular widget can't have the same name as application: " + << window_name); return false; } @@ -132,12 +132,12 @@ app_mngr::WindowID CreateWindowRequest::window_id() const { } void CreateWindowRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const auto application = application_manager_.application(connection_key()); if (!application) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -145,8 +145,7 @@ void CreateWindowRequest::Run() { const auto window_id = (*message_)[strings::msg_params][strings::window_id].asInt(); if (application->WindowIdExists(window_id)) { - LOG4CXX_ERROR(logger_, - "Window with id #" << window_id << " does already exist"); + SDL_LOG_ERROR("Window with id #" << window_id << " does already exist"); SendResponse(false, mobile_apis::Result::INVALID_ID); return; } @@ -155,7 +154,7 @@ void CreateWindowRequest::Run() { (*message_)[strings::msg_params][strings::window_type].asInt(); if (mobile_apis::WindowType::eType::MAIN == window_type) { - LOG4CXX_ERROR(logger_, "MAIN application window already exists"); + SDL_LOG_ERROR("MAIN application window already exists"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -167,8 +166,7 @@ void CreateWindowRequest::Run() { [strings::duplicate_updates_from_window_id] .asInt(); if (!application->WindowIdExists(duplicate_updates_from_window_id)) { - LOG4CXX_ERROR(logger_, - "Window with id #" << duplicate_updates_from_window_id + SDL_LOG_ERROR("Window with id #" << duplicate_updates_from_window_id << " does not exist"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; @@ -178,8 +176,7 @@ void CreateWindowRequest::Run() { const std::string window_name = (*message_)[strings::msg_params][strings::window_name].asString(); if (!CheckWindowName(application, window_id, window_name)) { - LOG4CXX_ERROR(logger_, - "Window name \"" << window_name + SDL_LOG_ERROR("Window name \"" << window_name << "\" is disallowed for window #" << window_id); SendResponse(false, mobile_apis::Result::DUPLICATE_NAME); @@ -198,22 +195,22 @@ void CreateWindowRequest::Run() { } void CreateWindowRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if (hmi_apis::FunctionID::UI_CreateWindow != event.id()) { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } auto application = application_manager_.application(connection_key()); if (!application) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } - LOG4CXX_INFO(logger_, "Received CreateWindow event"); + SDL_LOG_INFO("Received CreateWindow event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI); const smart_objects::SmartObject& response_message = event.smart_object(); @@ -226,7 +223,7 @@ void CreateWindowRequest::on_event(const event_engine::Event& event) { GetInfo(response_message, response_info); if (!is_success) { - LOG4CXX_ERROR(logger_, "CreateWindow request has failed on HMI side"); + SDL_LOG_ERROR("CreateWindow request has failed on HMI side"); SendResponse(is_success, result_code, response_info.empty() ? nullptr : response_info.c_str()); @@ -247,7 +244,7 @@ bool CreateWindowRequest::Init() { bool CreateWindowRequest::IsWindowForAssociatedServiceCreated( app_mngr::ApplicationSharedPtr app) const { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const auto window_optional_params_map = app->window_optional_params_map().GetData(); @@ -266,8 +263,7 @@ bool CreateWindowRequest::IsWindowForAssociatedServiceCreated( window_optional_params_map.end(), [&associated_service_type]( const std::pair<WindowID, smart_objects::SmartObjectSPtr>& element) { - LOG4CXX_DEBUG(logger_, - "Searching for " << associated_service_type + SDL_LOG_DEBUG("Searching for " << associated_service_type << " in window info for id " << element.first); if (element.second->keyExists(strings::associated_service_type) && @@ -285,7 +281,7 @@ bool CreateWindowRequest::IsWindowForAssociatedServiceCreated( bool CreateWindowRequest::DoesExceedMaxAllowedWindows( app_mngr::ApplicationSharedPtr app) const { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); auto get_current_number_of_windows = [&app](const mobile_apis::WindowType::eType window_type) -> size_t { @@ -298,7 +294,7 @@ bool CreateWindowRequest::DoesExceedMaxAllowedWindows( } default: { - LOG4CXX_WARN(logger_, "Unknown window type"); + SDL_LOG_WARN("Unknown window type"); return 0u; } } @@ -313,7 +309,7 @@ bool CreateWindowRequest::DoesExceedMaxAllowedWindows( } if (!display_capabilities) { - LOG4CXX_WARN(logger_, "Application has no capabilities"); + SDL_LOG_WARN("Application has no capabilities"); return false; } @@ -337,7 +333,7 @@ bool CreateWindowRequest::DoesExceedMaxAllowedWindows( }); if (find_res == windowTypeSupported->end()) { - LOG4CXX_WARN(logger_, "Requested Window Type is not supported by the HMI"); + SDL_LOG_WARN("Requested Window Type is not supported by the HMI"); return true; } @@ -351,11 +347,11 @@ bool CreateWindowRequest::DoesExceedMaxAllowedWindows( bool CreateWindowRequest::ValidateWindowCreation( app_mngr::ApplicationSharedPtr app, const WindowID window_id) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if (DoesExceedMaxAllowedWindows(app)) { std::string info("Maximum allowed amount of windows is exceeded"); - LOG4CXX_WARN(logger_, info); + SDL_LOG_WARN(info); SendResponse(false, mobile_apis::Result::REJECTED, info.c_str()); return false; } @@ -363,7 +359,7 @@ bool CreateWindowRequest::ValidateWindowCreation( if (IsWindowForAssociatedServiceCreated(app)) { std::string info( "Window for this associated service type is already created"); - LOG4CXX_WARN(logger_, info); + SDL_LOG_WARN(info); SendResponse(false, mobile_apis::Result::REJECTED, info.c_str()); return false; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_response.cc index 0d9bbc2815..830539b355 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + CreateWindowResponse::CreateWindowResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ CreateWindowResponse::CreateWindowResponse( CreateWindowResponse::~CreateWindowResponse() {} void CreateWindowResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_request.cc index 363b14f92f..6b6f500602 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_request.cc @@ -44,6 +44,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + DeleteCommandRequest::DeleteCommandRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -65,13 +67,13 @@ DeleteCommandRequest::DeleteCommandRequest( DeleteCommandRequest::~DeleteCommandRequest() {} void DeleteCommandRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr application = application_manager_.application(connection_key()); if (!application) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -82,7 +84,7 @@ void DeleteCommandRequest::Run() { smart_objects::SmartObject* command = application->FindCommand(cmd_id); if (!command) { - LOG4CXX_ERROR(logger_, "Command with id " << cmd_id << " is not found."); + SDL_LOG_ERROR("Command with id " << cmd_id << " is not found."); SendResponse(false, mobile_apis::Result::INVALID_ID); return; } @@ -142,17 +144,17 @@ bool DeleteCommandRequest::PrepareResponseParameters( ui_delete_info, ui_info_, vr_delete_info, vr_info_); if (is_vr_or_ui_warning && !ui_delete_info.is_unsupported_resource && !vr_delete_info.is_unsupported_resource) { - LOG4CXX_DEBUG(logger_, "VR or UI result is warning"); + SDL_LOG_DEBUG("VR or UI result is warning"); result_code = mobile_apis::Result::WARNINGS; return result; } result_code = PrepareResultCodeForResponse(ui_delete_info, vr_delete_info); - LOG4CXX_DEBUG(logger_, "Result is " << (result ? "true" : "false")); + SDL_LOG_DEBUG("Result is " << (result ? "true" : "false")); return result; } void DeleteCommandRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { @@ -161,9 +163,8 @@ void DeleteCommandRequest::on_event(const event_engine::Event& event) { is_ui_received_ = true; ui_result_ = static_cast<hmi_apis::Common_Result::eType>( message[strings::params][hmi_response::code].asInt()); - LOG4CXX_DEBUG(logger_, - "Received UI_DeleteCommand event with result " - << MessageHelper::HMIResultToString(ui_result_)); + SDL_LOG_DEBUG("Received UI_DeleteCommand event with result " + << MessageHelper::HMIResultToString(ui_result_)); GetInfo(message, ui_info_); break; } @@ -172,20 +173,19 @@ void DeleteCommandRequest::on_event(const event_engine::Event& event) { is_vr_received_ = true; vr_result_ = static_cast<hmi_apis::Common_Result::eType>( message[strings::params][hmi_response::code].asInt()); - LOG4CXX_DEBUG(logger_, - "Received VR_DeleteCommand event with result " - << MessageHelper::HMIResultToString(vr_result_)); + SDL_LOG_DEBUG("Received VR_DeleteCommand event with result " + << MessageHelper::HMIResultToString(vr_result_)); GetInfo(message, vr_info_); break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } if (IsPendingResponseExist()) { - LOG4CXX_DEBUG(logger_, "Still awaiting for other responses."); + SDL_LOG_DEBUG("Still awaiting for other responses."); return; } @@ -193,7 +193,7 @@ void DeleteCommandRequest::on_event(const event_engine::Event& event) { application_manager_.application(connection_key()); if (!application) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); return; } smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params]; @@ -203,8 +203,7 @@ void DeleteCommandRequest::on_event(const event_engine::Event& event) { smart_objects::SmartObject* command = application->FindCommand(cmd_id); if (!command) { - LOG4CXX_ERROR(logger_, - "Command id " << cmd_id + SDL_LOG_ERROR("Command id " << cmd_id << " not found for " "application with connection key " << connection_key()); @@ -227,7 +226,7 @@ bool DeleteCommandRequest::Init() { } bool DeleteCommandRequest::IsPendingResponseExist() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); return is_ui_send_ != is_ui_received_ || is_vr_send_ != is_vr_received_; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_response.cc index 919385ee50..80497241e3 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + DeleteCommandResponse::DeleteCommandResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ DeleteCommandResponse::DeleteCommandResponse( DeleteCommandResponse::~DeleteCommandResponse() {} void DeleteCommandResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_request.cc index 46af8353b7..127843813c 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_request.cc @@ -42,6 +42,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + DeleteFileRequest::DeleteFileRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -57,14 +59,14 @@ DeleteFileRequest::DeleteFileRequest( DeleteFileRequest::~DeleteFileRequest() {} void DeleteFileRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr application = application_manager_.application(connection_key()); if (!application) { SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); return; } @@ -75,8 +77,7 @@ void DeleteFileRequest::Run() { application->delete_file_in_none_count())) { // If application is in the HMI_NONE level the quantity of allowed // DeleteFile request is limited by the configuration profile - LOG4CXX_ERROR(logger_, - "Too many requests from the app with HMILevel HMI_NONE "); + SDL_LOG_ERROR("Too many requests from the app with HMILevel HMI_NONE"); SendResponse(false, mobile_apis::Result::REJECTED); return; } @@ -86,7 +87,7 @@ void DeleteFileRequest::Run() { if (!file_system::IsFileNameValid(sync_file_name)) { const std::string err_msg = "Sync file name contains forbidden symbols."; - LOG4CXX_ERROR(logger_, err_msg); + SDL_LOG_ERROR(err_msg); SendResponse(false, mobile_apis::Result::INVALID_DATA, err_msg.c_str()); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_response.cc index 732a1e56b5..7f9181e29a 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_response.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + DeleteFileResponse::DeleteFileResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,12 +57,12 @@ DeleteFileResponse::DeleteFileResponse( DeleteFileResponse::~DeleteFileResponse() {} void DeleteFileResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); uint32_t app_id = (*message_)[strings::params][strings::connection_key].asUInt(); ApplicationSharedPtr app = application_manager_.application(app_id); if (!app) { - LOG4CXX_ERROR(logger_, "Application not registered"); + SDL_LOG_ERROR("Application not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } 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 7950595b1c..6c52d60007 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 @@ -43,6 +43,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + DeleteInteractionChoiceSetRequest::DeleteInteractionChoiceSetRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -58,14 +60,13 @@ DeleteInteractionChoiceSetRequest::DeleteInteractionChoiceSetRequest( DeleteInteractionChoiceSetRequest::~DeleteInteractionChoiceSetRequest() {} void DeleteInteractionChoiceSetRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR( - logger_, - "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; } @@ -75,14 +76,13 @@ void DeleteInteractionChoiceSetRequest::Run() { .asInt(); if (!app->FindChoiceSet(choice_set_id)) { - LOG4CXX_ERROR(logger_, - "Choice set with id " << choice_set_id << " is not found."); + SDL_LOG_ERROR("Choice set with id " << choice_set_id << " is not found."); SendResponse(false, mobile_apis::Result::INVALID_ID); return; } if (ChoiceSetInUse(app)) { - LOG4CXX_ERROR(logger_, "Choice set currently in use."); + SDL_LOG_ERROR("Choice set currently in use."); SendResponse(false, mobile_apis::Result::IN_USE); return; } @@ -108,7 +108,7 @@ bool DeleteInteractionChoiceSetRequest::Init() { bool DeleteInteractionChoiceSetRequest::ChoiceSetInUse( ApplicationConstSharedPtr app) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if (!app->is_perform_interaction_active()) { return false; } @@ -126,8 +126,7 @@ bool DeleteInteractionChoiceSetRequest::ChoiceSetInUse( PerformChoice::const_iterator choice_it = choice.begin(); for (; choice.end() != choice_it; ++choice_it) { if (choice_it->first == choice_set_id) { - LOG4CXX_ERROR(logger_, - "Choice set with id " << choice_set_id << " is in use."); + SDL_LOG_ERROR("Choice set with id " << choice_set_id << " is in use."); return true; } } @@ -137,7 +136,7 @@ bool DeleteInteractionChoiceSetRequest::ChoiceSetInUse( void DeleteInteractionChoiceSetRequest::SendVrDeleteCommand( application_manager::ApplicationSharedPtr app) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const uint32_t choice_set_id = (*message_)[strings::msg_params][strings::interaction_choice_set_id] @@ -146,8 +145,7 @@ void DeleteInteractionChoiceSetRequest::SendVrDeleteCommand( smart_objects::SmartObject* choice_set = app->FindChoiceSet(choice_set_id); if (!choice_set) { - LOG4CXX_ERROR(logger_, - "Choice set with id " << choice_set_id << " is not found."); + SDL_LOG_ERROR("Choice set with id " << choice_set_id << " is not found."); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_response.cc index cf5ad3a2c2..5aaa896b02 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_response.cc @@ -42,6 +42,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + DeleteInteractionChoiceSetResponse::DeleteInteractionChoiceSetResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -57,12 +59,12 @@ DeleteInteractionChoiceSetResponse::DeleteInteractionChoiceSetResponse( DeleteInteractionChoiceSetResponse::~DeleteInteractionChoiceSetResponse() {} void DeleteInteractionChoiceSetResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // check if response false if (true == (*message_)[strings::msg_params].keyExists(strings::success)) { if ((*message_)[strings::msg_params][strings::success].asBool() == false) { - LOG4CXX_ERROR(logger_, "Success = false"); + SDL_LOG_ERROR("Success = false"); SendResponse(false); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_request.cc index 383daa9b83..b4a1d7f0c1 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_request.cc @@ -44,6 +44,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + DeleteSubMenuRequest::DeleteSubMenuRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -59,13 +61,13 @@ DeleteSubMenuRequest::DeleteSubMenuRequest( DeleteSubMenuRequest::~DeleteSubMenuRequest() {} void DeleteSubMenuRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); return; } @@ -73,7 +75,7 @@ void DeleteSubMenuRequest::Run() { (*message_)[strings::msg_params][strings::menu_id].asInt(); if (!app->FindSubMenu(menu_id)) { - LOG4CXX_ERROR(logger_, "Menu with id " << menu_id << " is not found."); + SDL_LOG_ERROR("Menu with id " << menu_id << " is not found."); SendResponse(false, mobile_apis::Result::INVALID_ID); return; } @@ -92,13 +94,13 @@ void DeleteSubMenuRequest::Run() { void DeleteSubMenuRequest::DeleteNestedSubMenus(ApplicationSharedPtr const app, uint32_t parentID, const SubMenuMap& subMenus) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SubMenuMap::const_iterator it = subMenus.begin(); - LOG4CXX_DEBUG(logger_, "Delete Submenus with Parent ID: " << parentID); + SDL_LOG_DEBUG("Delete Submenus with Parent ID: " << parentID); while (subMenus.end() != it) { if (!(*it->second).keyExists(strings::parent_id)) { - LOG4CXX_ERROR(logger_, "parent ID does not exist"); + SDL_LOG_ERROR("parent ID does not exist"); ++it; continue; } @@ -114,7 +116,7 @@ void DeleteSubMenuRequest::DeleteNestedSubMenus(ApplicationSharedPtr const app, msg_params[strings::app_id] = app->app_id(); SendHMIRequest(hmi_apis::FunctionID::UI_DeleteSubMenu, &msg_params); ++it; - LOG4CXX_DEBUG(logger_, "Removing submenuID: " << menuID); + SDL_LOG_DEBUG("Removing submenuID: " << menuID); app->RemoveSubMenu(menuID); } else { ++it; @@ -124,7 +126,7 @@ void DeleteSubMenuRequest::DeleteNestedSubMenus(ApplicationSharedPtr const app, void DeleteSubMenuRequest::DeleteSubMenuVRCommands( ApplicationConstSharedPtr app, uint32_t parentID) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const DataAccessor<CommandsMap> accessor = app->commands_map(); const CommandsMap& commands = accessor.GetData(); @@ -151,15 +153,16 @@ void DeleteSubMenuRequest::DeleteSubMenuVRCommands( void DeleteSubMenuRequest::DeleteSubMenuUICommands( ApplicationSharedPtr const app, uint32_t parentID) { - LOG4CXX_AUTO_TRACE(logger_); - LOG4CXX_DEBUG(logger_, "Delete UI Commands with Parent ID: " << parentID); + SDL_LOG_AUTO_TRACE(); + SDL_LOG_DEBUG("Delete UI Commands with Parent ID: " << parentID); + const DataAccessor<CommandsMap> accessor(app->commands_map()); const CommandsMap& commands = accessor.GetData(); CommandsMap::const_iterator it = commands.begin(); while (commands.end() != it) { if (!(*it->second).keyExists(strings::menu_params)) { - LOG4CXX_ERROR(logger_, "menu_params not exist"); + SDL_LOG_ERROR("menu_params not exist"); ++it; continue; } @@ -171,7 +174,7 @@ void DeleteSubMenuRequest::DeleteSubMenuUICommands( const uint32_t cmd_id = (*it->second)[strings::cmd_id].asUInt(); msg_params[strings::app_id] = app->app_id(); msg_params[strings::cmd_id] = cmd_id; - LOG4CXX_DEBUG(logger_, "Removing UI Command: " << cmd_id); + SDL_LOG_DEBUG("Removing UI Command: " << cmd_id); app->RemoveCommand(cmd_id); app->help_prompt_manager().OnVrCommandDeleted(cmd_id, false); it = commands.begin(); // Can not relay on @@ -185,7 +188,7 @@ void DeleteSubMenuRequest::DeleteSubMenuUICommands( } void DeleteSubMenuRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { @@ -203,7 +206,7 @@ void DeleteSubMenuRequest::on_event(const event_engine::Event& event) { application_manager_.application(connection_key()); if (!application) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); return; } @@ -227,7 +230,7 @@ void DeleteSubMenuRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_response.cc index 3cefef5c38..25c4dc7cb9 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + DeleteSubMenuResponse::DeleteSubMenuResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ DeleteSubMenuResponse::DeleteSubMenuResponse( DeleteSubMenuResponse::~DeleteSubMenuResponse() {} void DeleteSubMenuResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_request.cc index 7f253e25fd..214a9c2bab 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_request.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + DeleteWindowRequest::DeleteWindowRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -58,13 +60,12 @@ bool DeleteWindowRequest::CheckWindowId( const WindowID window_id = (*message_)[strings::msg_params][strings::window_id].asInt(); if (mobile_apis::PredefinedWindows::DEFAULT_WINDOW == window_id) { - LOG4CXX_ERROR(logger_, "Main application window can't be deleted"); + SDL_LOG_ERROR("Main application window can't be deleted"); return false; } if (!app->WindowIdExists(window_id)) { - LOG4CXX_ERROR(logger_, - "Window with id #" << window_id << " does not exist"); + SDL_LOG_ERROR("Window with id #" << window_id << " does not exist"); return false; } @@ -85,13 +86,13 @@ void DeleteWindowRequest::DeleteWindow( } void DeleteWindowRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr application = application_manager_.application(connection_key()); if (!application) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -109,10 +110,10 @@ void DeleteWindowRequest::Run() { } void DeleteWindowRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if (hmi_apis::FunctionID::UI_DeleteWindow != event.id()) { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } @@ -120,12 +121,12 @@ void DeleteWindowRequest::on_event(const event_engine::Event& event) { application_manager_.application(connection_key()); if (!application) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } - LOG4CXX_INFO(logger_, "Received DeleteWindow event"); + SDL_LOG_INFO("Received DeleteWindow event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI); const smart_objects::SmartObject& response_message = event.smart_object(); @@ -138,7 +139,7 @@ void DeleteWindowRequest::on_event(const event_engine::Event& event) { GetInfo(response_message, response_info); if (!is_success) { - LOG4CXX_ERROR(logger_, "DeleteWindow request has failed on HMI side"); + SDL_LOG_ERROR("DeleteWindow request has failed on HMI side"); SendResponse(is_success, result_code, response_info.empty() ? nullptr : response_info.c_str()); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_response.cc index f9ac9a46d6..1703623a38 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + DeleteWindowResponse::DeleteWindowResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ DeleteWindowResponse::DeleteWindowResponse( DeleteWindowResponse::~DeleteWindowResponse() {} void DeleteWindowResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_request.cc index 1de7a3ea03..f0ef2e0028 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_request.cc @@ -41,6 +41,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + DialNumberRequest::DialNumberRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,7 +58,7 @@ DialNumberRequest::DialNumberRequest( DialNumberRequest::~DialNumberRequest() {} bool DialNumberRequest::Init() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); default_timeout_ = 0; @@ -64,13 +66,13 @@ bool DialNumberRequest::Init() { } void DialNumberRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr application = application_manager_.application(connection_key()); if (!application) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -78,15 +80,14 @@ void DialNumberRequest::Run() { std::string number = (*message_)[strings::msg_params][strings::number].asString(); if (!CheckSyntax(number)) { - LOG4CXX_ERROR(logger_, "Invalid incoming data"); + SDL_LOG_ERROR("Invalid incoming data"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } StripNumberParam(number); if (number.empty()) { - LOG4CXX_ERROR(logger_, - "After strip number param is empty. Invalid incoming data"); + SDL_LOG_ERROR("After strip number param is empty. Invalid incoming data"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -102,12 +103,12 @@ void DialNumberRequest::Run() { } void DialNumberRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr application = application_manager_.application(connection_key()); if (!application) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); return; } @@ -115,7 +116,7 @@ void DialNumberRequest::on_event(const event_engine::Event& event) { mobile_apis::Result::eType result_code = mobile_apis::Result::SUCCESS; switch (event.id()) { case hmi_apis::FunctionID::BasicCommunication_DialNumber: { - LOG4CXX_INFO(logger_, "Received DialNumber event"); + SDL_LOG_INFO("Received DialNumber event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_BasicCommunication); result_code = CommandRequestImpl::GetMobileResultCode( static_cast<hmi_apis::Common_Result::eType>( @@ -123,7 +124,7 @@ void DialNumberRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_response.cc index 4385b3fe90..4bbe5e2eb7 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + DialNumberResponse::DialNumberResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ DialNumberResponse::DialNumberResponse( DialNumberResponse::~DialNumberResponse() {} void DialNumberResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_request.cc index 66ff7b48d5..f5506503e9 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_request.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + EndAudioPassThruRequest::EndAudioPassThruRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,14 +56,14 @@ EndAudioPassThruRequest::EndAudioPassThruRequest( EndAudioPassThruRequest::~EndAudioPassThruRequest() {} void EndAudioPassThruRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI); SendHMIRequest(hmi_apis::FunctionID::UI_EndAudioPassThru, NULL, true); } void EndAudioPassThruRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { @@ -89,7 +91,7 @@ void EndAudioPassThruRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_response.cc index 6c9bd05e09..8e5672bfd9 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + EndAudioPassThruResponse::EndAudioPassThruResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ EndAudioPassThruResponse::EndAudioPassThruResponse( EndAudioPassThruResponse::~EndAudioPassThruResponse() {} void EndAudioPassThruResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_cloud_app_properties_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_cloud_app_properties_request.cc index c5e94da378..585636bfa8 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_cloud_app_properties_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_cloud_app_properties_request.cc @@ -6,6 +6,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + GetCloudAppPropertiesRequest::GetCloudAppPropertiesRequest( const app_mngr::commands::MessageSharedPtr& message, app_mngr::ApplicationManager& application_manager, @@ -21,11 +23,11 @@ GetCloudAppPropertiesRequest::GetCloudAppPropertiesRequest( GetCloudAppPropertiesRequest::~GetCloudAppPropertiesRequest() {} void GetCloudAppPropertiesRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -83,7 +85,7 @@ void GetCloudAppPropertiesRequest::Run() { void GetCloudAppPropertiesRequest::on_event( const app_mngr::event_engine::Event& event) { - LOG4CXX_INFO(logger_, "GetCloudAppPropertiesRequest on_event"); + SDL_LOG_INFO("GetCloudAppPropertiesRequest on_event"); } } // namespace commands diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_cloud_app_properties_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_cloud_app_properties_response.cc index f50897303a..35bdaaeb44 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_cloud_app_properties_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_cloud_app_properties_response.cc @@ -7,6 +7,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + GetCloudAppPropertiesResponse::GetCloudAppPropertiesResponse( const app_mngr::commands::MessageSharedPtr& message, app_mngr::ApplicationManager& application_manager, @@ -22,7 +24,7 @@ GetCloudAppPropertiesResponse::GetCloudAppPropertiesResponse( GetCloudAppPropertiesResponse::~GetCloudAppPropertiesResponse() {} void GetCloudAppPropertiesResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_file_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_file_request.cc index 75263494c2..620d901f3c 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_file_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_file_request.cc @@ -59,6 +59,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + GetFileRequest::GetFileRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -85,8 +87,7 @@ bool GetFileRequest::GetFilePath(std::string& file_path, bool& forward_to_hmi) { if ((*message_)[strings::msg_params].keyExists(strings::app_service_id)) { std::string service_id = (*message_)[strings::msg_params][strings::app_service_id].asString(); - LOG4CXX_DEBUG(logger_, - "Finding storage directory for service id: " << service_id); + SDL_LOG_DEBUG("Finding storage directory for service id: " << service_id); AppService* app_service_info = application_manager_.GetAppServiceManager().FindServiceByID(service_id); @@ -101,7 +102,7 @@ bool GetFileRequest::GetFilePath(std::string& file_path, bool& forward_to_hmi) { return false; } } else { - LOG4CXX_DEBUG(logger_, "Using current storage directory"); + SDL_LOG_DEBUG("Using current storage directory"); } ApplicationSharedPtr app = application_manager_.application(connect_key); @@ -110,15 +111,15 @@ bool GetFileRequest::GetFilePath(std::string& file_path, bool& forward_to_hmi) { } void GetFileRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); - LOG4CXX_INFO(logger_, "Received GetFile request"); + SDL_LOG_AUTO_TRACE(); + SDL_LOG_INFO("Received GetFile request"); ApplicationSharedPtr app = application_manager_.application(connection_key()); smart_objects::SmartObject response_params = smart_objects::SmartObject(smart_objects::SmartType_Map); if (!app) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -126,8 +127,7 @@ void GetFileRequest::Run() { file_name_ = (*message_)[strings::msg_params][strings::file_name].asString(); if (!file_system::IsFileNameValid(file_name_)) { - LOG4CXX_ERROR(logger_, - "File name " << file_name_ << " contains forbidden symbols."); + SDL_LOG_ERROR("File name " << file_name_ << " contains forbidden symbols."); SendResponse(false, mobile_apis::Result::INVALID_DATA, "File name contains forbidden symbols", @@ -136,7 +136,7 @@ void GetFileRequest::Run() { } // Initialize other params with default values. If exists overwrite the values - LOG4CXX_DEBUG(logger_, "Intialize non manadatory params with default values"); + SDL_LOG_DEBUG("Intialize non manadatory params with default values"); if ((*message_)[strings::msg_params].keyExists(strings::file_type)) { file_type_ = static_cast<mobile_apis::FileType::eType>( @@ -145,13 +145,13 @@ void GetFileRequest::Run() { // Check if file exists on system (may have to use app service id to get the // correct app folder) - LOG4CXX_DEBUG(logger_, "Check if file exists on system"); + SDL_LOG_DEBUG("Check if file exists on system"); std::string file_path; bool forward_to_hmi; if (GetFilePath(file_path, forward_to_hmi)) { if (forward_to_hmi) { - LOG4CXX_DEBUG(logger_, "Forwarding GetFile request to HMI"); + SDL_LOG_DEBUG("Forwarding GetFile request to HMI"); application_manager_.IncreaseForwardedRequestTimeout(connection_key(), correlation_id()); SendHMIRequest(hmi_apis::FunctionID::BasicCommunication_GetFilePath, @@ -160,7 +160,7 @@ void GetFileRequest::Run() { return; } } else { - LOG4CXX_ERROR(logger_, "Could not get file path"); + SDL_LOG_ERROR("Could not get file path"); SendResponse(false, mobile_apis::Result::INVALID_DATA, "Could not get file path", @@ -170,7 +170,7 @@ void GetFileRequest::Run() { const std::string full_path = file_path + "/" + file_name_; if (!file_system::FileExists(full_path)) { - LOG4CXX_ERROR(logger_, "File " << full_path << " does not exist"); + SDL_LOG_ERROR("File " << full_path << " does not exist"); SendResponse(false, mobile_apis::Result::FILE_NOT_FOUND, "File does not exist", @@ -179,7 +179,7 @@ void GetFileRequest::Run() { } // Handle offset - LOG4CXX_DEBUG(logger_, "Handle offset and length parameters"); + SDL_LOG_DEBUG("Handle offset and length parameters"); const uint64_t file_size = file_system::FileSize(full_path); if ((*message_)[strings::msg_params].keyExists(strings::offset)) { @@ -195,9 +195,8 @@ void GetFileRequest::Run() { } if (offset_ > file_size) { - LOG4CXX_ERROR( - logger_, - "Offset " << offset_ << " greater than file size " << file_size); + SDL_LOG_ERROR("Offset " << offset_ << " greater than file size " + << file_size); SendResponse(false, mobile_apis::Result::INVALID_DATA, "Offset greater than file size", @@ -205,8 +204,7 @@ void GetFileRequest::Run() { return; } if (length_ > file_size - offset_) { - LOG4CXX_ERROR(logger_, - "Length " << length_ << " greater than file size - offset" + SDL_LOG_ERROR("Length " << length_ << " greater than file size - offset" << file_size); SendResponse(false, mobile_apis::Result::INVALID_DATA, @@ -216,10 +214,10 @@ void GetFileRequest::Run() { } // Load data from file as binary data - LOG4CXX_DEBUG(logger_, "Load binary data from file"); + SDL_LOG_DEBUG("Load binary data from file"); std::vector<uint8_t> bin_data; if (!file_system::ReadBinaryFile(full_path, bin_data, offset_, length_)) { - LOG4CXX_ERROR(logger_, "Failed to read from file: " << full_path); + SDL_LOG_ERROR("Failed to read from file: " << full_path); SendResponse(false, mobile_apis::Result::GENERIC_ERROR, "Unable to read from file", @@ -248,7 +246,7 @@ void GetFileRequest::Run() { } void GetFileRequest::on_event(const app_mngr::event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if (hmi_apis::FunctionID::BasicCommunication_GetFilePath != event.id()) { return; @@ -287,7 +285,7 @@ void GetFileRequest::on_event(const app_mngr::event_engine::Event& event) { event_message[strings::msg_params][strings::file_path].asString(); if (!file_system::FileExists(full_path)) { - LOG4CXX_ERROR(logger_, "File " << full_path << " does not exist"); + SDL_LOG_ERROR("File " << full_path << " does not exist"); SendResponse(false, mobile_apis::Result::FILE_NOT_FOUND, "File does not exist", @@ -309,9 +307,8 @@ void GetFileRequest::on_event(const app_mngr::event_engine::Event& event) { } if (offset_ > file_size) { - LOG4CXX_ERROR( - logger_, - "Offset " << offset_ << " greater than file size " << file_size); + SDL_LOG_ERROR("Offset " << offset_ << " greater than file size " + << file_size); SendResponse(false, mobile_apis::Result::INVALID_DATA, "Offset greater than file size", @@ -319,8 +316,7 @@ void GetFileRequest::on_event(const app_mngr::event_engine::Event& event) { return; } if (length_ > file_size - offset_) { - LOG4CXX_ERROR(logger_, - "Length " << length_ << " greater than file size - offset" + SDL_LOG_ERROR("Length " << length_ << " greater than file size - offset" << file_size); SendResponse(false, mobile_apis::Result::INVALID_DATA, @@ -329,7 +325,7 @@ void GetFileRequest::on_event(const app_mngr::event_engine::Event& event) { return; } if (!file_system::ReadBinaryFile(full_path, bin_data, offset_, length_)) { - LOG4CXX_ERROR(logger_, "Failed to read from file: " << full_path); + SDL_LOG_ERROR("Failed to read from file: " << full_path); SendResponse(false, mobile_apis::Result::GENERIC_ERROR, "Failed to read from file", @@ -341,7 +337,7 @@ void GetFileRequest::on_event(const app_mngr::event_engine::Event& event) { response_params[strings::crc32_check_sum] = crc_calculated; } else { - LOG4CXX_ERROR(logger_, "HMI did not return a file path: "); + SDL_LOG_ERROR("HMI did not return a file path: "); SendResponse(false, mobile_apis::Result::INVALID_DATA, "HMI did not return a file path", diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_file_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_file_response.cc index 2ea8dde02a..55f6e0b8a0 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_file_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_file_response.cc @@ -39,6 +39,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + GetFileResponse::GetFileResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,8 +56,8 @@ GetFileResponse::GetFileResponse( GetFileResponse::~GetFileResponse() {} void GetFileResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); - LOG4CXX_INFO(logger_, "Sending GetFile response"); + SDL_LOG_AUTO_TRACE(); + SDL_LOG_INFO("Sending GetFile response"); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc index 8b557efc5d..1cd4806f7e 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc @@ -42,6 +42,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + GetSystemCapabilityRequest::GetSystemCapabilityRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -57,18 +59,18 @@ GetSystemCapabilityRequest::GetSystemCapabilityRequest( GetSystemCapabilityRequest::~GetSystemCapabilityRequest() {} void GetSystemCapabilityRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } if ((*message_)[strings::msg_params].empty()) { - LOG4CXX_ERROR(logger_, strings::msg_params << " is empty."); + SDL_LOG_ERROR(strings::msg_params << " is empty."); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -181,7 +183,7 @@ void GetSystemCapabilityRequest::Run() { if (!capabilities) { SendResponse(false, mobile_apis::Result::DATA_NOT_AVAILABLE); - LOG4CXX_INFO(logger_, "system_display_capabilities are not available"); + SDL_LOG_INFO("system_display_capabilities are not available"); return; } @@ -202,12 +204,10 @@ void GetSystemCapabilityRequest::Run() { auto& ext = SystemCapabilityAppExtension::ExtractExtension(*app); if ((*message_)[app_mngr::strings::msg_params][strings::subscribe] .asBool() == true) { - LOG4CXX_DEBUG(logger_, - "Subscribe to system capability: " << response_type); + SDL_LOG_DEBUG("Subscribe to system capability: " << response_type); ext.SubscribeTo(response_type); } else { - LOG4CXX_DEBUG(logger_, - "Unsubscribe from system capability: " << response_type); + SDL_LOG_DEBUG("Unsubscribe from system capability: " << response_type); ext.UnsubscribeFrom(response_type); } } @@ -224,7 +224,7 @@ void GetSystemCapabilityRequest::Run() { } void GetSystemCapabilityRequest::on_event(const event_engine::Event& event) { - LOG4CXX_INFO(logger_, "GetSystemCapabilityRequest on_event"); + SDL_LOG_INFO("GetSystemCapabilityRequest on_event"); } } // namespace commands diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_response.cc index 5df0c72607..e20ea00a7b 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + GetSystemCapabilityResponse::GetSystemCapabilityResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ GetSystemCapabilityResponse::GetSystemCapabilityResponse( GetSystemCapabilityResponse::~GetSystemCapabilityResponse() {} void GetSystemCapabilityResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_request.cc index cd7d7a37b7..33d3479941 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_request.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + GetWayPointsRequest::GetWayPointsRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,14 +58,13 @@ GetWayPointsRequest::GetWayPointsRequest( GetWayPointsRequest::~GetWayPointsRequest() {} void GetWayPointsRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, - "An application with connection key " - << connection_key() << " is not registered."); + SDL_LOG_ERROR("An application with connection key " + << connection_key() << " is not registered."); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -79,17 +80,17 @@ void GetWayPointsRequest::Run() { } void GetWayPointsRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::UI_OnResetTimeout: { - LOG4CXX_INFO(logger_, "Received UI_OnResetTimeout event"); + SDL_LOG_INFO("Received UI_OnResetTimeout event"); application_manager_.updateRequestTimeout( connection_key(), correlation_id(), default_timeout()); break; } case hmi_apis::FunctionID::Navigation_GetWayPoints: { - LOG4CXX_INFO(logger_, "Received Navigation_GetWayPoints event"); + SDL_LOG_INFO("Received Navigation_GetWayPoints event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation); const hmi_apis::Common_Result::eType result_code = static_cast<hmi_apis::Common_Result::eType>( @@ -105,7 +106,7 @@ void GetWayPointsRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); break; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_response.cc index e481c926b8..cbb9607d0d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + GetWayPointsResponse::GetWayPointsResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ GetWayPointsResponse::GetWayPointsResponse( GetWayPointsResponse::~GetWayPointsResponse() {} void GetWayPointsResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_request.cc index b8714b4784..9262466e34 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_request.cc @@ -44,6 +44,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ListFilesRequest::ListFilesRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -59,14 +61,14 @@ ListFilesRequest::ListFilesRequest( ListFilesRequest::~ListFilesRequest() {} void ListFilesRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr application = application_manager_.application(connection_key()); if (!application) { SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); return; } @@ -77,8 +79,7 @@ void ListFilesRequest::Run() { application->list_files_in_none_count())) { // If application is in the HMI_NONE level the quantity of allowed // DeleteFile request is limited by the configuration profile - LOG4CXX_ERROR(logger_, - "Too many requests from the app with HMILevel HMI_NONE "); + SDL_LOG_ERROR("Too many requests from the app with HMILevel HMI_NONE "); SendResponse(false, mobile_apis::Result::REJECTED); return; } @@ -97,11 +98,10 @@ void ListFilesRequest::Run() { std::vector<std::string>::const_iterator it = persistent_files.begin(); for (; it != persistent_files.end(); ++it) { if (i < application_manager_.get_settings().list_files_response_size()) { - LOG4CXX_DEBUG(logger_, "File " + *it + " added to ListFiles response"); + SDL_LOG_DEBUG("File " + *it + " added to ListFiles response"); (*message_)[strings::msg_params][strings::filenames][i++] = *it; } else { - LOG4CXX_DEBUG(logger_, - "File " + *it + " not added to ListFiles response"); + SDL_LOG_DEBUG("File " + *it + " not added to ListFiles response"); } } (*message_)[strings::params][strings::message_type] = diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_response.cc index ffa8a443d5..e71c2de316 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_response.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ListFilesResponse::ListFilesResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ ListFilesResponse::ListFilesResponse( ListFilesResponse::~ListFilesResponse() {} void ListFilesResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_app_interface_unregistered_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_app_interface_unregistered_notification.cc index 30d9853d97..96045552a0 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_app_interface_unregistered_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_app_interface_unregistered_notification.cc @@ -39,6 +39,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnAppInterfaceUnregisteredNotification::OnAppInterfaceUnregisteredNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ OnAppInterfaceUnregisteredNotification:: ~OnAppInterfaceUnregisteredNotification() {} void OnAppInterfaceUnregisteredNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const bool final_message = IsFinalMessage(); SendNotification(final_message); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_audio_pass_thru_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_audio_pass_thru_notification.cc index 3088c7df33..21a20c38c1 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_audio_pass_thru_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_audio_pass_thru_notification.cc @@ -37,6 +37,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnAudioPassThruNotification::OnAudioPassThruNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ OnAudioPassThruNotification::OnAudioPassThruNotification( OnAudioPassThruNotification::~OnAudioPassThruNotification() {} void OnAudioPassThruNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_event_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_event_notification.cc index 9c4be847a1..14787d0a08 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_event_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_event_notification.cc @@ -43,6 +43,8 @@ namespace commands { namespace mobile { +SDL_CREATE_LOG_VARIABLE("Commands") + OnButtonEventNotification::OnButtonEventNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -58,7 +60,7 @@ OnButtonEventNotification::OnButtonEventNotification( OnButtonEventNotification::~OnButtonEventNotification() {} void OnButtonEventNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const uint32_t btn_id = static_cast<uint32_t>( (*message_)[strings::msg_params][hmi_response::button_name].asInt()); @@ -71,7 +73,7 @@ void OnButtonEventNotification::Run() { if (static_cast<uint32_t>(mobile_apis::ButtonName::CUSTOM_BUTTON) == btn_id) { // app_id is mandatory for CUSTOM_BUTTON notification if (!is_app_id_exists) { - LOG4CXX_ERROR(logger_, "CUSTOM_BUTTON OnButtonEvent without app_id."); + SDL_LOG_ERROR("CUSTOM_BUTTON OnButtonEvent without app_id."); return; } @@ -81,13 +83,12 @@ void OnButtonEventNotification::Run() { // custom_button_id is mandatory for CUSTOM_BUTTON notification if (false == (*message_)[strings::msg_params].keyExists( hmi_response::custom_button_id)) { - LOG4CXX_ERROR(logger_, - "CUSTOM_BUTTON OnButtonEvent without custom_button_id."); + SDL_LOG_ERROR("CUSTOM_BUTTON OnButtonEvent without custom_button_id."); return; } if (!app) { - LOG4CXX_ERROR(logger_, "Application doesn't exist."); + SDL_LOG_ERROR("Application doesn't exist."); return; } @@ -97,8 +98,7 @@ void OnButtonEventNotification::Run() { .asUInt(); if (false == app->IsSubscribedToSoftButton(custom_btn_id)) { - LOG4CXX_ERROR(logger_, - "Application doesn't subscribed to this custom_button_id."); + SDL_LOG_ERROR("Application doesn't subscribed to this custom_button_id."); return; } @@ -106,9 +106,9 @@ void OnButtonEventNotification::Run() { (*message_)[strings::msg_params][strings::window_id] = window_id; const auto window_hmi_level = app->hmi_level(window_id); if ((mobile_api::HMILevel::HMI_NONE == window_hmi_level)) { - LOG4CXX_WARN(logger_, - "CUSTOM_BUTTON OnButtonEvent notification is not allowed in " - "NONE hmi level"); + SDL_LOG_WARN( + "CUSTOM_BUTTON OnButtonEvent notification is not allowed in " + "NONE hmi level"); return; } @@ -124,7 +124,7 @@ void OnButtonEventNotification::Run() { for (; subscribed_apps.end() != it; ++it) { ApplicationSharedPtr subscribed_app = *it; if (!subscribed_app) { - LOG4CXX_WARN(logger_, "Null pointer to subscribed app."); + SDL_LOG_WARN("Null pointer to subscribed app."); continue; } @@ -134,9 +134,8 @@ void OnButtonEventNotification::Run() { mobile_apis::PredefinedWindows::DEFAULT_WINDOW); if ((mobile_api::HMILevel::HMI_FULL != app_hmi_level) && (mobile_api::HMILevel::HMI_LIMITED != app_hmi_level)) { - LOG4CXX_WARN(logger_, - "OnButtonEvent notification is allowed only" - << "in FULL or LIMITED hmi level"); + SDL_LOG_WARN("OnButtonEvent notification is allowed only" + << "in FULL or LIMITED hmi level"); continue; } // if OK button and "app_id" absent send notification only in HMI_FULL mode @@ -150,7 +149,7 @@ void OnButtonEventNotification::Run() { void OnButtonEventNotification::SendButtonEvent(ApplicationConstSharedPtr app) { if (!app) { - LOG4CXX_ERROR(logger_, "OnButtonEvent NULL pointer"); + SDL_LOG_ERROR("OnButtonEvent NULL pointer"); return; } @@ -158,7 +157,7 @@ void OnButtonEventNotification::SendButtonEvent(ApplicationConstSharedPtr app) { std::make_shared<smart_objects::SmartObject>(); if (!on_btn_event) { - LOG4CXX_ERROR(logger_, "OnButtonEvent NULL pointer"); + SDL_LOG_ERROR("OnButtonEvent NULL pointer"); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_press_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_press_notification.cc index 87d16e87e6..4444f0d156 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_press_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_press_notification.cc @@ -44,6 +44,8 @@ namespace commands { namespace mobile { +SDL_CREATE_LOG_VARIABLE("Commands") + OnButtonPressNotification::OnButtonPressNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -59,7 +61,7 @@ OnButtonPressNotification::OnButtonPressNotification( OnButtonPressNotification::~OnButtonPressNotification() {} void OnButtonPressNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const uint32_t btn_id = static_cast<uint32_t>( (*message_)[strings::msg_params][hmi_response::button_name].asInt()); @@ -76,20 +78,19 @@ void OnButtonPressNotification::Run() { if (static_cast<uint32_t>(mobile_apis::ButtonName::CUSTOM_BUTTON) == btn_id) { // app_id is mandatory for CUSTOM_BUTTON notification if (!is_app_id_exists) { - LOG4CXX_ERROR(logger_, "CUSTOM_BUTTON OnButtonPress without app_id."); + SDL_LOG_ERROR("CUSTOM_BUTTON OnButtonPress without app_id."); return; } // custom_button_id is mandatory for CUSTOM_BUTTON notification if (false == (*message_)[strings::msg_params].keyExists( hmi_response::custom_button_id)) { - LOG4CXX_ERROR(logger_, - "CUSTOM_BUTTON OnButtonPress without custom_button_id."); + SDL_LOG_ERROR("CUSTOM_BUTTON OnButtonPress without custom_button_id."); return; } if (!app) { - LOG4CXX_ERROR(logger_, "Application doesn't exist."); + SDL_LOG_ERROR("Application doesn't exist."); return; } @@ -99,8 +100,7 @@ void OnButtonPressNotification::Run() { .asUInt(); if (false == app->IsSubscribedToSoftButton(custom_btn_id)) { - LOG4CXX_ERROR(logger_, - "Application doesn't subscribed to this custom_button_id."); + SDL_LOG_ERROR("Application doesn't subscribed to this custom_button_id."); return; } @@ -110,9 +110,9 @@ void OnButtonPressNotification::Run() { (*message_)[strings::msg_params][strings::window_id] = window_id; const auto window_hmi_level = app->hmi_level(window_id); if ((mobile_api::HMILevel::HMI_NONE == window_hmi_level)) { - LOG4CXX_WARN(logger_, - "CUSTOM_BUTTON OnButtonPress notification is not allowed in " - "NONE hmi level"); + SDL_LOG_WARN( + "CUSTOM_BUTTON OnButtonPress notification is not allowed in " + "NONE hmi level"); return; } @@ -128,7 +128,7 @@ void OnButtonPressNotification::Run() { for (; subscribed_apps.end() != it; ++it) { ApplicationSharedPtr subscribed_app = *it; if (!subscribed_app) { - LOG4CXX_WARN(logger_, "Null pointer to subscribed app."); + SDL_LOG_WARN("Null pointer to subscribed app."); continue; } @@ -138,9 +138,8 @@ void OnButtonPressNotification::Run() { mobile_apis::PredefinedWindows::DEFAULT_WINDOW); if ((mobile_api::HMILevel::HMI_FULL != app_hmi_level) && (mobile_api::HMILevel::HMI_LIMITED != app_hmi_level)) { - LOG4CXX_WARN(logger_, - "OnButtonPress notification is allowed only" - << "in FULL or LIMITED hmi level"); + SDL_LOG_WARN("OnButtonPress notification is allowed only " + << "in FULL or LIMITED hmi level"); continue; } // if "appID" is present, send it to named app only if its FULL or @@ -160,7 +159,7 @@ void OnButtonPressNotification::Run() { void OnButtonPressNotification::SendButtonPress(ApplicationConstSharedPtr app) { if (!app) { - LOG4CXX_ERROR(logger_, "OnButtonPress NULL pointer"); + SDL_LOG_ERROR("OnButtonPress NULL pointer"); return; } @@ -168,7 +167,7 @@ void OnButtonPressNotification::SendButtonPress(ApplicationConstSharedPtr app) { std::make_shared<smart_objects::SmartObject>(); if (!on_btn_press) { - LOG4CXX_ERROR(logger_, "OnButtonPress NULL pointer"); + SDL_LOG_ERROR("OnButtonPress NULL pointer"); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_command_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_command_notification.cc index 9c7edf74e6..afd73e7e4a 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_command_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_command_notification.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnCommandNotification::OnCommandNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,13 +57,13 @@ OnCommandNotification::OnCommandNotification( OnCommandNotification::~OnCommandNotification() {} void OnCommandNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application( (*message_)[strings::msg_params][strings::app_id].asInt()); if (!app) { - LOG4CXX_ERROR(logger_, "No application associated with session key"); + SDL_LOG_ERROR("No application associated with session key"); return; } @@ -69,7 +71,7 @@ void OnCommandNotification::Run() { (*message_)[strings::msg_params][strings::cmd_id].asUInt(); if (!app->FindCommand(cmd_id)) { - LOG4CXX_ERROR(logger_, " No applications found for the command " << cmd_id); + SDL_LOG_ERROR("No applications found for the command " << cmd_id); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_driver_distraction_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_driver_distraction_notification.cc index 42a1928f2e..960f9d9630 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_driver_distraction_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_driver_distraction_notification.cc @@ -43,6 +43,8 @@ namespace commands { namespace mobile { +SDL_CREATE_LOG_VARIABLE("Commands") + OnDriverDistractionNotification::OnDriverDistractionNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -58,7 +60,7 @@ OnDriverDistractionNotification::OnDriverDistractionNotification( OnDriverDistractionNotification::~OnDriverDistractionNotification() {} void OnDriverDistractionNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hash_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hash_change_notification.cc index c2ce2550b9..873e9f1788 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hash_change_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hash_change_notification.cc @@ -45,6 +45,8 @@ namespace commands { namespace mobile { +SDL_CREATE_LOG_VARIABLE("Commands") + OnHashChangeNotification::OnHashChangeNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -60,7 +62,7 @@ OnHashChangeNotification::OnHashChangeNotification( OnHashChangeNotification::~OnHashChangeNotification() {} void OnHashChangeNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); (*message_)[strings::params][strings::message_type] = static_cast<int32_t>(application_manager::MessageType::kNotification); @@ -72,8 +74,7 @@ void OnHashChangeNotification::Run() { (*message_)[strings::msg_params][strings::hash_id] = app->curHash(); SendNotification(); } else { - LOG4CXX_WARN(logger_, - "Application with app_id " << app_id << " does not exist"); + SDL_LOG_WARN("Application with app_id " << app_id << " does not exist"); } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification.cc index df3bce0154..66a0fbb3f6 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification.cc @@ -41,6 +41,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnHMIStatusNotification::OnHMIStatusNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,20 +58,20 @@ OnHMIStatusNotification::OnHMIStatusNotification( OnHMIStatusNotification::~OnHMIStatusNotification() {} void OnHMIStatusNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); (*message_)[strings::params][strings::message_type] = static_cast<int32_t>(application_manager::MessageType::kNotification); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (app.use_count() == 0) { - LOG4CXX_ERROR(logger_, "OnHMIStatusNotification application doesn't exist"); + SDL_LOG_ERROR("OnHMIStatusNotification application doesn't exist"); return; } // If the response has no hmi level, return and don't send the notification if (!(*message_)[strings::msg_params].keyExists(strings::hmi_level)) { // our notification clearly isn't well-formed - LOG4CXX_ERROR(logger_, "OnHMIStatusNotification has no hmiLevel field"); + SDL_LOG_ERROR("OnHMIStatusNotification has no hmiLevel field"); return; } @@ -82,8 +84,7 @@ void OnHMIStatusNotification::Run() { (mobile_apis::HMILevel::HMI_LIMITED == hmi_level)) { if (!(app->tts_properties_in_full())) { app->set_tts_properties_in_full(true); - LOG4CXX_INFO(logger_, - "OnHMIStatusNotification AddAppToTTSGlobalPropertiesList"); + SDL_LOG_INFO("OnHMIStatusNotification AddAppToTTSGlobalPropertiesList"); application_manager_.AddAppToTTSGlobalPropertiesList(app->app_id()); } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification_from_mobile.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification_from_mobile.cc index 28325a40f5..2263e4b989 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification_from_mobile.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification_from_mobile.cc @@ -39,6 +39,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnHMIStatusNotificationFromMobile::OnHMIStatusNotificationFromMobile( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,15 +56,15 @@ OnHMIStatusNotificationFromMobile::OnHMIStatusNotificationFromMobile( OnHMIStatusNotificationFromMobile::~OnHMIStatusNotificationFromMobile() {} void OnHMIStatusNotificationFromMobile::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); (*message_)[strings::params][strings::message_type] = static_cast<int32_t>(application_manager::MessageType::kNotification); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (app.use_count() == 0) { - LOG4CXX_ERROR( - logger_, "OnHMIStatusNotificationFromMobile application doesn't exist"); + SDL_LOG_ERROR( + "OnHMIStatusNotificationFromMobile application doesn't exist"); return; } @@ -79,9 +81,8 @@ void OnHMIStatusNotificationFromMobile::Run() { bool is_apps_requested_before = application_manager_.IsAppsQueriedFrom(handle); - LOG4CXX_DEBUG(logger_, - "Mobile HMI state notication came for connection key:" - << connection_key() << " and handle: " << handle); + SDL_LOG_DEBUG("Mobile HMI state notification came for connection key: " + << connection_key() << " and handle: " << handle); if (!is_apps_requested_before && Message::is_sufficient_version( @@ -96,10 +97,10 @@ void OnHMIStatusNotificationFromMobile::Run() { } if (is_apps_requested_before) { - LOG4CXX_DEBUG(logger_, - "Remote apps list had been requested already " - " for handle: " - << handle); + SDL_LOG_DEBUG( + "Remote apps list had been requested already " + "for handle: " + << handle); if (Message::is_sufficient_version( protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_4, diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_keyboard_input_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_keyboard_input_notification.cc index 1c0609e17d..38f346ac5c 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_keyboard_input_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_keyboard_input_notification.cc @@ -43,6 +43,8 @@ namespace commands { namespace mobile { +SDL_CREATE_LOG_VARIABLE("Commands") + OnKeyBoardInputNotification::OnKeyBoardInputNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -58,7 +60,7 @@ OnKeyBoardInputNotification::OnKeyBoardInputNotification( OnKeyBoardInputNotification::~OnKeyBoardInputNotification() {} void OnKeyBoardInputNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app_to_notify; @@ -70,15 +72,14 @@ void OnKeyBoardInputNotification::Run() { if (app->is_perform_interaction_active() && (*it)->perform_interaction_layout() == mobile_apis::LayoutMode::KEYBOARD) { - LOG4CXX_INFO(logger_, - "There is application with active PerformInteraction"); + SDL_LOG_INFO("There is application with active PerformInteraction"); app_to_notify = app; break; } if (mobile_apis::HMILevel::eType::HMI_FULL == app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW)) { - LOG4CXX_INFO(logger_, "There is application in HMI_FULL level"); + SDL_LOG_INFO("There is application in HMI_FULL level"); app_to_notify = app; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_language_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_language_change_notification.cc index 9605fd6074..363ea9bbc3 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_language_change_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_language_change_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnLanguageChangeNotification::OnLanguageChangeNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnLanguageChangeNotification::OnLanguageChangeNotification( OnLanguageChangeNotification::~OnLanguageChangeNotification() {} void OnLanguageChangeNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_permissions_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_permissions_change_notification.cc index f64ca34bf2..7c0c27040d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_permissions_change_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_permissions_change_notification.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnPermissionsChangeNotification::OnPermissionsChangeNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ OnPermissionsChangeNotification::OnPermissionsChangeNotification( OnPermissionsChangeNotification::~OnPermissionsChangeNotification() {} void OnPermissionsChangeNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_subtle_alert_pressed_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_subtle_alert_pressed_notification.cc index ce1d1b16d1..6cbd391070 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_subtle_alert_pressed_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_subtle_alert_pressed_notification.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnSubtleAlertPressedNotification::OnSubtleAlertPressedNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,13 +55,13 @@ OnSubtleAlertPressedNotification::OnSubtleAlertPressedNotification( OnSubtleAlertPressedNotification::~OnSubtleAlertPressedNotification() {} void OnSubtleAlertPressedNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application( (*message_)[strings::msg_params][strings::app_id].asInt()); if (!app) { - LOG4CXX_ERROR(logger_, "No application associated with session key"); + SDL_LOG_ERROR("No application associated with session key"); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_capability_updated_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_capability_updated_notification.cc index cc6ab7b65b..6c16e1156e 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_capability_updated_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_capability_updated_notification.cc @@ -13,6 +13,8 @@ using namespace application_manager; namespace commands { namespace mobile { +SDL_CREATE_LOG_VARIABLE("Commands") + OnSystemCapabilityUpdatedNotification::OnSystemCapabilityUpdatedNotification( const app_mngr::commands::MessageSharedPtr& message, app_mngr::ApplicationManager& application_manager, @@ -29,7 +31,7 @@ OnSystemCapabilityUpdatedNotification:: ~OnSystemCapabilityUpdatedNotification() {} void OnSystemCapabilityUpdatedNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params]; const auto system_capability_type = @@ -117,9 +119,8 @@ void OnSystemCapabilityUpdatedNotification::Run() { app_services->end(), matching_service_predicate); if (it != app_services->end()) { - LOG4CXX_DEBUG( - logger_, - "Replacing updated record with service_id " << service_id); + SDL_LOG_DEBUG("Replacing updated record with service_id " + << service_id); app_services->erase(it); } app_services->push_back(updated_capabilities[i]); @@ -136,11 +137,10 @@ void OnSystemCapabilityUpdatedNotification::Run() { } default: { - LOG4CXX_ERROR(logger_, - "Unknown system capability type: " - << msg_params[strings::system_capability] - [strings::system_capability_type] - .asInt()); + SDL_LOG_ERROR("Unknown system capability type: " + << msg_params[strings::system_capability] + [strings::system_capability_type] + .asInt()); return; } } @@ -159,8 +159,7 @@ void OnSystemCapabilityUpdatedNotification::Run() { DCHECK_OR_RETURN(app, false); auto& ext = SystemCapabilityAppExtension::ExtractExtension(*app); if (!ext.IsSubscribedTo(system_capability_type)) { - LOG4CXX_DEBUG(logger_, - "App " << app->app_id() + SDL_LOG_DEBUG("App " << app->app_id() << " is not subscribed to this capability type"); return false; } @@ -168,14 +167,12 @@ void OnSystemCapabilityUpdatedNotification::Run() { if (mobile_apis::SystemCapabilityType::DISPLAYS == system_capability_type && initial_connection_key > 0) { - LOG4CXX_DEBUG(logger_, - "Display capabilities notification for app " - << initial_connection_key << " only"); + SDL_LOG_DEBUG("Display capabilities notification for app " + << initial_connection_key << " only"); return app->app_id() == initial_connection_key; } - LOG4CXX_DEBUG(logger_, - "App " << app->app_id() + SDL_LOG_DEBUG("App " << app->app_id() << " is subscribed to specified capability type"); return true; }; @@ -183,8 +180,7 @@ void OnSystemCapabilityUpdatedNotification::Run() { const std::vector<ApplicationSharedPtr>& applications = FindAllApps( application_manager_.applications(), subscribed_to_capability_predicate); - LOG4CXX_DEBUG(logger_, - "Number of Notifications to be sent: " << applications.size()); + SDL_LOG_DEBUG("Number of Notifications to be sent: " << applications.size()); std::vector<ApplicationSharedPtr>::const_iterator app_it = applications.begin(); @@ -194,31 +190,28 @@ void OnSystemCapabilityUpdatedNotification::Run() { if (system_capability_type == mobile_apis::SystemCapabilityType::REMOTE_CONTROL && !app->is_remote_control_supported()) { - LOG4CXX_WARN( - logger_, + SDL_LOG_WARN( "App with connection key: " - << app->app_id() - << " was subcribed to REMOTE_CONTROL system capabilities, but " - "does not have RC permissions. Unsubscribing"); + << app->app_id() + << " was subcribed to REMOTE_CONTROL system capabilities, but " + "does not have RC permissions. Unsubscribing"); auto& ext = SystemCapabilityAppExtension::ExtractExtension(*app); ext.UnsubscribeFrom(system_capability_type); continue; } if (mobile_apis::SystemCapabilityType::DISPLAYS == system_capability_type) { - LOG4CXX_DEBUG(logger_, "Using common display capabilities"); + SDL_LOG_DEBUG("Using common display capabilities"); auto capabilities = hmi_capabilities_.system_display_capabilities(); if (app->is_resuming() && app->is_app_data_resumption_allowed()) { - LOG4CXX_DEBUG(logger_, - "Application " - << app->app_id() - << " is resuming. Providing cached capabilities"); + SDL_LOG_DEBUG("Application " + << app->app_id() + << " is resuming. Providing cached capabilities"); auto display_caps = app->display_capabilities_builder().display_capabilities(); capabilities = display_caps; } else if (app->display_capabilities()) { - LOG4CXX_DEBUG(logger_, - "Application " << app->app_id() + SDL_LOG_DEBUG("Application " << app->app_id() << " has specific display capabilities"); const WindowID window_id = msg_params[strings::system_capability] @@ -229,8 +222,7 @@ void OnSystemCapabilityUpdatedNotification::Run() { } if (!capabilities) { - LOG4CXX_WARN(logger_, - "No available display capabilities for sending. Skipping"); + SDL_LOG_WARN("No available display capabilities for sending. Skipping"); continue; } @@ -238,8 +230,7 @@ void OnSystemCapabilityUpdatedNotification::Run() { *capabilities; } - LOG4CXX_INFO(logger_, - "Sending OnSystemCapabilityUpdated " << capability_type_string + SDL_LOG_INFO("Sending OnSystemCapabilityUpdated " << capability_type_string << " application id " << app->app_id()); (*message_)[strings::params][strings::connection_key] = app->app_id(); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc index 9c868172f5..90ed038b89 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc @@ -48,6 +48,8 @@ namespace commands { namespace mobile { +SDL_CREATE_LOG_VARIABLE("Commands") + OnSystemRequestNotification::OnSystemRequestNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -63,7 +65,7 @@ OnSystemRequestNotification::OnSystemRequestNotification( OnSystemRequestNotification::~OnSystemRequestNotification() {} void OnSystemRequestNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace application_manager; using namespace mobile_apis; using namespace helpers; @@ -71,8 +73,7 @@ void OnSystemRequestNotification::Run() { ApplicationSharedPtr app = application_manager_.application(connection_key()); if (app.use_count() == 0) { - LOG4CXX_ERROR(logger_, - "Application with connection key " << connection_key() + SDL_LOG_ERROR("Application with connection key " << connection_key() << " is not registered."); return; } @@ -88,8 +89,7 @@ void OnSystemRequestNotification::Run() { if (!policy_handler.IsRequestTypeAllowed( app->device(), app->policy_app_id(), request_type)) { - LOG4CXX_WARN(logger_, - "Request type " << stringified_request_type + SDL_LOG_WARN("Request type " << stringified_request_type << " is not allowed by policies"); return; } @@ -101,15 +101,13 @@ void OnSystemRequestNotification::Run() { (*message_)[strings::msg_params][strings::request_subtype].asString(); if (!policy_handler.IsRequestSubTypeAllowed(app->policy_app_id(), request_subtype)) { - LOG4CXX_ERROR(logger_, - "Request subtype: " << request_subtype + SDL_LOG_ERROR("Request subtype: " << request_subtype << " is DISALLOWED by policies"); return; } } - LOG4CXX_DEBUG(logger_, - "Processing Request type : " << stringified_request_type); + SDL_LOG_DEBUG("Processing Request type : " << stringified_request_type); const bool binary_data_is_required = Compare<mobile_apis::RequestType::eType, EQ, ONE>( @@ -154,8 +152,7 @@ void OnSystemRequestNotification::Run() { } else if (mobile_apis::RequestType::LOCK_SCREEN_ICON_URL == request_type) { if (!(*message_)[strings::msg_params].keyExists(strings::url) || (*message_)[strings::msg_params][strings::url].empty()) { - LOG4CXX_ERROR(logger_, - "discarding LOCK_SCREEN_ICON_URL request without URL"); + SDL_LOG_ERROR("discarding LOCK_SCREEN_ICON_URL request without URL"); return; } } @@ -165,7 +162,7 @@ void OnSystemRequestNotification::Run() { #ifdef PROPRIETARY_MODE void OnSystemRequestNotification::AddHeader(BinaryMessage& message) const { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const uint32_t timeout = policy_handler_.TimeoutExchangeSec(); size_t content_length; @@ -223,8 +220,8 @@ void OnSystemRequestNotification::AddHeader(BinaryMessage& message) const { message.clear(); message.assign(header.begin(), header.end()); - LOG4CXX_DEBUG( - logger_, "Header added: " << std::string(message.begin(), message.end())); + SDL_LOG_DEBUG( + "Header added: " << std::string(message.begin(), message.end())); } size_t OnSystemRequestNotification::ParsePTString( diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_tbt_client_state_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_tbt_client_state_notification.cc index 0a8420b6a3..944fb0c148 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_tbt_client_state_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_tbt_client_state_notification.cc @@ -41,6 +41,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnTBTClientStateNotification::OnTBTClientStateNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,7 +58,7 @@ OnTBTClientStateNotification::OnTBTClientStateNotification( OnTBTClientStateNotification::~OnTBTClientStateNotification() {} void OnTBTClientStateNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); (*message_)[strings::params][strings::message_type] = static_cast<int32_t>(application_manager::MessageType::kNotification); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_touch_event_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_touch_event_notification.cc index 6ceb381d2e..02ec1be53f 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_touch_event_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_touch_event_notification.cc @@ -42,6 +42,8 @@ namespace commands { namespace mobile { +SDL_CREATE_LOG_VARIABLE("Commands") + OnTouchEventNotification::OnTouchEventNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -57,7 +59,7 @@ OnTouchEventNotification::OnTouchEventNotification( OnTouchEventNotification::~OnTouchEventNotification() {} void OnTouchEventNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const std::vector<ApplicationSharedPtr>& applications_with_navi = application_manager_.applications_with_navi(); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_update_file_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_update_file_notification.cc index 171772a549..d3257844ec 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_update_file_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_update_file_notification.cc @@ -39,6 +39,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnUpdateFileNotification::OnUpdateFileNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ OnUpdateFileNotification::OnUpdateFileNotification( OnUpdateFileNotification::~OnUpdateFileNotification() {} void OnUpdateFileNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_update_sub_menu_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_update_sub_menu_notification.cc index 0e598cf475..05ff9fc8e5 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_update_sub_menu_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_update_sub_menu_notification.cc @@ -39,6 +39,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnUpdateSubMenuNotification::OnUpdateSubMenuNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ OnUpdateSubMenuNotification::OnUpdateSubMenuNotification( OnUpdateSubMenuNotification::~OnUpdateSubMenuNotification() {} void OnUpdateSubMenuNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_way_point_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_way_point_change_notification.cc index 39e0735013..33413f805d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_way_point_change_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_way_point_change_notification.cc @@ -38,6 +38,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnWayPointChangeNotification::OnWayPointChangeNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ OnWayPointChangeNotification::OnWayPointChangeNotification( OnWayPointChangeNotification::~OnWayPointChangeNotification() {} void OnWayPointChangeNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); std::set<uint32_t> subscribed_for_way_points = application_manager_.GetAppsSubscribedForWayPoints(); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc index 2f3d38f0b0..5918c05f2d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc @@ -43,6 +43,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + namespace str = strings; PerformAudioPassThruRequest::PerformAudioPassThruRequest( @@ -64,7 +66,7 @@ PerformAudioPassThruRequest::PerformAudioPassThruRequest( PerformAudioPassThruRequest::~PerformAudioPassThruRequest() {} void PerformAudioPassThruRequest::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); FinishTTSSpeak(); CommandRequestImpl::onTimeOut(); @@ -77,28 +79,28 @@ bool PerformAudioPassThruRequest::Init() { } void PerformAudioPassThruRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "APPLICATION_NOT_REGISTERED"); + SDL_LOG_ERROR("APPLICATION_NOT_REGISTERED"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } if (mobile_api::HMILevel::HMI_NONE == app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW)) { - LOG4CXX_ERROR(logger_, "application isn't activated"); + SDL_LOG_ERROR("application isn't activated"); SendResponse(false, mobile_apis::Result::REJECTED); return; } if (IsWhiteSpaceExist()) { - LOG4CXX_ERROR(logger_, - "Incoming perform audio pass thru has contains " - "\\t\\n \\\\t \\\\n" - " text contains only whitespace in initialPrompt"); + SDL_LOG_ERROR( + "Incoming perform audio pass thru has contains " + "\\t\\n \\\\t \\\\n" + " text contains only whitespace in initialPrompt"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -114,9 +116,8 @@ void PerformAudioPassThruRequest::Run() { initial_prompt, app, application_manager_); if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) { - LOG4CXX_ERROR( - logger_, - "MessageHelper::VerifyTtsFiles return " << verification_result); + SDL_LOG_ERROR("MessageHelper::VerifyTtsFiles return " + << verification_result); SendResponse( false, mobile_apis::Result::FILE_NOT_FOUND, @@ -135,14 +136,14 @@ void PerformAudioPassThruRequest::Run() { } void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace helpers; const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::UI_PerformAudioPassThru: { - LOG4CXX_TRACE(logger_, "Received UI_PerformAudioPassThru"); + SDL_LOG_TRACE("Received UI_PerformAudioPassThru"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI); result_ui_ = static_cast<hmi_apis::Common_Result::eType>( @@ -151,7 +152,7 @@ void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) { // in case perform audio is started by other request skip stopping if (hmi_apis::Common_Result::REJECTED == result_ui_) { - LOG4CXX_ERROR(logger_, "Request was rejected"); + SDL_LOG_ERROR("Request was rejected"); SendResponse(false, MessageHelper::HMIToMobileResult(result_ui_), NULL, @@ -162,7 +163,7 @@ void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) { break; } case hmi_apis::FunctionID::TTS_Speak: { - LOG4CXX_INFO(logger_, "Received TTS_Speak event"); + SDL_LOG_INFO("Received TTS_Speak event"); result_tts_speak_ = static_cast<hmi_apis::Common_Result::eType>( message[strings::params][hmi_response::code].asUInt()); GetInfo(message, tts_info_); @@ -188,14 +189,14 @@ void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) { break; } case hmi_apis::FunctionID::TTS_OnResetTimeout: { - LOG4CXX_INFO(logger_, "Received TTS_OnResetTimeout event"); + SDL_LOG_INFO("Received TTS_OnResetTimeout event"); application_manager_.updateRequestTimeout( connection_key(), correlation_id(), default_timeout()); break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } @@ -214,7 +215,7 @@ void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) { const PerformAudioPassThruRequest::ResponseParams& PerformAudioPassThruRequest::PrepareResponseParameters() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); app_mngr::commands::ResponseInfo ui_perform_info( result_ui_, HmiInterfaces::HMI_INTERFACE_UI, application_manager_); @@ -252,7 +253,7 @@ PerformAudioPassThruRequest::PrepareResponseParameters() { } void PerformAudioPassThruRequest::SendSpeakRequest() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace hmi_apis; using namespace smart_objects; @@ -274,7 +275,7 @@ void PerformAudioPassThruRequest::SendSpeakRequest() { } void PerformAudioPassThruRequest::SendPerformAudioPassThruRequest() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); smart_objects::SmartObject msg_params = smart_objects::SmartObject(smart_objects::SmartType_Map); @@ -321,7 +322,7 @@ void PerformAudioPassThruRequest::SendPerformAudioPassThruRequest() { } void PerformAudioPassThruRequest::SendRecordStartNotification() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); smart_objects::SmartObject msg_params = smart_objects::SmartObject(smart_objects::SmartType_Map); @@ -331,7 +332,7 @@ void PerformAudioPassThruRequest::SendRecordStartNotification() { } void PerformAudioPassThruRequest::StartMicrophoneRecording() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); uint32_t app_id = connection_key(); application_manager_.BeginAudioPassThru(app_id); @@ -346,7 +347,7 @@ void PerformAudioPassThruRequest::StartMicrophoneRecording() { } bool PerformAudioPassThruRequest::IsWhiteSpaceExist() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const char* str = NULL; if ((*message_)[strings::msg_params].keyExists(strings::initial_prompt)) { @@ -359,7 +360,7 @@ bool PerformAudioPassThruRequest::IsWhiteSpaceExist() { for (; it_ip != it_ip_end; ++it_ip) { str = (*it_ip)[strings::text].asCharArray(); if (std::strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid initial_prompt syntax check failed"); + SDL_LOG_ERROR("Invalid initial_prompt syntax check failed"); return true; } } @@ -370,8 +371,7 @@ bool PerformAudioPassThruRequest::IsWhiteSpaceExist() { str = (*message_)[strings::msg_params][strings::audio_pass_display_text1] .asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR( - logger_, + SDL_LOG_ERROR( "Invalid audio_pass_display_text1 value syntax check failed"); return true; } @@ -382,8 +382,7 @@ bool PerformAudioPassThruRequest::IsWhiteSpaceExist() { str = (*message_)[strings::msg_params][strings::audio_pass_display_text2] .asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR( - logger_, + SDL_LOG_ERROR( "Invalid audio_pass_display_text2 value syntax check failed"); return true; } @@ -392,14 +391,14 @@ bool PerformAudioPassThruRequest::IsWhiteSpaceExist() { } void PerformAudioPassThruRequest::FinishTTSSpeak() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); uint32_t app_id = connection_key(); if (application_manager_.EndAudioPassThru(app_id)) { - LOG4CXX_DEBUG(logger_, "Stop AudioPassThru."); + SDL_LOG_DEBUG("Stop AudioPassThru."); application_manager_.StopAudioPassThru(app_id); } if (!IsInterfaceAwaited(HmiInterfaces::HMI_INTERFACE_TTS)) { - LOG4CXX_WARN(logger_, "TTS Speak is inactive."); + SDL_LOG_WARN("TTS Speak is inactive."); return; } SendHMIRequest(hmi_apis::FunctionID::TTS_StopSpeaking, NULL); @@ -446,7 +445,7 @@ PerformAudioPassThruRequest::PrepareAudioPassThruResultCodeForResponse( } bool PerformAudioPassThruRequest::IsWaitingHMIResponse() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); return IsInterfaceAwaited(HmiInterfaces::HMI_INTERFACE_TTS) || IsInterfaceAwaited(HmiInterfaces::HMI_INTERFACE_UI); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_response.cc index 5dae6327eb..8712eae150 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + PerformAudioPassThruResponse::PerformAudioPassThruResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ PerformAudioPassThruResponse::PerformAudioPassThruResponse( PerformAudioPassThruResponse::~PerformAudioPassThruResponse() {} void PerformAudioPassThruResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } 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 881c838c1a..3e25a4b094 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 @@ -56,6 +56,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + namespace custom_str = utils::custom_string; uint32_t PerformInteractionRequest::pi_requests_count_ = 0; @@ -108,18 +110,18 @@ bool PerformInteractionRequest::Init() { } void PerformInteractionRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } if (app->is_perform_interaction_active()) { - LOG4CXX_DEBUG(logger_, "Application has active PerformInteraction"); + SDL_LOG_DEBUG("Application has active PerformInteraction"); app_pi_was_active_before_ = true; } @@ -134,9 +136,9 @@ void PerformInteractionRequest::Run() { if ((mobile_apis::InteractionMode::VR_ONLY == interaction_mode_) && (mobile_apis::LayoutMode::KEYBOARD == interaction_layout)) { - LOG4CXX_ERROR(logger_, - "PerformInteraction contains InteractionMode" - "=VR_ONLY and interactionLayout=KEYBOARD"); + SDL_LOG_ERROR( + "PerformInteraction contains InteractionMode" + "=VR_ONLY and interactionLayout=KEYBOARD"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -147,17 +149,17 @@ void PerformInteractionRequest::Run() { if (0 == choice_set_id_list_length) { if (mobile_apis::LayoutMode::KEYBOARD == interaction_layout) { if (mobile_apis::InteractionMode::BOTH == interaction_mode_) { - LOG4CXX_ERROR(logger_, - "interactionChoiceSetIDList is empty," - " InteractionMode=BOTH and" - " interactionLayout=KEYBOARD"); + SDL_LOG_ERROR( + "interactionChoiceSetIDList is empty," + " InteractionMode=BOTH and" + " interactionLayout=KEYBOARD"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } } else { - LOG4CXX_ERROR(logger_, - "interactionChoiceSetIDList is empty" - " and interactionLayout!=KEYBOARD"); + SDL_LOG_ERROR( + "interactionChoiceSetIDList is empty" + " and interactionLayout!=KEYBOARD"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -167,9 +169,9 @@ void PerformInteractionRequest::Run() { app, choice_set_id_list_length, msg_params[strings::interaction_choice_set_id_list])) { - LOG4CXX_ERROR(logger_, - "PerformInteraction has choice sets with " - "duplicated IDs or application does not have choice sets"); + SDL_LOG_ERROR( + "PerformInteraction has choice sets with " + "duplicated IDs or application does not have choice sets"); SendResponse(false, mobile_apis::Result::INVALID_ID); return; } @@ -178,23 +180,21 @@ void PerformInteractionRequest::Run() { if (mobile_apis::Result::INVALID_DATA == MessageHelper::VerifyImageVrHelpItems( msg_params[strings::vr_help], app, application_manager_)) { - LOG4CXX_ERROR(logger_, - "Verification of " << strings::vr_help << " failed."); + SDL_LOG_ERROR("Verification of " << strings::vr_help << " failed."); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } } if (IsWhiteSpaceExist()) { - LOG4CXX_ERROR(logger_, - "Incoming perform interaction has contains \t\n \\t \\n"); + SDL_LOG_ERROR("Incoming perform interaction has contains \t\n \\t \\n"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } switch (interaction_mode_) { case mobile_apis::InteractionMode::BOTH: { - LOG4CXX_DEBUG(logger_, "Interaction Mode: BOTH"); + SDL_LOG_DEBUG("Interaction Mode: BOTH"); if (!CheckChoiceSetVRSynonyms(app) || !CheckChoiceSetMenuNames(app) || !CheckVrHelpItemPositions(app) || !CheckChoiceSetListVRCommands(app)) { @@ -203,7 +203,7 @@ void PerformInteractionRequest::Run() { break; } case mobile_apis::InteractionMode::MANUAL_ONLY: { - LOG4CXX_DEBUG(logger_, "Interaction Mode: MANUAL_ONLY"); + SDL_LOG_DEBUG("Interaction Mode: MANUAL_ONLY"); if (!CheckChoiceSetVRSynonyms(app) || !CheckChoiceSetMenuNames(app) || !CheckVrHelpItemPositions(app)) { return; @@ -211,7 +211,7 @@ void PerformInteractionRequest::Run() { break; } case mobile_apis::InteractionMode::VR_ONLY: { - LOG4CXX_DEBUG(logger_, "Interaction Mode: VR_ONLY"); + SDL_LOG_DEBUG("Interaction Mode: VR_ONLY"); if (!CheckChoiceSetVRSynonyms(app) || !CheckVrHelpItemPositions(app) || !CheckChoiceSetListVRCommands(app)) { return; @@ -219,7 +219,7 @@ void PerformInteractionRequest::Run() { break; } default: { - LOG4CXX_ERROR(logger_, "Unknown interaction mode"); + SDL_LOG_ERROR("Unknown interaction mode"); return; } } @@ -234,18 +234,18 @@ void PerformInteractionRequest::Run() { } void PerformInteractionRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::UI_OnResetTimeout: { - LOG4CXX_DEBUG(logger_, "Received UI_OnResetTimeout event"); + SDL_LOG_DEBUG("Received UI_OnResetTimeout event"); application_manager_.updateRequestTimeout( connection_key(), correlation_id(), default_timeout()); break; } case hmi_apis::FunctionID::UI_PerformInteraction: { - LOG4CXX_DEBUG(logger_, "Received UI_PerformInteraction event"); + SDL_LOG_DEBUG("Received UI_PerformInteraction event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI); ui_response_received_ = true; @@ -257,7 +257,7 @@ void PerformInteractionRequest::on_event(const event_engine::Event& event) { break; } case hmi_apis::FunctionID::VR_PerformInteraction: { - LOG4CXX_DEBUG(logger_, "Received VR_PerformInteraction"); + SDL_LOG_DEBUG("Received VR_PerformInteraction"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR); vr_response_received_ = true; @@ -271,15 +271,14 @@ void PerformInteractionRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); break; } } if (!HasHMIResponsesToWait()) { - LOG4CXX_DEBUG(logger_, - "Send response in interaction mode " - << static_cast<int32_t>(interaction_mode_)); + SDL_LOG_DEBUG("Send response in interaction mode " + << static_cast<int32_t>(interaction_mode_)); if (SetChoiceIdToResponseMsgParams(response_msg_params)) { SendBothModeResponse(response_msg_params); } else { @@ -292,11 +291,11 @@ void PerformInteractionRequest::on_event(const event_engine::Event& event) { } void PerformInteractionRequest::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); switch (interaction_mode_) { case mobile_apis::InteractionMode::BOTH: { - LOG4CXX_DEBUG(logger_, "Interaction Mode: BOTH"); + SDL_LOG_DEBUG("Interaction Mode: BOTH"); if (true == vr_response_received_) { unsubscribe_from_event(hmi_apis::FunctionID::UI_PerformInteraction); DisablePerformInteraction(); @@ -308,21 +307,21 @@ void PerformInteractionRequest::onTimeOut() { break; } case mobile_apis::InteractionMode::VR_ONLY: { - LOG4CXX_DEBUG(logger_, "Interaction Mode: VR_ONLY"); + SDL_LOG_DEBUG("Interaction Mode: VR_ONLY"); unsubscribe_from_event(hmi_apis::FunctionID::UI_PerformInteraction); DisablePerformInteraction(); CommandRequestImpl::onTimeOut(); break; } case mobile_apis::InteractionMode::MANUAL_ONLY: { - LOG4CXX_DEBUG(logger_, "InteractionMode: MANUAL_ONLY"); + SDL_LOG_DEBUG("InteractionMode: MANUAL_ONLY"); unsubscribe_from_event(hmi_apis::FunctionID::UI_PerformInteraction); DisablePerformInteraction(); CommandRequestImpl::onTimeOut(); break; } default: { - LOG4CXX_ERROR(logger_, "INVALID ENUM"); + SDL_LOG_ERROR("INVALID ENUM"); return; } }; @@ -331,7 +330,7 @@ void PerformInteractionRequest::onTimeOut() { bool PerformInteractionRequest::ProcessVRResponse( const smart_objects::SmartObject& message, smart_objects::SmartObject& msg_params) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace hmi_apis; using namespace mobile_apis; using namespace smart_objects; @@ -340,7 +339,7 @@ bool PerformInteractionRequest::ProcessVRResponse( ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); return false; } @@ -351,14 +350,14 @@ bool PerformInteractionRequest::ProcessVRResponse( vr_result_code_, Common_Result::ABORTED, Common_Result::TIMED_OUT); if (is_vr_aborted_timeout) { - LOG4CXX_DEBUG(logger_, "VR response aborted"); + SDL_LOG_DEBUG("VR response aborted"); if (InteractionMode::VR_ONLY == interaction_mode_) { - LOG4CXX_DEBUG(logger_, "Aborted or Timeout Send Close Popup"); + SDL_LOG_DEBUG("Aborted or Timeout Send Close Popup"); TerminatePerformInteraction(); SendResponse(false, MessageHelper::HMIToMobileResult(vr_result_code_)); return true; } - LOG4CXX_DEBUG(logger_, "Update timeout for UI"); + SDL_LOG_DEBUG("Update timeout for UI"); application_manager_.updateRequestTimeout( connection_key(), correlation_id(), default_timeout_); return false; @@ -373,7 +372,7 @@ bool PerformInteractionRequest::ProcessVRResponse( if (hmi_msg_params.keyExists(strings::choice_id)) { const int choice_id = hmi_msg_params[strings::choice_id].asInt(); if (!CheckChoiceIDFromResponse(app, choice_id)) { - LOG4CXX_ERROR(logger_, "Wrong choiceID was received from HMI"); + SDL_LOG_ERROR("Wrong choiceID was received from HMI"); TerminatePerformInteraction(); SendResponse( false, Result::GENERIC_ERROR, "Wrong choiceID was received from HMI"); @@ -384,7 +383,7 @@ bool PerformInteractionRequest::ProcessVRResponse( if (mobile_apis::InteractionMode::BOTH == interaction_mode_ || mobile_apis::InteractionMode::MANUAL_ONLY == interaction_mode_) { - LOG4CXX_DEBUG(logger_, "Update timeout for UI"); + SDL_LOG_DEBUG("Update timeout for UI"); application_manager_.updateRequestTimeout( connection_key(), correlation_id(), default_timeout_); } @@ -394,9 +393,8 @@ bool PerformInteractionRequest::ProcessVRResponse( if (is_vr_result_success && InteractionMode::MANUAL_ONLY == interaction_mode_) { - LOG4CXX_DEBUG(logger_, - "VR response is successfull in MANUAL_ONLY mode " - << "Wait for UI response"); + SDL_LOG_DEBUG("VR response is successfull in MANUAL_ONLY mode " + << "Wait for UI response"); // in case MANUAL_ONLY mode VR.PI SUCCESS just return return false; } @@ -407,13 +405,13 @@ bool PerformInteractionRequest::ProcessVRResponse( void PerformInteractionRequest::ProcessUIResponse( const smart_objects::SmartObject& message, smart_objects::SmartObject& msg_params) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace helpers; using namespace smart_objects; ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); return; } @@ -476,7 +474,7 @@ void PerformInteractionRequest::ProcessUIResponse( void PerformInteractionRequest::SendUIPerformInteractionRequest( application_manager::ApplicationSharedPtr const app) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); smart_objects::SmartObject& choice_set_id_list = (*message_)[strings::msg_params][strings::interaction_choice_set_id_list]; @@ -562,7 +560,7 @@ void PerformInteractionRequest::SendUIPerformInteractionRequest( void PerformInteractionRequest::SendVRPerformInteractionRequest( application_manager::ApplicationSharedPtr const app) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); smart_objects::SmartObject msg_params = smart_objects::SmartObject(smart_objects::SmartType_Map); @@ -584,7 +582,7 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest( smart_objects::SmartObject* choice_set = app->FindChoiceSet(choice_list[i].asInt()); if (!choice_set) { - LOG4CXX_WARN(logger_, "Couldn't found choiceset"); + SDL_LOG_WARN("Couldn't found choiceset"); continue; } msg_params[strings::grammar_id][grammar_id_index++] = @@ -600,9 +598,8 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest( MessageHelper::VerifyTtsFiles(help_prompt, app, application_manager_); if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) { - LOG4CXX_WARN( - logger_, - "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; @@ -635,7 +632,7 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest( } } } else { - LOG4CXX_ERROR(logger_, "Can't found choiceSet!"); + SDL_LOG_ERROR("Can't found choiceSet!"); } } } @@ -648,9 +645,8 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest( timeout_prompt, app, application_manager_); if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) { - LOG4CXX_WARN( - logger_, - "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; @@ -669,9 +665,8 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest( initial_prompt, app, application_manager_); if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) { - LOG4CXX_WARN( - logger_, - "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; @@ -703,7 +698,7 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest( bool PerformInteractionRequest::CheckChoiceSetMenuNames( application_manager::ApplicationSharedPtr const app) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); smart_objects::SmartObject& choice_list = (*message_)[strings::msg_params][strings::interaction_choice_set_id_list]; @@ -723,7 +718,7 @@ bool PerformInteractionRequest::CheckChoiceSetMenuNames( } if (!i_choice_set || !j_choice_set) { - LOG4CXX_ERROR(logger_, "Invalid ID"); + SDL_LOG_ERROR("Invalid ID"); SendResponse(false, mobile_apis::Result::INVALID_ID); return false; } @@ -740,7 +735,7 @@ bool PerformInteractionRequest::CheckChoiceSetMenuNames( .asString(); if (ii_menu_name == jj_menu_name) { - LOG4CXX_ERROR(logger_, "Choice set has duplicated menu name"); + SDL_LOG_ERROR("Choice set has duplicated menu name"); SendResponse(false, mobile_apis::Result::DUPLICATE_NAME, "Choice set has duplicated menu name"); @@ -756,7 +751,7 @@ bool PerformInteractionRequest::CheckChoiceSetMenuNames( bool PerformInteractionRequest::CheckChoiceSetVRSynonyms( application_manager::ApplicationSharedPtr const app) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); smart_objects::SmartObject& choice_list = (*message_)[strings::msg_params][strings::interaction_choice_set_id_list]; @@ -776,7 +771,7 @@ bool PerformInteractionRequest::CheckChoiceSetVRSynonyms( } if ((!i_choice_set) || (!j_choice_set)) { - LOG4CXX_ERROR(logger_, "Invalid ID"); + SDL_LOG_ERROR("Invalid ID"); SendResponse(false, mobile_apis::Result::INVALID_ID); return false; } @@ -789,9 +784,9 @@ bool PerformInteractionRequest::CheckChoiceSetVRSynonyms( strings::vr_commands) && (*j_choice_set)[strings::choice_set][jj].keyExists( strings::vr_commands))) { - LOG4CXX_DEBUG(logger_, - "One or both sets has missing vr commands, skipping " - "synonym check"); + SDL_LOG_DEBUG( + "One or both sets has missing vr commands, skipping " + "synonym check"); return true; } // choice_set pointer contains SmartObject msg_params @@ -808,7 +803,7 @@ bool PerformInteractionRequest::CheckChoiceSetVRSynonyms( const custom_str::CustomString& vr_cmd_j = jj_vr_commands[jjj].asCustomString(); if (vr_cmd_i.CompareIgnoreCase(vr_cmd_j)) { - LOG4CXX_ERROR(logger_, "Choice set has duplicated VR synonym"); + SDL_LOG_ERROR("Choice set has duplicated VR synonym"); SendResponse(false, mobile_apis::Result::DUPLICATE_NAME, "Choice set has duplicated VR synonym"); @@ -825,10 +820,10 @@ bool PerformInteractionRequest::CheckChoiceSetVRSynonyms( bool PerformInteractionRequest::CheckVrHelpItemPositions( application_manager::ApplicationSharedPtr const app) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if (!(*message_)[strings::msg_params].keyExists(strings::vr_help)) { - LOG4CXX_DEBUG(logger_, strings::vr_help << " is omitted."); + SDL_LOG_DEBUG(strings::vr_help << " is omitted."); return true; } @@ -838,7 +833,7 @@ bool PerformInteractionRequest::CheckVrHelpItemPositions( int32_t position = 1; for (size_t i = 0; i < vr_help.length(); ++i) { if (position != vr_help[i][strings::position].asInt()) { - LOG4CXX_ERROR(logger_, "Non-sequential vrHelp item position"); + SDL_LOG_ERROR("Non-sequential vrHelp item position"); SendResponse(false, mobile_apis::Result::REJECTED, "Non-sequential vrHelp item position"); @@ -850,11 +845,11 @@ bool PerformInteractionRequest::CheckVrHelpItemPositions( } void PerformInteractionRequest::DisablePerformInteraction() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); return; } @@ -870,12 +865,12 @@ void PerformInteractionRequest::DisablePerformInteraction() { } bool PerformInteractionRequest::IsWhiteSpaceExist() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const char* str = NULL; str = (*message_)[strings::msg_params][strings::initial_text].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid initial_text syntax check failed"); + SDL_LOG_ERROR("Invalid initial_text syntax check failed"); return true; } @@ -889,7 +884,7 @@ bool PerformInteractionRequest::IsWhiteSpaceExist() { for (; it_ip != it_ip_end; ++it_ip) { str = (*it_ip)[strings::text].asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid initial_prompt syntax check failed"); + SDL_LOG_ERROR("Invalid initial_prompt syntax check failed"); return true; } } @@ -905,7 +900,7 @@ bool PerformInteractionRequest::IsWhiteSpaceExist() { for (; it_hp != it_hp_end; ++it_hp) { str = (*it_hp)[strings::text].asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid help_prompt syntax check failed"); + SDL_LOG_ERROR("Invalid help_prompt syntax check failed"); return true; } } @@ -921,7 +916,7 @@ bool PerformInteractionRequest::IsWhiteSpaceExist() { for (; it_tp != it_tp_end; ++it_tp) { str = (*it_tp)[strings::text].asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid timeout_prompt syntax check failed"); + SDL_LOG_ERROR("Invalid timeout_prompt syntax check failed"); return true; } } @@ -937,15 +932,14 @@ bool PerformInteractionRequest::IsWhiteSpaceExist() { for (; it_vh != it_vh_end; ++it_vh) { str = (*it_vh)[strings::text].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid vr_help syntax check failed"); + SDL_LOG_ERROR("Invalid vr_help syntax check failed"); return true; } if ((*it_vh).keyExists(strings::image)) { str = (*it_vh)[strings::image][strings::value].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, - "Invalid vr_help image value syntax check failed"); + SDL_LOG_ERROR("Invalid vr_help image value syntax check failed"); return true; } } @@ -955,7 +949,7 @@ bool PerformInteractionRequest::IsWhiteSpaceExist() { } void PerformInteractionRequest::TerminatePerformInteraction() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendClosePopupRequestToHMI(); DisablePerformInteraction(); @@ -970,7 +964,7 @@ void PerformInteractionRequest::SendClosePopupRequestToHMI() { bool PerformInteractionRequest::CheckChoiceIDFromResponse( ApplicationSharedPtr app, const int32_t choice_id) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const DataAccessor<PerformChoiceSetMap> accessor = app->performinteraction_choice_set_map(); const PerformChoiceSetMap& choice_set_map = accessor.GetData(); @@ -998,7 +992,7 @@ bool PerformInteractionRequest::CheckChoiceIDFromResponse( bool PerformInteractionRequest::CheckChoiceSetListVRCommands( ApplicationSharedPtr app) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& choice_set_id_list = (*message_)[strings::msg_params][strings::interaction_choice_set_id_list]; @@ -1010,8 +1004,7 @@ bool PerformInteractionRequest::CheckChoiceSetListVRCommands( // this should never ever happen since this was already checked if (choice_set == nullptr) { - LOG4CXX_ERROR( - logger_, + SDL_LOG_ERROR( "Couldn't find choiceset_id = " << choice_set_id_list[i].asInt()); SendResponse(false, mobile_apis::Result::INVALID_ID); return false; @@ -1023,9 +1016,9 @@ bool PerformInteractionRequest::CheckChoiceSetListVRCommands( // if not all choices have vr commands if (vr_status != MessageHelper::ChoiceSetVRCommandsStatus::ALL) { - LOG4CXX_ERROR(logger_, - "PerformInteraction has choice sets with " - "missing vrCommands, not in MANUAL_ONLY mode"); + SDL_LOG_ERROR( + "PerformInteraction has choice sets with " + "missing vrCommands, not in MANUAL_ONLY mode"); SendResponse(false, mobile_apis::Result::INVALID_DATA, "Some choices don't contain VR commands."); @@ -1039,7 +1032,7 @@ bool PerformInteractionRequest::CheckChoiceIDFromRequest( ApplicationSharedPtr app, const size_t choice_set_id_list_length, const smart_objects::SmartObject& choice_set_id_list) const { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); size_t choice_list_length = 0; std::set<uint32_t> choice_id_set; @@ -1049,8 +1042,7 @@ bool PerformInteractionRequest::CheckChoiceIDFromRequest( for (size_t i = 0; i < choice_set_id_list_length; ++i) { choice_set = app->FindChoiceSet(choice_set_id_list[i].asInt()); if (!choice_set) { - LOG4CXX_ERROR( - logger_, + SDL_LOG_ERROR( "Couldn't find choiceset_id = " << choice_set_id_list[i].asInt()); return false; } @@ -1062,10 +1054,9 @@ bool PerformInteractionRequest::CheckChoiceIDFromRequest( ins_res = choice_id_set.insert(choices_list[k][strings::choice_id].asInt()); if (!ins_res.second) { - LOG4CXX_ERROR(logger_, - "choice with ID " - << choices_list[k][strings::choice_id].asInt() - << " already exists"); + SDL_LOG_ERROR("choice with ID " + << choices_list[k][strings::choice_id].asInt() + << " already exists"); return false; } } @@ -1074,13 +1065,13 @@ bool PerformInteractionRequest::CheckChoiceIDFromRequest( } const bool PerformInteractionRequest::HasHMIResponsesToWait() const { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); return !ui_response_received_ || !vr_response_received_; } void PerformInteractionRequest::SendBothModeResponse( const smart_objects::SmartObject& msg_param) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); mobile_apis::Result::eType perform_interaction_result_code = mobile_apis::Result::INVALID_ENUM; app_mngr::commands::ResponseInfo ui_perform_info( @@ -1108,8 +1099,8 @@ mobile_apis::Result::eType PerformInteractionRequest::PrepareResultCodeForResponse( const app_mngr::commands::ResponseInfo& ui_response, const app_mngr::commands::ResponseInfo& vr_response) { - LOG4CXX_DEBUG( - logger_, "InteractionMode = " << static_cast<int32_t>(interaction_mode_)); + SDL_LOG_DEBUG( + "InteractionMode = " << static_cast<int32_t>(interaction_mode_)); auto mobile_vr_result_code = MessageHelper::HMIToMobileResult(vr_result_code_); @@ -1159,7 +1150,7 @@ bool PerformInteractionRequest::PrepareResultForMobileResponse( bool PerformInteractionRequest::SetChoiceIdToResponseMsgParams( ns_smart_device_link::ns_smart_objects::SmartObject& msg_param) const { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const bool ui_choice_id_valid = INVALID_CHOICE_ID != ui_choice_id_received_; const bool vr_choice_id_valid = INVALID_CHOICE_ID != vr_choice_id_received_; diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_response.cc index fa02641c2b..c72d851b0e 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + PerformInteractionResponse::PerformInteractionResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ PerformInteractionResponse::PerformInteractionResponse( PerformInteractionResponse::~PerformInteractionResponse() {} void PerformInteractionResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc index e25215fb48..50ff392e33 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc @@ -61,6 +61,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + PutFileRequest::PutFileRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -81,7 +83,7 @@ PutFileRequest::PutFileRequest( PutFileRequest::~PutFileRequest() {} void PutFileRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr application = application_manager_.application(connection_key()); @@ -89,7 +91,7 @@ void PutFileRequest::Run() { smart_objects::SmartObject(smart_objects::SmartType_Map); if (!application) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -101,8 +103,7 @@ void PutFileRequest::Run() { application->put_file_in_none_count()) { // If application is in the HMI_NONE level the quantity of allowed // PutFile request is limited by the configuration profile - LOG4CXX_ERROR(logger_, - "Too many requests from the app with HMILevel HMI_NONE "); + SDL_LOG_ERROR("Too many requests from the app with HMILevel HMI_NONE "); SendResponse(false, mobile_apis::Result::REJECTED, "Too many requests from the app with HMILevel HMI_NONE", @@ -111,7 +112,7 @@ void PutFileRequest::Run() { } if (!(*message_)[strings::params].keyExists(strings::binary_data)) { - LOG4CXX_ERROR(logger_, "Binary data empty"); + SDL_LOG_ERROR("Binary data empty"); SendResponse(false, mobile_apis::Result::INVALID_DATA, "Binary data empty", @@ -120,7 +121,7 @@ void PutFileRequest::Run() { } if (!(*message_)[strings::msg_params].keyExists(strings::sync_file_name)) { - LOG4CXX_ERROR(logger_, "No file name"); + SDL_LOG_ERROR("No file name"); SendResponse(false, mobile_apis::Result::INVALID_DATA, "No file name", @@ -129,7 +130,7 @@ void PutFileRequest::Run() { } if (!(*message_)[strings::msg_params].keyExists(strings::file_type)) { - LOG4CXX_ERROR(logger_, "No file type"); + SDL_LOG_ERROR("No file type"); SendResponse(false, mobile_apis::Result::INVALID_DATA, "No file type", @@ -141,7 +142,7 @@ void PutFileRequest::Run() { if (!file_system::IsFileNameValid(sync_file_name_)) { const std::string err_msg = "Sync file name contains forbidden symbols."; - LOG4CXX_ERROR(logger_, err_msg); + SDL_LOG_ERROR(err_msg); SendResponse(false, mobile_apis::Result::INVALID_DATA, err_msg.c_str(), @@ -196,7 +197,7 @@ void PutFileRequest::Run() { response_params[strings::space_available] = static_cast<uint32_t>(space_available); - LOG4CXX_ERROR(logger_, "Out of memory"); + SDL_LOG_ERROR("Out of memory"); SendResponse(false, mobile_apis::Result::OUT_OF_MEMORY, "Out of memory", @@ -206,7 +207,7 @@ void PutFileRequest::Run() { } if (!file_system::CreateDirectoryRecursively(file_path)) { - LOG4CXX_ERROR(logger_, "Can't create folder"); + SDL_LOG_ERROR("Can't create folder"); SendResponse(false, mobile_apis::Result::GENERIC_ERROR, "Can't create folder.", @@ -216,12 +217,12 @@ void PutFileRequest::Run() { const std::string full_path = file_path + "/" + sync_file_name_; if ((*message_)[strings::msg_params].keyExists(strings::crc32_check_sum)) { - LOG4CXX_TRACE(logger_, "Binary Data Size: " << binary_data.size()); + SDL_LOG_TRACE("Binary Data Size: " << binary_data.size()); const uint32_t crc_received = (*message_)[strings::msg_params][strings::crc32_check_sum].asUInt(); - LOG4CXX_TRACE(logger_, "CRC32 SUM Received: " << crc_received); + SDL_LOG_TRACE("CRC32 SUM Received: " << crc_received); const uint32_t crc_calculated = GetCrc32CheckSum(binary_data); - LOG4CXX_TRACE(logger_, "CRC32 SUM Calculated: " << crc_calculated); + SDL_LOG_TRACE("CRC32 SUM Calculated: " << crc_calculated); if (crc_calculated != crc_received) { SendResponse(false, mobile_apis::Result::CORRUPTED_DATA, @@ -232,16 +233,14 @@ void PutFileRequest::Run() { } } - LOG4CXX_DEBUG(logger_, - "Writing " << binary_data.size() << " bytes to " << full_path + SDL_LOG_DEBUG("Writing " << binary_data.size() << " bytes to " << full_path << " (current size is" << file_system::FileSize(full_path) << ")"); mobile_apis::Result::eType save_result = application_manager_.SaveBinary( binary_data, file_path, sync_file_name_, offset_); - LOG4CXX_DEBUG(logger_, - "New size of " << full_path << " is " + SDL_LOG_DEBUG("New size of " << full_path << " is " << file_system::FileSize(full_path) << " bytes"); if (!is_system_file) { response_params[strings::space_available] = @@ -251,7 +250,7 @@ void PutFileRequest::Run() { sync_file_name_ = file_path + "/" + sync_file_name_; switch (save_result) { case mobile_apis::Result::SUCCESS: { - LOG4CXX_INFO(logger_, "PutFile is successful"); + SDL_LOG_INFO("PutFile is successful"); if (!is_system_file) { AppFile file(sync_file_name_, is_persistent_file_, @@ -259,15 +258,14 @@ void PutFileRequest::Run() { file_type_); if (0 == offset_) { - LOG4CXX_INFO(logger_, "New file downloading"); + SDL_LOG_INFO("New file downloading"); if (!application->AddFile(file)) { - LOG4CXX_INFO(logger_, - "Couldn't add file to application (File already Exist" - << " in application and was rewritten on FS)"); + SDL_LOG_INFO("Couldn't add file to application (File already Exist" + << " in application and was rewritten on FS)"); /* It can be first part of new big file, so we need to update information about it's downloading status and persistence */ if (!application->UpdateFile(file)) { - LOG4CXX_ERROR(logger_, "Couldn't update file"); + SDL_LOG_ERROR("Couldn't update file"); /* If it is impossible to update file, application doesn't know about existing this file */ SendResponse(false, @@ -290,15 +288,14 @@ void PutFileRequest::Run() { break; } default: - LOG4CXX_WARN(logger_, - "PutFile is unsuccessful. Result = " << save_result); + SDL_LOG_WARN("PutFile is unsuccessful. Result = " << save_result); SendResponse(false, save_result, "Can't save file", &response_params); break; } } void PutFileRequest::SendOnPutFileNotification(bool is_system_file) { - LOG4CXX_INFO(logger_, "SendOnPutFileNotification"); + SDL_LOG_INFO("SendOnPutFileNotification"); smart_objects::SmartObjectSPtr notification = std::make_shared<smart_objects::SmartObject>( smart_objects::SmartType_Map); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_response.cc index f9ddbf7717..493efbd11c 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_response.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + PutFileResponse::PutFileResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,12 +57,12 @@ PutFileResponse::PutFileResponse( PutFileResponse::~PutFileResponse() {} void PutFileResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); uint32_t app_id = (*message_)[strings::params][strings::connection_key].asUInt(); ApplicationSharedPtr app = application_manager_.application(app_id); if (!app) { - LOG4CXX_ERROR(logger_, "Application not registered"); + SDL_LOG_ERROR("Application not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc index bd36f060ed..2b7ceefa66 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc @@ -178,6 +178,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + RegisterAppInterfaceRequest::RegisterAppInterfaceRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -195,14 +197,14 @@ RegisterAppInterfaceRequest::RegisterAppInterfaceRequest( RegisterAppInterfaceRequest::~RegisterAppInterfaceRequest() {} bool RegisterAppInterfaceRequest::Init() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); return true; } void RegisterAppInterfaceRequest::Run() { using namespace helpers; - LOG4CXX_AUTO_TRACE(logger_); - LOG4CXX_DEBUG(logger_, "Connection key is " << connection_key()); + SDL_LOG_AUTO_TRACE(); + SDL_LOG_DEBUG("Connection key is " << connection_key()); // Fix problem with SDL and HMI HTML. This problem is not actual for HMI PASA. // Flag conditional compilation specific to customer is used in order to @@ -213,12 +215,10 @@ void RegisterAppInterfaceRequest::Run() { // wait till HMI started while (!application_manager_.IsStopping() && !application_manager_.IsHMICooperating()) { - LOG4CXX_DEBUG(logger_, - "Waiting for the HMI... conn_key=" - << connection_key() - << ", correlation_id=" << correlation_id() - << ", default_timeout=" << default_timeout() - << ", thread=" << pthread_self()); + SDL_LOG_DEBUG("Waiting for the HMI... conn_key=" + << connection_key() << ", correlation_id=" << correlation_id() + << ", default_timeout=" << default_timeout() + << ", thread=" << pthread_self()); application_manager_.updateRequestTimeout( connection_key(), correlation_id(), default_timeout()); sleep(1); @@ -226,7 +226,7 @@ void RegisterAppInterfaceRequest::Run() { } if (application_manager_.IsStopping()) { - LOG4CXX_WARN(logger_, "The ApplicationManager is stopping!"); + SDL_LOG_WARN("The ApplicationManager is stopping!"); return; } @@ -247,9 +247,8 @@ void RegisterAppInterfaceRequest::Run() { return; } - LOG4CXX_DEBUG( - logger_, - "device_handle: " << device_handle_ << " device_id: " << device_id_); + SDL_LOG_DEBUG("device_handle: " << device_handle_ + << " device_id: " << device_id_); if (IsApplicationSwitched()) { return; @@ -304,8 +303,7 @@ void RegisterAppInterfaceRequest::Run() { std::vector<ApplicationSharedPtr> duplicate_apps; if (GetDuplicateNames(duplicate_apps)) { - LOG4CXX_ERROR(logger_, - "Found duplicate app names, checking for hybrid apps."); + SDL_LOG_ERROR("Found duplicate app names, checking for hybrid apps."); // Default preference to BOTH mobile_apis::HybridAppPreference::eType preference = mobile_apis::HybridAppPreference::BOTH; @@ -344,8 +342,7 @@ void RegisterAppInterfaceRequest::Run() { preference == mobile_apis::HybridAppPreference::CLOUD) { // Unregister mobile application and allow cloud application to // register in it's place - LOG4CXX_ERROR( - logger_, + SDL_LOG_ERROR( "Unregistering app because a preferred version is registered."); application_manager_.UnregisterApplication( duplicate_app->app_id(), @@ -371,14 +368,13 @@ void RegisterAppInterfaceRequest::Run() { } if (mobile_apis::Result::SUCCESS != coincidence_result) { - LOG4CXX_ERROR(logger_, "Coincidence check failed."); + SDL_LOG_ERROR("Coincidence check failed."); SendResponse(false, coincidence_result); return; } if (IsWhiteSpaceExist()) { - LOG4CXX_INFO(logger_, - "Incoming register app interface has contains \t\n \\t \\n"); + SDL_LOG_INFO("Incoming register app interface has contains \t\n \\t \\n"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -399,15 +395,14 @@ void RegisterAppInterfaceRequest::Run() { minimum_major_version, minimum_minor_version, minimum_patch_version); if (mobile_version < min_module_version) { - LOG4CXX_WARN(logger_, - "Application RPC Version does not meet minimum requirement"); + SDL_LOG_WARN("Application RPC Version does not meet minimum requirement"); SendResponse(false, mobile_apis::Result::REJECTED); } application = application_manager_.RegisterApplication(message_); if (!application) { - LOG4CXX_ERROR(logger_, "Application hasn't been registered!"); + SDL_LOG_ERROR("Application hasn't been registered!"); return; } @@ -446,9 +441,8 @@ void RegisterAppInterfaceRequest::Run() { tts_name, application, application_manager_); if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) { - LOG4CXX_WARN( - logger_, - "MessageHelper::VerifyTtsFiles return " << verification_result); + SDL_LOG_WARN("MessageHelper::VerifyTtsFiles return " + << verification_result); response_info_ = "One or more files needed for tts_name are not present"; result_code_ = mobile_apis::Result::WARNINGS; } @@ -517,9 +511,8 @@ void RegisterAppInterfaceRequest::Run() { NULL, &dev_params.device_mac_address, &dev_params.device_connection_type)) { - LOG4CXX_ERROR( - logger_, - "Failed to extract information for device " << application->device()); + SDL_LOG_ERROR("Failed to extract information for device " + << application->device()); } policy::DeviceInfo device_info; device_info.AdoptDeviceType(dev_params.device_connection_type); @@ -690,7 +683,7 @@ void FillUIRelatedFields(smart_objects::SmartObject& response_params, void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile( ApplicationType app_type) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); smart_objects::SmartObject response_params(smart_objects::SmartType_Map); mobile_apis::Result::eType result_code = mobile_apis::Result::SUCCESS; @@ -703,9 +696,8 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile( resumption::ResumeCtrl& resumer = application_manager_.resume_controller(); if (!application) { - LOG4CXX_ERROR(logger_, - "There is no application for such connection key" << key); - LOG4CXX_DEBUG(logger_, "Need to start resume data persistent timer"); + SDL_LOG_ERROR("There is no application for such connection key " << key); + SDL_LOG_DEBUG("Need to start resume data persistent timer"); resumer.OnAppRegistrationEnd(); return; } @@ -726,19 +718,17 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile( hmi_capabilities.active_vr_language() || msg_params[strings::hmi_display_language_desired].asInt() != hmi_capabilities.active_ui_language()) { - LOG4CXX_WARN(logger_, - "Wrong language on registering application " - << application->name().c_str()); - - LOG4CXX_ERROR( - logger_, - "VR language desired code is " - << msg_params[strings::language_desired].asInt() - << " , active VR language code is " - << hmi_capabilities.active_vr_language() << ", UI language code is " - << msg_params[strings::hmi_display_language_desired].asInt() - << " , active UI language code is " - << hmi_capabilities.active_ui_language()); + SDL_LOG_WARN("Wrong language on registering application " + << application->name().c_str()); + + SDL_LOG_ERROR("VR language desired code is " + << msg_params[strings::language_desired].asInt() + << " , active VR language code is " + << hmi_capabilities.active_vr_language() + << ", UI language code is " + << msg_params[strings::hmi_display_language_desired].asInt() + << " , active UI language code is " + << hmi_capabilities.active_ui_language()); result_code = mobile_apis::Result::WRONG_LANGUAGE; } @@ -821,9 +811,9 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile( } if (ApplicationType::kSwitchedApplicationWrongHashId == app_type) { - LOG4CXX_DEBUG(logger_, - "Application has been switched from another transport, " - "but doesn't have correct hashID."); + SDL_LOG_DEBUG( + "Application has been switched from another transport, " + "but doesn't have correct hashID."); application_manager::DeleteApplicationData(application, application_manager_); @@ -834,9 +824,9 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile( } if (ApplicationType::kSwitchedApplicationHashOk == app_type) { - LOG4CXX_DEBUG(logger_, - "Application has been switched from another transport " - "and has correct hashID."); + SDL_LOG_DEBUG( + "Application has been switched from another transport " + "and has correct hashID."); SendResponse(true, mobile_apis::Result::SUCCESS, NULL, &response_params); return; } @@ -852,13 +842,12 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile( std::string add_info; if (resumption) { if (!resumer.CheckApplicationHash(application, hash_id)) { - LOG4CXX_WARN(logger_, - "Hash from RAI does not match to saved resume data."); + SDL_LOG_WARN("Hash from RAI does not match to saved resume data."); result_code = mobile_apis::Result::RESUME_FAILED; add_info = "Hash from RAI does not match to saved resume data."; need_restore_vr = false; } else if (!resumer.CheckPersistenceFilesForResumption(application)) { - LOG4CXX_WARN(logger_, "Persistent data is missing."); + SDL_LOG_WARN("Persistent data is missing."); result_code = mobile_apis::Result::RESUME_FAILED; add_info = "Persistent data is missing."; need_restore_vr = false; @@ -962,7 +951,7 @@ void RegisterAppInterfaceRequest::SendChangeRegistration( msg_params[strings::app_id] = app_id; SendHMIRequest(function_id, &msg_params); } else { - LOG4CXX_DEBUG(logger_, "Interface " << interface << "is not avaliable"); + SDL_LOG_DEBUG("Interface " << interface << " is not available"); } } @@ -982,7 +971,7 @@ void RegisterAppInterfaceRequest::SendOnAppRegisteredNotificationToHMI( using namespace smart_objects; SmartObjectSPtr notification = std::make_shared<SmartObject>(SmartType_Map); if (!notification) { - LOG4CXX_ERROR(logger_, "Failed to create smart object"); + SDL_LOG_ERROR("Failed to create smart object"); return; } @@ -1032,7 +1021,7 @@ void RegisterAppInterfaceRequest::SendOnAppRegisteredNotificationToHMI( } mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckCoincidence() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params]; @@ -1054,7 +1043,7 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckCoincidence() { // Name check const auto& cur_name = app->name(); if (app_name.CompareIgnoreCase(cur_name)) { - LOG4CXX_ERROR(logger_, "Application name is known already."); + SDL_LOG_ERROR("Application name is known already."); return mobile_apis::Result::DUPLICATE_NAME; } const auto vr = app->vr_synonyms(); @@ -1063,7 +1052,7 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckCoincidence() { CoincidencePredicateVR v(app_name); if (0 != std::count_if(curr_vr->begin(), curr_vr->end(), v)) { - LOG4CXX_ERROR(logger_, "Application name is known already."); + SDL_LOG_ERROR("Application name is known already."); return mobile_apis::Result::DUPLICATE_NAME; } } @@ -1074,7 +1063,7 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckCoincidence() { CoincidencePredicateVR v(cur_name); if (0 != std::count_if(new_vr->begin(), new_vr->end(), v)) { - LOG4CXX_ERROR(logger_, "vr_synonyms duplicated with app_name ."); + SDL_LOG_ERROR("vr_synonyms duplicated with app_name ."); return mobile_apis::Result::DUPLICATE_NAME; } } // End vr check @@ -1089,11 +1078,9 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckCoincidence() { tts_curr->end(), compare_tts_name); if (it_tts != tts_array->end()) { - LOG4CXX_ERROR( - logger_, - "TTS name: " - << (*it_tts)[strings::text].asCustomString().AsMBString() - << " is known already"); + SDL_LOG_ERROR("TTS name: " + << (*it_tts)[strings::text].asCustomString().AsMBString() + << " is known already"); return mobile_apis::Result::DUPLICATE_NAME; } } // End tts check @@ -1105,7 +1092,7 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckCoincidence() { bool RegisterAppInterfaceRequest::GetDuplicateNames( std::vector<ApplicationSharedPtr>& out_duplicate_apps) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params]; @@ -1139,7 +1126,7 @@ bool RegisterAppInterfaceRequest::GetDuplicateNames( } mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckWithPolicyData() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // TODO(AOleynik): Check is necessary to allow register application in case // of disabled policy // Remove this check, when HMI will support policy @@ -1157,7 +1144,7 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckWithPolicyData() { mobile_app_id, &app_nicknames, &app_hmi_types_in_policy); if (!init_result) { - LOG4CXX_ERROR(logger_, "Error during initial application data check."); + SDL_LOG_ERROR("Error during initial application data check."); return mobile_apis::Result::INVALID_DATA; } @@ -1167,8 +1154,7 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckWithPolicyData() { policy::StringArray::const_iterator it = std::find_if(app_nicknames.begin(), app_nicknames.end(), compare); if (app_nicknames.end() == it) { - LOG4CXX_WARN(logger_, - "Application name was not found in nicknames list."); + SDL_LOG_WARN("Application name was not found in nicknames list."); // App should be unregistered, if its name is not present in nicknames // list usage_statistics::AppCounter count_of_rejections_nickname_mismatch( @@ -1191,7 +1177,7 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckWithPolicyData() { response_info_ = "WEB_VIEW AppHmiType is absent in application policies, because they " "are empty"; - LOG4CXX_DEBUG(logger_, response_info_); + SDL_LOG_DEBUG(response_info_); return result; } } @@ -1238,7 +1224,7 @@ void RegisterAppInterfaceRequest::FillDeviceInfo( } bool RegisterAppInterfaceRequest::IsApplicationWithSameAppIdRegistered() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const custom_string::CustomString mobile_app_id( application_manager_.GetCorrectMobileIDFromMessage(message_)); @@ -1248,12 +1234,11 @@ bool RegisterAppInterfaceRequest::IsApplicationWithSameAppIdRegistered() { for (const auto& app : applications) { if (mobile_app_id.CompareIgnoreCase(app->policy_app_id().c_str())) { if (app->device() != device_handle_) { - LOG4CXX_DEBUG(logger_, - "These policy_app_id equal, but applications have " - "different device id" - << " mobile_app_id: " << mobile_app_id.c_str() - << " device_handle: " << device_handle_ - << " device_handle: " << app->device()); + SDL_LOG_DEBUG( + "These policy_app_id equal, but applications have " + "different device id" + << " mobile_app_id: " << mobile_app_id.c_str() << " device_handle: " + << device_handle_ << " device_handle: " << app->device()); continue; } return true; @@ -1264,12 +1249,12 @@ bool RegisterAppInterfaceRequest::IsApplicationWithSameAppIdRegistered() { } bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const char* str = NULL; str = (*message_)[strings::msg_params][strings::app_name].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid app_name syntax check failed"); + SDL_LOG_ERROR("Invalid app_name syntax check failed"); return true; } @@ -1283,7 +1268,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() { for (; it_tn != it_tn_end; ++it_tn) { str = (*it_tn)[strings::text].asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid tts_name syntax check failed"); + SDL_LOG_ERROR("Invalid tts_name syntax check failed"); return true; } } @@ -1294,8 +1279,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() { str = (*message_)[strings::msg_params][strings::ngn_media_screen_app_name] .asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, - "Invalid ngn_media_screen_app_name syntax check failed"); + SDL_LOG_ERROR("Invalid ngn_media_screen_app_name syntax check failed"); return true; } } @@ -1310,7 +1294,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() { for (; it_vs != it_vs_end; ++it_vs) { str = (*it_vs).asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid vr_synonyms syntax check failed"); + SDL_LOG_ERROR("Invalid vr_synonyms syntax check failed"); return true; } } @@ -1319,7 +1303,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() { if ((*message_)[strings::msg_params].keyExists(strings::hash_id)) { str = (*message_)[strings::msg_params][strings::hash_id].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid hash_id syntax check failed"); + SDL_LOG_ERROR("Invalid hash_id syntax check failed"); return true; } } @@ -1331,8 +1315,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() { [strings::hardware] .asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, - "Invalid device_info hardware syntax check failed"); + SDL_LOG_ERROR("Invalid device_info hardware syntax check failed"); return true; } } @@ -1343,8 +1326,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() { [strings::firmware_rev] .asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, - "Invalid device_info firmware_rev syntax check failed"); + SDL_LOG_ERROR("Invalid device_info firmware_rev syntax check failed"); return true; } } @@ -1354,7 +1336,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() { str = (*message_)[strings::msg_params][strings::device_info][strings::os] .asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid device_info os syntax check failed"); + SDL_LOG_ERROR("Invalid device_info os syntax check failed"); return true; } } @@ -1365,8 +1347,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() { [strings::os_version] .asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, - "Invalid device_info os_version syntax check failed"); + SDL_LOG_ERROR("Invalid device_info os_version syntax check failed"); return true; } } @@ -1377,8 +1358,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() { [strings::carrier] .asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, - "Invalid device_info carrier syntax check failed"); + SDL_LOG_ERROR("Invalid device_info carrier syntax check failed"); return true; } } @@ -1387,7 +1367,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() { if ((*message_)[strings::msg_params].keyExists(strings::app_id)) { str = (*message_)[strings::msg_params][strings::app_id].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid app_id syntax check failed"); + SDL_LOG_ERROR("Invalid app_id syntax check failed"); return true; } } @@ -1397,7 +1377,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() { str = (*message_)[strings::msg_params][strings::full_app_id].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid app_id syntax check failed"); + SDL_LOG_ERROR("Invalid app_id syntax check failed"); return true; } } @@ -1413,8 +1393,7 @@ void RegisterAppInterfaceRequest::CheckResponseVehicleTypeParam( using namespace hmi_response; if (!vehicle_type.keyExists(param) || vehicle_type[param].empty()) { if (!backup_value.empty()) { - LOG4CXX_DEBUG(logger_, - param << " is missing." + SDL_LOG_DEBUG(param << " is missing." "Will be replaced with policy table value."); vehicle_type[param] = backup_value; } else { @@ -1437,30 +1416,27 @@ bool RegisterAppInterfaceRequest::IsApplicationSwitched() { const std::string& policy_app_id = application_manager_.GetCorrectMobileIDFromMessage(message_); - LOG4CXX_DEBUG(logger_, "Looking for application id " << policy_app_id); + SDL_LOG_DEBUG("Looking for application id " << policy_app_id); auto app = application_manager_.reregister_application_by_policy_id(policy_app_id); if (!app) { - LOG4CXX_DEBUG( - logger_, - "Application with policy id " << policy_app_id << " is not found."); + SDL_LOG_DEBUG("Application with policy id " << policy_app_id + << " is not found."); return false; } - LOG4CXX_DEBUG(logger_, - "Application with policy id " << policy_app_id << " is found."); + SDL_LOG_DEBUG("Application with policy id " << policy_app_id << " is found."); const auto app_device_handle = app->device(); if (app_device_handle == device_handle_) { - LOG4CXX_DEBUG(logger_, - "Application " << policy_app_id + SDL_LOG_DEBUG("Application " << policy_app_id << " is already registered from this device."); SendResponse(false, mobile_apis::Result::APPLICATION_REGISTERED_ALREADY); return true; } - LOG4CXX_DEBUG(logger_, "Application is found in reconnection list."); + SDL_LOG_DEBUG("Application is found in reconnection list."); auto app_type = ApplicationType::kSwitchedApplicationWrongHashId; if ((*message_)[strings::msg_params].keyExists(strings::hash_id)) { @@ -1490,12 +1466,12 @@ bool RegisterAppInterfaceRequest::GetDataOnSessionKey( const uint32_t key, connection_handler::DeviceHandle* device_id, std::string* mac_address) const { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if ((nullptr == mac_address) && (nullptr == device_id)) { - LOG4CXX_ERROR(logger_, - "Can't get data on session key because device id and mac " - "address are empty."); + SDL_LOG_ERROR( + "Can't get data on session key because device id and mac " + "address are empty."); return false; } @@ -1506,8 +1482,7 @@ bool RegisterAppInterfaceRequest::GetDataOnSessionKey( connection_key(), nullptr, nullptr, &device_handle); if (result) { - LOG4CXX_DEBUG( - logger_, + SDL_LOG_DEBUG( "Failed to get device info for connection key: " << connection_key()); return false; } @@ -1518,9 +1493,8 @@ bool RegisterAppInterfaceRequest::GetDataOnSessionKey( } if (result) { - LOG4CXX_DEBUG(logger_, - "Failed get unique address info for connection key: " - << connection_key()); + SDL_LOG_DEBUG("Failed get unique address info for connection key: " + << connection_key()); return false; } @@ -1582,7 +1556,7 @@ RegisterAppInterfaceRequest::ProcessingAppHMITypesPolicies( if (mobile_apis::Result::DISALLOWED == result) { response_info_ = "WEB_VIEW AppHmiType is absent in application policies"; - LOG4CXX_DEBUG(logger_, response_info_); + SDL_LOG_DEBUG(response_info_); return result; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_response.cc index b5683c62cb..f0e885f54c 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_response.cc @@ -42,8 +42,10 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + void RegisterAppInterfaceResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); mobile_apis::Result::eType result_code = mobile_apis::Result::SUCCESS; bool success = (*message_)[strings::msg_params][strings::success].asBool(); @@ -102,8 +104,7 @@ void RegisterAppInterfaceResponse::Run() { // Add registered application to the policy db right after response sent to // mobile to be able to check all other API according to app permissions if (!app) { - LOG4CXX_ERROR(logger_, - "Application with connection key " << connection_key() + SDL_LOG_ERROR("Application with connection key " << connection_key() << " is not registered."); return; } @@ -113,7 +114,7 @@ void RegisterAppInterfaceResponse::Run() { void RegisterAppInterfaceResponse::SetHeartBeatTimeout( uint32_t connection_key, const std::string& mobile_app_id) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); policy::PolicyHandlerInterface& policy_handler = policy_handler_; if (policy_handler.PolicyEnabled()) { const uint32_t timeout = policy_handler.HeartBeatTimeout(mobile_app_id); @@ -122,7 +123,7 @@ void RegisterAppInterfaceResponse::SetHeartBeatTimeout( connection_key, timeout); } } else { - LOG4CXX_INFO(logger_, "Policy is turn off"); + SDL_LOG_INFO("Policy is turn off"); } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_request.cc index a0e178d0e2..48ca41a0e6 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_request.cc @@ -44,6 +44,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ResetGlobalPropertiesRequest::ResetGlobalPropertiesRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -61,14 +63,14 @@ ResetGlobalPropertiesRequest::ResetGlobalPropertiesRequest( ResetGlobalPropertiesRequest::~ResetGlobalPropertiesRequest() {} void ResetGlobalPropertiesRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); uint32_t app_id = (*message_)[strings::params][strings::connection_key].asUInt(); ApplicationSharedPtr app = application_manager_.application(app_id); if (!app) { - LOG4CXX_ERROR(logger_, "No application associated with session key"); + SDL_LOG_ERROR("No application associated with session key"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -77,7 +79,7 @@ void ResetGlobalPropertiesRequest::Run() { (*message_)[strings::msg_params][strings::properties].length(); // if application waits for sending ttsGlobalProperties need to remove this // application from tts_global_properties_app_list_ - LOG4CXX_INFO(logger_, "RemoveAppFromTTSGlobalPropertiesList"); + SDL_LOG_INFO("RemoveAppFromTTSGlobalPropertiesList"); application_manager_.RemoveAppFromTTSGlobalPropertiesList(app_id); bool helpt_promt = false; @@ -194,7 +196,7 @@ void ResetGlobalPropertiesRequest::Run() { bool ResetGlobalPropertiesRequest::ResetHelpPromt( application_manager::ApplicationSharedPtr app) { if (!app) { - LOG4CXX_ERROR(logger_, "Null pointer"); + SDL_LOG_ERROR("Null pointer"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return false; } @@ -220,7 +222,7 @@ bool ResetGlobalPropertiesRequest::ResetHelpPromt( bool ResetGlobalPropertiesRequest::ResetTimeoutPromt( application_manager::ApplicationSharedPtr const app) { if (!app) { - LOG4CXX_ERROR(logger_, "Null pointer"); + SDL_LOG_ERROR("Null pointer"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return false; } @@ -247,7 +249,7 @@ bool ResetGlobalPropertiesRequest::ResetTimeoutPromt( bool ResetGlobalPropertiesRequest::ResetVrHelpTitleItems( application_manager::ApplicationSharedPtr const app) { if (!app) { - LOG4CXX_ERROR(logger_, "Null pointer"); + SDL_LOG_ERROR("Null pointer"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return false; } @@ -266,12 +268,12 @@ bool ResetGlobalPropertiesRequest::ResetVrHelpTitleItems( } void ResetGlobalPropertiesRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::UI_SetGlobalProperties: { - LOG4CXX_INFO(logger_, "Received UI_SetGlobalProperties event"); + SDL_LOG_INFO("Received UI_SetGlobalProperties event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI); ui_result_ = static_cast<hmi_apis::Common_Result::eType>( message[strings::params][hmi_response::code].asInt()); @@ -279,7 +281,7 @@ void ResetGlobalPropertiesRequest::on_event(const event_engine::Event& event) { break; } case hmi_apis::FunctionID::TTS_SetGlobalProperties: { - LOG4CXX_INFO(logger_, "Received TTS_SetGlobalProperties event"); + SDL_LOG_INFO("Received TTS_SetGlobalProperties event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS); tts_result_ = static_cast<hmi_apis::Common_Result::eType>( message[strings::params][hmi_response::code].asInt()); @@ -287,13 +289,13 @@ void ResetGlobalPropertiesRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } if (IsPendingResponseExist()) { - LOG4CXX_DEBUG(logger_, "Waiting for remaining responses"); + SDL_LOG_DEBUG("Waiting for remaining responses"); return; } @@ -315,7 +317,7 @@ bool ResetGlobalPropertiesRequest::Init() { bool ResetGlobalPropertiesRequest::PrepareResponseParameters( mobile_apis::Result::eType& out_result_code, std::string& out_response_info) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace helpers; bool result = false; diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_response.cc index 07aa23d9c9..ef1ba4f77a 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ResetGlobalPropertiesResponse::ResetGlobalPropertiesResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ ResetGlobalPropertiesResponse::ResetGlobalPropertiesResponse( ResetGlobalPropertiesResponse::~ResetGlobalPropertiesResponse() {} void ResetGlobalPropertiesResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_request.cc index 90dbb91b5f..89e77d9d19 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_request.cc @@ -46,6 +46,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ScrollableMessageRequest::ScrollableMessageRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -73,12 +75,12 @@ bool ScrollableMessageRequest::Init() { } void ScrollableMessageRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -92,7 +94,7 @@ void ScrollableMessageRequest::Run() { application_manager_); if (mobile_apis::Result::SUCCESS != processing_result) { - LOG4CXX_ERROR(logger_, "Wrong soft buttons parameters!"); + SDL_LOG_ERROR("Wrong soft buttons parameters!"); SendResponse(false, processing_result); return; } @@ -125,18 +127,18 @@ void ScrollableMessageRequest::Run() { } void ScrollableMessageRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::UI_OnResetTimeout: { - LOG4CXX_INFO(logger_, "Received UI_OnResetTimeout event"); + SDL_LOG_INFO("Received UI_OnResetTimeout event"); application_manager_.updateRequestTimeout( connection_key(), correlation_id(), default_timeout()); break; } case hmi_apis::FunctionID::UI_ScrollableMessage: { - LOG4CXX_INFO(logger_, "Received UI_ScrollableMessage event"); + SDL_LOG_INFO("Received UI_ScrollableMessage event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI); hmi_apis::Common_Result::eType result_code = @@ -155,7 +157,7 @@ void ScrollableMessageRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); break; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_response.cc index 6236506c00..a6f980b9ba 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_response.cc @@ -41,6 +41,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ScrollableMessageResponse::ScrollableMessageResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ ScrollableMessageResponse::ScrollableMessageResponse( policy_handler) {} void ScrollableMessageResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); mobile_apis::Result::eType result_code = static_cast<mobile_apis::Result::eType>( (*message_)[strings::msg_params][strings::result_code].asInt()); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_request.cc index 6e745fe0db..aa5e1077ca 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_request.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + namespace custom_str = utils::custom_string; SendHapticDataRequest::SendHapticDataRequest( @@ -55,14 +57,14 @@ SendHapticDataRequest::SendHapticDataRequest( SendHapticDataRequest::~SendHapticDataRequest() {} void SendHapticDataRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params]; ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -77,7 +79,7 @@ void SendHapticDataRequest::Run() { } void SendHapticDataRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace helpers; const smart_objects::SmartObject& message = event.smart_object(); @@ -97,7 +99,7 @@ void SendHapticDataRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_response.cc index 79a0516928..57e63dbb7c 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SendHapticDataResponse::SendHapticDataResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ SendHapticDataResponse::SendHapticDataResponse( SendHapticDataResponse::~SendHapticDataResponse() {} void SendHapticDataResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_request.cc index 805c0f0e41..37d43a354b 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_request.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SendLocationRequest::SendLocationRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -57,14 +59,13 @@ SendLocationRequest::~SendLocationRequest() {} void SendLocationRequest::Run() { using namespace hmi_apis; using smart_objects::SmartObject; - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, - "An application with connection key " - << connection_key() << " is not registered."); + SDL_LOG_ERROR("An application with connection key " + << connection_key() << " is not registered."); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -98,7 +99,7 @@ void SendLocationRequest::Run() { } if (IsWhiteSpaceExist()) { - LOG4CXX_ERROR(logger_, "Strings contain invalid characters"); + SDL_LOG_ERROR("Strings contain invalid characters"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -112,7 +113,7 @@ void SendLocationRequest::Run() { } if (!CheckFieldsCompatibility()) { - LOG4CXX_ERROR(logger_, "CheckFieldsCompatibility failed"); + SDL_LOG_ERROR("CheckFieldsCompatibility failed"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -125,7 +126,7 @@ void SendLocationRequest::Run() { app, application_manager_); if (mobile_apis::Result::INVALID_DATA == verification_result) { - LOG4CXX_ERROR(logger_, "VerifyImage INVALID_DATA!"); + SDL_LOG_ERROR("VerifyImage INVALID_DATA!"); SendResponse(false, verification_result); return; } @@ -140,11 +141,11 @@ void SendLocationRequest::Run() { } void SendLocationRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace hmi_apis; const smart_objects::SmartObject& message = event.smart_object(); if (hmi_apis::FunctionID::Navigation_SendLocation == event.id()) { - LOG4CXX_INFO(logger_, "Received Navigation_SendLocation event"); + SDL_LOG_INFO("Received Navigation_SendLocation event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation); const Common_Result::eType result_code = static_cast<Common_Result::eType>( message[strings::params][hmi_response::code].asInt()); @@ -158,7 +159,7 @@ void SendLocationRequest::on_event(const event_engine::Event& event) { &(message[strings::params])); return; } - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); } bool SendLocationRequest::CheckFieldsCompatibility() { @@ -172,14 +173,12 @@ bool SendLocationRequest::CheckFieldsCompatibility() { const bool address_exist = msg_params.keyExists(strings::address); if (latitude_degrees_exist ^ longitude_degrees_exist) { - LOG4CXX_DEBUG(logger_, - "latitude and longitude should be provided only in pair"); + SDL_LOG_DEBUG("latitude and longitude should be provided only in pair"); return false; } if (!address_exist && !longitude_degrees_exist && !latitude_degrees_exist) { - LOG4CXX_DEBUG(logger_, - "address or latitude/longtitude should should be provided"); + SDL_LOG_DEBUG("address or latitude/longtitude should should be provided"); return false; } return true; @@ -194,7 +193,7 @@ void insert_if_contains( } bool SendLocationRequest::IsWhiteSpaceExist() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); std::vector<utils::custom_string::CustomString> fields_to_check; const smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params]; @@ -232,8 +231,7 @@ bool SendLocationRequest::IsWhiteSpaceExist() { for (; it != fields_to_check.end(); ++it) { const std::string& str = it->AsMBString(); if (!CheckSyntax(str, false)) { - LOG4CXX_ERROR(logger_, - "string '" << str << "'' contains invalid characters"); + SDL_LOG_ERROR("string '" << str << "'' contains invalid characters"); return true; } } @@ -250,7 +248,7 @@ bool SendLocationRequest::CheckHMICapabilities( const HMICapabilities& hmi_capabilities = hmi_capabilities_; if (!hmi_capabilities.is_ui_cooperating()) { - LOG4CXX_ERROR(logger_, "UI is not supported."); + SDL_LOG_ERROR("UI is not supported."); return false; } @@ -273,7 +271,7 @@ bool SendLocationRequest::CheckHMICapabilities( } if (!fields_names.empty()) { - LOG4CXX_ERROR(logger_, "Some fields are not supported by capabilities"); + SDL_LOG_ERROR("Some fields are not supported by capabilities"); return false; } return true; diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_response.cc index 934008b816..fcf1a0f406 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_response.cc @@ -41,6 +41,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SendLocationResponse::SendLocationResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,7 +58,7 @@ SendLocationResponse::SendLocationResponse( SendLocationResponse::~SendLocationResponse() {} void SendLocationResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_request.cc index ed77d8a550..9f30478111 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_request.cc @@ -46,6 +46,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SetAppIconRequest::SetAppIconRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -62,9 +64,9 @@ SetAppIconRequest::SetAppIconRequest( application_manager_.get_settings().app_icons_folder(); if (!file_system::DirectoryExists(path)) { - LOG4CXX_WARN(logger_, "App icons folder doesn't exist."); + SDL_LOG_WARN("App icons folder doesn't exist."); if (!file_system::CreateDirectoryRecursively(path)) { - LOG4CXX_ERROR(logger_, "Unable to create app icons directory: " << path); + SDL_LOG_ERROR("Unable to create app icons directory: " << path); } } @@ -75,12 +77,12 @@ SetAppIconRequest::SetAppIconRequest( SetAppIconRequest::~SetAppIconRequest() {} void SetAppIconRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -90,7 +92,7 @@ void SetAppIconRequest::Run() { if (!file_system::IsFileNameValid(sync_file_name)) { const std::string err_msg = "Sync file name contains forbidden symbols."; - LOG4CXX_ERROR(logger_, err_msg); + SDL_LOG_ERROR(err_msg); SendResponse(false, mobile_apis::Result::INVALID_DATA, err_msg.c_str()); return; } @@ -102,7 +104,7 @@ void SetAppIconRequest::Run() { full_file_path += sync_file_name; if (!file_system::FileExists(full_file_path)) { - LOG4CXX_ERROR(logger_, "No such file " << full_file_path); + SDL_LOG_ERROR("No such file " << full_file_path); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -129,19 +131,18 @@ void SetAppIconRequest::Run() { void SetAppIconRequest::CopyToIconStorage( const std::string& policy_app_id, const std::string& path_to_file) const { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if (!(application_manager_.protocol_handler() .get_settings() .max_supported_protocol_version() >= protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_4)) { - LOG4CXX_WARN(logger_, - "Icon copying skipped, since protocol ver. 4 is not enabled."); + SDL_LOG_WARN("Icon copying skipped, since protocol ver. 4 is not enabled."); return; } std::vector<uint8_t> file_content; if (!file_system::ReadBinaryFile(path_to_file, file_content)) { - LOG4CXX_ERROR(logger_, "Can't read icon file: " << path_to_file); + SDL_LOG_ERROR("Can't read icon file: " << path_to_file); return; } @@ -152,13 +153,12 @@ void SetAppIconRequest::CopyToIconStorage( const uint64_t file_size = file_system::FileSize(path_to_file); if (0 == file_size) { - LOG4CXX_ERROR(logger_, "Can't get the icon file size: " << path_to_file); + SDL_LOG_ERROR("Can't get the icon file size: " << path_to_file); return; } if (storage_max_size < file_size) { - LOG4CXX_ERROR(logger_, - "Icon size (" << file_size + SDL_LOG_ERROR("Icon size (" << file_size << ") is bigger, than " " icons storage maximum size (" << storage_max_size @@ -175,9 +175,9 @@ void SetAppIconRequest::CopyToIconStorage( application_manager_.get_settings().app_icons_amount_to_remove(); if (!icons_amount) { - LOG4CXX_DEBUG(logger_, - "No icons will be deleted, since amount icons to remove " - "is zero. Icon saving skipped."); + SDL_LOG_DEBUG( + "No icons will be deleted, since amount icons to remove " + "is zero. Icon saving skipped."); return; } @@ -189,17 +189,16 @@ void SetAppIconRequest::CopyToIconStorage( const std::string icon_path = icon_storage + "/" + policy_app_id; if (!file_system::CreateFile(icon_path)) { - LOG4CXX_ERROR(logger_, "Can't create icon: " << icon_path); + SDL_LOG_ERROR("Can't create icon: " << icon_path); return; } if (!file_system::WriteBinaryFile(icon_path, file_content)) { - LOG4CXX_ERROR(logger_, "Can't write icon: " << icon_path); + SDL_LOG_ERROR("Can't write icon: " << icon_path); return; } - LOG4CXX_DEBUG(logger_, - "Icon was successfully copied from :" << path_to_file << " to " + SDL_LOG_DEBUG("Icon was successfully copied from :" << path_to_file << " to " << icon_path); return; @@ -227,17 +226,16 @@ void SetAppIconRequest::RemoveOldestIcons(const std::string& storage, for (size_t counter = 0; counter < icons_amount; ++counter) { if (!icon_modification_time.size()) { - LOG4CXX_ERROR(logger_, "No more icons left for deletion."); + SDL_LOG_ERROR("No more icons left for deletion."); return; } const std::string file_name = icon_modification_time.begin()->second; const std::string file_path = storage + "/" + file_name; if (!file_system::DeleteFile(file_path)) { - LOG4CXX_DEBUG(logger_, "Error while deleting icon " << file_path); + SDL_LOG_DEBUG("Error while deleting icon " << file_path); } icon_modification_time.erase(icon_modification_time.begin()); - LOG4CXX_DEBUG(logger_, - "Old icon " << file_path << " was deleted successfully."); + SDL_LOG_DEBUG("Old icon " << file_path << " was deleted successfully."); } } @@ -252,7 +250,7 @@ bool SetAppIconRequest::IsEnoughSpaceForIcon(const uint64_t icon_size) const { } void SetAppIconRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { @@ -270,8 +268,7 @@ void SetAppIconRequest::on_event(const event_engine::Event& event) { application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR( - logger_, + SDL_LOG_ERROR( "Can't get application for connection key: " << connection_key()); return; } @@ -283,8 +280,7 @@ void SetAppIconRequest::on_event(const event_engine::Event& event) { app->set_app_icon_path(full_file_path_for_hmi_); - LOG4CXX_INFO(logger_, - "Icon path was set to '" << app->app_icon_path() << "'"); + SDL_LOG_INFO("Icon path was set to '" << app->app_icon_path() << "'"); } SendResponse(result, @@ -294,7 +290,7 @@ void SetAppIconRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_response.cc index 55255920d0..350d120f10 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SetAppIconResponse::SetAppIconResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ SetAppIconResponse::SetAppIconResponse( SetAppIconResponse::~SetAppIconResponse() {} void SetAppIconResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloud_app_properties_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloud_app_properties_request.cc index 680429d3b6..45ff0078fb 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloud_app_properties_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloud_app_properties_request.cc @@ -7,6 +7,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SetCloudAppPropertiesRequest::SetCloudAppPropertiesRequest( const app_mngr::commands::MessageSharedPtr& message, app_mngr::ApplicationManager& application_manager, @@ -22,11 +24,11 @@ SetCloudAppPropertiesRequest::SetCloudAppPropertiesRequest( SetCloudAppPropertiesRequest::~SetCloudAppPropertiesRequest() {} void SetCloudAppPropertiesRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -58,7 +60,7 @@ void SetCloudAppPropertiesRequest::Run() { void SetCloudAppPropertiesRequest::on_event( const app_mngr::event_engine::Event& event) { - LOG4CXX_INFO(logger_, "SetCloudAppPropertiesRequest on_event"); + SDL_LOG_INFO("SetCloudAppPropertiesRequest on_event"); } } // namespace commands diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloud_app_properties_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloud_app_properties_response.cc index 39d2ea7f90..1529788544 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloud_app_properties_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloud_app_properties_response.cc @@ -7,6 +7,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SetCloudAppPropertiesResponse::SetCloudAppPropertiesResponse( const app_mngr::commands::MessageSharedPtr& message, app_mngr::ApplicationManager& application_manager, @@ -22,7 +24,7 @@ SetCloudAppPropertiesResponse::SetCloudAppPropertiesResponse( SetCloudAppPropertiesResponse::~SetCloudAppPropertiesResponse() {} void SetCloudAppPropertiesResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_request.cc index 0cd9f6635c..b2ca3e6cfa 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_request.cc @@ -41,6 +41,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SetDisplayLayoutRequest::SetDisplayLayoutRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,11 +58,11 @@ SetDisplayLayoutRequest::SetDisplayLayoutRequest( SetDisplayLayoutRequest::~SetDisplayLayoutRequest() {} void SetDisplayLayoutRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -77,11 +79,10 @@ void SetDisplayLayoutRequest::Run() { if (new_layout != old_layout && !new_layout.empty()) { // Template switched, hence allow any color change - LOG4CXX_DEBUG(logger_, - "SetDisplayLayoutRequest New Layout: " << new_layout); + SDL_LOG_DEBUG("SetDisplayLayoutRequest New Layout: " << new_layout); app->set_display_layout(new_layout); } else { - LOG4CXX_DEBUG(logger_, "SetDisplayLayoutRequest No Layout Change"); + SDL_LOG_DEBUG("SetDisplayLayoutRequest No Layout Change"); // Template layout is the same as previous layout // Reject message if colors are set if (msg_params.keyExists(strings::day_color_scheme) && @@ -89,7 +90,7 @@ void SetDisplayLayoutRequest::Run() { msg_params[strings::day_color_scheme] != app->day_color_scheme()) { // Color scheme param exists and has been previously set, // hence do not allow color change - LOG4CXX_DEBUG(logger_, "Reject Day Color Scheme Change"); + SDL_LOG_DEBUG("Reject Day Color Scheme Change"); SendResponse(false, mobile_apis::Result::REJECTED); return; } @@ -99,19 +100,19 @@ void SetDisplayLayoutRequest::Run() { msg_params[strings::night_color_scheme] != app->night_color_scheme()) { // Color scheme param exists and has been previously set, // hence do not allow color change - LOG4CXX_DEBUG(logger_, "Reject Night Color Scheme Change"); + SDL_LOG_DEBUG("Reject Night Color Scheme Change"); SendResponse(false, mobile_apis::Result::REJECTED); return; } } if (msg_params.keyExists(strings::day_color_scheme)) { - LOG4CXX_DEBUG(logger_, "Allow Day Color Scheme Change"); + SDL_LOG_DEBUG("Allow Day Color Scheme Change"); app->set_day_color_scheme(msg_params[strings::day_color_scheme]); } if (msg_params.keyExists(strings::night_color_scheme)) { - LOG4CXX_DEBUG(logger_, "Allow Night Color Scheme Change"); + SDL_LOG_DEBUG("Allow Night Color Scheme Change"); app->set_night_color_scheme(msg_params[strings::night_color_scheme]); } @@ -123,12 +124,12 @@ void SetDisplayLayoutRequest::Run() { } void SetDisplayLayoutRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -136,7 +137,7 @@ void SetDisplayLayoutRequest::on_event(const event_engine::Event& event) { const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::UI_SetDisplayLayout: { - LOG4CXX_INFO(logger_, "Received UI_SetDisplayLayout event"); + SDL_LOG_INFO("Received UI_SetDisplayLayout event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI); hmi_apis::Common_Result::eType result_code = static_cast<hmi_apis::Common_Result::eType>( @@ -182,7 +183,7 @@ void SetDisplayLayoutRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_response.cc index 0999b596b5..8a5367ecd4 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_response.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SetDisplayLayoutResponse::SetDisplayLayoutResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ SetDisplayLayoutResponse::SetDisplayLayoutResponse( SetDisplayLayoutResponse::~SetDisplayLayoutResponse() {} void SetDisplayLayoutResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_request.cc index a567d1b32f..9ed43b105b 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_request.cc @@ -46,6 +46,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + namespace { bool IsResultCodeWarning(const app_mngr::commands::ResponseInfo& first, const app_mngr::commands::ResponseInfo& second, @@ -88,16 +90,15 @@ SetGlobalPropertiesRequest::SetGlobalPropertiesRequest( SetGlobalPropertiesRequest::~SetGlobalPropertiesRequest() {} void SetGlobalPropertiesRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params]; ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR( - logger_, - "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; } @@ -115,8 +116,8 @@ void SetGlobalPropertiesRequest::Run() { verification_result = MessageHelper::VerifyImage( msg_params[strings::menu_icon], app, application_manager_); if (mobile_apis::Result::INVALID_DATA == verification_result) { - LOG4CXX_ERROR( - logger_, "MessageHelper::VerifyImage return " << verification_result); + SDL_LOG_ERROR("MessageHelper::VerifyImage return " + << verification_result); SendResponse(false, verification_result); return; } @@ -126,7 +127,7 @@ void SetGlobalPropertiesRequest::Run() { if (mobile_apis::Result::INVALID_DATA == MessageHelper::VerifyImageVrHelpItems( msg_params[strings::vr_help], app, application_manager_)) { - LOG4CXX_ERROR(logger_, "MessageHelper::VerifyImage return INVALID_DATA!"); + SDL_LOG_ERROR("MessageHelper::VerifyImage return INVALID_DATA!"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -137,7 +138,7 @@ void SetGlobalPropertiesRequest::Run() { strings::auto_complete_list) && msg_params[strings::keyboard_properties].keyExists( strings::auto_complete_text)) { - LOG4CXX_ERROR(logger_, "Replacing deprecated autoCompleteText property"); + SDL_LOG_ERROR("Replacing deprecated autoCompleteText property"); msg_params[strings::keyboard_properties][strings::auto_complete_list][0] = msg_params[strings::keyboard_properties][strings::auto_complete_text] .asString(); @@ -146,7 +147,7 @@ void SetGlobalPropertiesRequest::Run() { } if (IsWhiteSpaceExist()) { - LOG4CXX_ERROR(logger_, "White spaces found"); + SDL_LOG_ERROR("White spaces found"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -162,8 +163,7 @@ void SetGlobalPropertiesRequest::Run() { // check VR params if (is_vr_help_title_present ^ is_vr_help_present) { - LOG4CXX_ERROR(logger_, - "Reject because of vr_help or vr_help_title only provided"); + SDL_LOG_ERROR("Reject because of vr_help or vr_help_title only provided"); SendResponse(false, mobile_apis::Result::REJECTED); return; } @@ -187,12 +187,11 @@ void SetGlobalPropertiesRequest::Run() { is_tts_send_ = true; } if (is_vr_help_title_present && is_vr_help_present) { - LOG4CXX_DEBUG(logger_, "VRHelp params presents"); + SDL_LOG_DEBUG("VRHelp params presents"); if (!CheckVrHelpItemsOrder(msg_params[strings::vr_help])) { - LOG4CXX_ERROR(logger_, - "VR Help Items contains nonsequential positions" - << " (e.g. [1,2,4]) or not started from 1"); + SDL_LOG_ERROR("VR Help Items contains nonsequential positions" + << " (e.g. [1,2,4]) or not started from 1"); SendResponse(false, mobile_apis::Result::REJECTED); return; } @@ -206,14 +205,14 @@ void SetGlobalPropertiesRequest::Run() { auto& help_prompt_manager = app->help_prompt_manager(); help_prompt_manager.OnSetGlobalPropertiesReceived(params, false); } else { - LOG4CXX_DEBUG(logger_, "VRHelp params does not present"); + SDL_LOG_DEBUG("VRHelp params does not present"); DCHECK_OR_RETURN_VOID(!is_vr_help_title_present && !is_vr_help_present); PrepareUIRequestMenuAndKeyboardData(app, msg_params, params); // Preparing data if (params.empty()) { - LOG4CXX_DEBUG(logger_, "No UI info provided"); + SDL_LOG_DEBUG("No UI info provided"); } else { params[strings::app_id] = app->app_id(); SendUIRequest(params, true); @@ -229,7 +228,7 @@ void SetGlobalPropertiesRequest::Run() { false, mobile_apis::Result::INVALID_DATA, "UserLocation is empty"); return; } - LOG4CXX_DEBUG(logger_, "Userlocation params presents"); + SDL_LOG_DEBUG("Userlocation params presents"); const auto& user_location = msg_params[strings::user_location]; app->set_user_location(user_location); @@ -250,7 +249,7 @@ void SetGlobalPropertiesRequest::Run() { // check TTS params if (is_help_prompt_present || is_timeout_prompt_present) { - LOG4CXX_DEBUG(logger_, "TTS params presents"); + SDL_LOG_DEBUG("TTS params presents"); auto tts_params = smart_objects::SmartObject(smart_objects::SmartType_Map); std::vector<std::string> invalid_params; @@ -261,9 +260,8 @@ void SetGlobalPropertiesRequest::Run() { MessageHelper::VerifyTtsFiles(help_prompt, app, application_manager_); if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) { - LOG4CXX_ERROR( - logger_, - "MessageHelper::VerifyTtsFiles return " << verification_result); + SDL_LOG_ERROR("MessageHelper::VerifyTtsFiles return " + << verification_result); invalid_params.push_back("help_prompt"); } else { app->set_help_prompt(help_prompt); @@ -278,9 +276,8 @@ void SetGlobalPropertiesRequest::Run() { timeout_prompt, app, application_manager_); if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) { - LOG4CXX_ERROR( - logger_, - "MessageHelper::VerifyTtsFiles return " << verification_result); + SDL_LOG_ERROR("MessageHelper::VerifyTtsFiles return " + << verification_result); invalid_params.push_back("timeout_prompt"); } else { app->set_timeout_prompt(timeout_prompt); @@ -319,7 +316,7 @@ void SetGlobalPropertiesRequest::Run() { bool SetGlobalPropertiesRequest::CheckVrHelpItemsOrder( const smart_objects::SmartObject& vr_help) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); DCHECK_OR_RETURN(vr_help.getType() == smart_objects::SmartType_Array, false); const size_t vr_help_length = vr_help.length(); DCHECK_OR_RETURN(vr_help_length > 0, false); @@ -329,9 +326,8 @@ bool SetGlobalPropertiesRequest::CheckVrHelpItemsOrder( vr_help.getElement(j).getElement(strings::position).asUInt(); // Elements shall start from 1 and increment one by one if (position != (j + 1)) { - LOG4CXX_ERROR(logger_, - "VR help items order is wrong" - << " at " << j << ", position value:" << position); + SDL_LOG_ERROR("VR help items order is wrong" + << " at " << j << ", position value:" << position); return false; } } @@ -339,7 +335,7 @@ bool SetGlobalPropertiesRequest::CheckVrHelpItemsOrder( } void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace helpers; const smart_objects::SmartObject& message = event.smart_object(); @@ -348,7 +344,7 @@ void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) { switch (event.id()) { case hmi_apis::FunctionID::UI_SetGlobalProperties: { - LOG4CXX_DEBUG(logger_, "Received UI_SetGlobalProperties event"); + SDL_LOG_DEBUG("Received UI_SetGlobalProperties event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI); is_ui_received_ = true; ui_result_ = static_cast<hmi_apis::Common_Result::eType>( @@ -361,7 +357,7 @@ void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) { break; } case hmi_apis::FunctionID::TTS_SetGlobalProperties: { - LOG4CXX_DEBUG(logger_, "Received TTS_SetGlobalProperties event"); + SDL_LOG_DEBUG("Received TTS_SetGlobalProperties event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS); is_tts_received_ = true; tts_result_ = static_cast<hmi_apis::Common_Result::eType>( @@ -374,7 +370,7 @@ void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) { break; } case hmi_apis::FunctionID::RC_SetGlobalProperties: { - LOG4CXX_DEBUG(logger_, "Received RC_SetGlobalProperties event"); + SDL_LOG_DEBUG("Received RC_SetGlobalProperties event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_RC); is_rc_received_ = true; rc_result_ = static_cast<hmi_apis::Common_Result::eType>( @@ -383,13 +379,13 @@ void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } if (IsPendingResponseExist()) { - LOG4CXX_DEBUG(logger_, "Continue waiting for response"); + SDL_LOG_DEBUG("Continue waiting for response"); return; } mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM; @@ -420,7 +416,7 @@ bool SetGlobalPropertiesRequest::Init() { bool SetGlobalPropertiesRequest::PrepareResponseParameters( mobile_apis::Result::eType& result_code, std::string& info) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace helpers; app_mngr::commands::ResponseInfo ui_properties_info( @@ -475,7 +471,7 @@ bool SetGlobalPropertiesRequest::PrepareResultForMobileResponse( const app_mngr::commands::ResponseInfo& first, const app_mngr::commands::ResponseInfo& second, const app_mngr::commands::ResponseInfo& third) const { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); app_mngr::commands::ResponseInfo both_info; std::vector<hmi_apis::Common_Result::eType> success_result_codes{ @@ -508,7 +504,7 @@ SetGlobalPropertiesRequest::PrepareResultCodeForResponse( const app_mngr::commands::ResponseInfo& first, const app_mngr::commands::ResponseInfo& second, const app_mngr::commands::ResponseInfo& third) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM; if (IsResultCodeUnsupported(first, second, third) || IsResultCodeUnsupported(second, third, first) || @@ -599,7 +595,7 @@ void SetGlobalPropertiesRequest::PrepareUIRequestVRHelpData( const ApplicationSharedPtr app, const smart_objects::SmartObject& msg_params, smart_objects::SmartObject& out_params) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); DCHECK_OR_RETURN_VOID(app); app->set_vr_help_title(msg_params.getElement(strings::vr_help_title)); @@ -613,7 +609,7 @@ void SetGlobalPropertiesRequest::PrepareUIRequestMenuAndKeyboardData( const ApplicationSharedPtr app, const smart_objects::SmartObject& msg_params, smart_objects::SmartObject& out_params) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); DCHECK_OR_RETURN_VOID(app); const bool is_menu_title_present = @@ -641,7 +637,7 @@ void SetGlobalPropertiesRequest::PrepareUIRequestMenuAndKeyboardData( void SetGlobalPropertiesRequest::SendTTSRequest( const smart_objects::SmartObject& params, bool use_events) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); is_tts_send_ = true; StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS); SendHMIRequest( @@ -650,7 +646,7 @@ void SetGlobalPropertiesRequest::SendTTSRequest( void SetGlobalPropertiesRequest::SendUIRequest( const smart_objects::SmartObject& params, bool use_events) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); is_ui_send_ = true; StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI); SendHMIRequest( @@ -660,7 +656,7 @@ void SetGlobalPropertiesRequest::SendUIRequest( void SetGlobalPropertiesRequest::SendRCRequest( const ns_smart_device_link::ns_smart_objects::SmartObject& params, bool use_events) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); is_rc_send_ = true; StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_RC); SendHMIRequest( @@ -674,7 +670,7 @@ bool SetGlobalPropertiesRequest::IsPendingResponseExist() { bool SetGlobalPropertiesRequest::ValidateConditionalMandatoryParameters( const smart_objects::SmartObject& params) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); return params.keyExists(strings::help_prompt) || params.keyExists(strings::timeout_prompt) || params.keyExists(strings::vr_help_title) || @@ -687,7 +683,7 @@ bool SetGlobalPropertiesRequest::ValidateConditionalMandatoryParameters( } bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const char* str; const smart_objects::SmartObject& msg_params = @@ -703,7 +699,7 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() { for (; it_hp != it_hp_end; ++it_hp) { str = (*it_hp)[strings::text].asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid help_prompt syntax check failed"); + SDL_LOG_ERROR("Invalid help_prompt syntax check failed"); return true; } } @@ -719,7 +715,7 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() { for (; it_tp != it_tp_end; ++it_tp) { str = (*it_tp)[strings::text].asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid timeout_prompt syntax check failed"); + SDL_LOG_ERROR("Invalid timeout_prompt syntax check failed"); return true; } } @@ -735,15 +731,14 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() { for (; it_vh != it_vh_end; ++it_vh) { str = (*it_vh)[strings::text].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid vr_help text syntax check failed"); + SDL_LOG_ERROR("Invalid vr_help text syntax check failed"); return true; } if ((*it_vh).keyExists(strings::image)) { str = (*it_vh)[strings::image][strings::value].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, - "Invalid vr_help image value syntax check failed"); + SDL_LOG_ERROR("Invalid vr_help image value syntax check failed"); return true; } } // if image exists @@ -753,7 +748,7 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() { if (msg_params.keyExists(strings::menu_icon)) { str = msg_params[strings::menu_icon][strings::value].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid menu_icon value syntax check failed"); + SDL_LOG_ERROR("Invalid menu_icon value syntax check failed"); return true; } } @@ -761,7 +756,7 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() { if (msg_params.keyExists(strings::vr_help_title)) { str = msg_params[strings::vr_help_title].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid vr_help_title value syntax check failed"); + SDL_LOG_ERROR("Invalid vr_help_title value syntax check failed"); return true; } } @@ -769,7 +764,7 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() { if (msg_params.keyExists(strings::menu_title)) { str = msg_params[strings::menu_title].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid menu_title value syntax check failed"); + SDL_LOG_ERROR("Invalid menu_title value syntax check failed"); return true; } } @@ -788,9 +783,9 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() { for (; it_lcl != it_lcl_end; ++it_lcl) { str = (*it_lcl).asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, - "Invalid keyboard_properties " - "limited_character_list syntax check failed"); + SDL_LOG_ERROR( + "Invalid keyboard_properties " + "limited_character_list syntax check failed"); return true; } } @@ -807,9 +802,9 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() { for (; it != acl_array->end(); ++it) { str = it->asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, - "Invalid keyboard_properties " - "auto_complete_list syntax check failed"); + SDL_LOG_ERROR( + "Invalid keyboard_properties " + "auto_complete_list syntax check failed"); return true; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_response.cc index 1de2b97d3a..03c649a02d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SetGlobalPropertiesResponse::SetGlobalPropertiesResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ SetGlobalPropertiesResponse::SetGlobalPropertiesResponse( SetGlobalPropertiesResponse::~SetGlobalPropertiesResponse() {} void SetGlobalPropertiesResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_request.cc index d610090aa4..b7b8fc27ad 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_request.cc @@ -43,6 +43,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SetMediaClockRequest::SetMediaClockRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -58,18 +60,18 @@ SetMediaClockRequest::SetMediaClockRequest( SetMediaClockRequest::~SetMediaClockRequest() {} void SetMediaClockRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); return; } if (!app->is_media_application()) { - LOG4CXX_ERROR(logger_, "Application is not media application"); + SDL_LOG_ERROR("Application is not media application"); SendResponse(false, mobile_apis::Result::REJECTED); return; } @@ -90,7 +92,7 @@ void SetMediaClockRequest::Run() { } void SetMediaClockRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { @@ -111,7 +113,7 @@ void SetMediaClockRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } @@ -126,7 +128,7 @@ bool SetMediaClockRequest::isDataValid() { if (update_mode == mobile_apis::UpdateMode::COUNTUP || update_mode == mobile_apis::UpdateMode::COUNTDOWN) { if (!msg_params.keyExists(strings::start_time)) { - LOG4CXX_INFO(logger_, "Invalid data"); + SDL_LOG_INFO("Invalid data"); return false; } @@ -151,13 +153,13 @@ bool SetMediaClockRequest::isDataValid() { (update_mode == mobile_apis::UpdateMode::COUNTDOWN)) || ((end_time_in_seconds < start_time_in_seconds) && (update_mode == mobile_apis::UpdateMode::COUNTUP))) { - LOG4CXX_INFO(logger_, "Invalid data"); + SDL_LOG_INFO("Invalid data"); return false; } } } - LOG4CXX_INFO(logger_, "Data is valid"); + SDL_LOG_INFO("Data is valid"); return true; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_response.cc index 948ff84156..0208741795 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SetMediaClockTimerResponse::SetMediaClockTimerResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ SetMediaClockTimerResponse::SetMediaClockTimerResponse( SetMediaClockTimerResponse::~SetMediaClockTimerResponse() {} void SetMediaClockTimerResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } 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 36278168dc..c652764f16 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 @@ -40,6 +40,8 @@ namespace app_mngr = application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ShowAppMenuRequest::ShowAppMenuRequest( const app_mngr::commands::MessageSharedPtr& message, app_mngr::ApplicationManager& application_manager, @@ -56,14 +58,13 @@ ShowAppMenuRequest::~ShowAppMenuRequest() {} void ShowAppMenuRequest::Run() { using namespace app_mngr; - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR( - logger_, - "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; } @@ -76,9 +77,8 @@ void ShowAppMenuRequest::Run() { app->system_context(mobile_apis::PredefinedWindows::DEFAULT_WINDOW), mobile_apis::SystemContext::SYSCTXT_MAIN, mobile_apis::SystemContext::SYSCTXT_MENU)) { - LOG4CXX_ERROR( - logger_, - "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; } @@ -90,7 +90,7 @@ void ShowAppMenuRequest::Run() { if (received_msg_params.keyExists(strings::menu_id)) { const int32_t menu_id = received_msg_params[strings::menu_id].asInt(); if (!app->FindSubMenu(menu_id)) { - LOG4CXX_ERROR(logger_, "Menu with id " << menu_id << " is not found."); + SDL_LOG_ERROR("Menu with id " << menu_id << " is not found."); SendResponse(false, mobile_apis::Result::INVALID_ID); return; } @@ -103,7 +103,7 @@ void ShowAppMenuRequest::Run() { void ShowAppMenuRequest::on_event(const app_mngr::event_engine::Event& event) { using namespace app_mngr; - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { @@ -120,8 +120,7 @@ void ShowAppMenuRequest::on_event(const app_mngr::event_engine::Event& event) { application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, - "Application with id " << connection_key() + SDL_LOG_ERROR("Application with id " << connection_key() << " is not registered."); return; } @@ -133,7 +132,7 @@ void ShowAppMenuRequest::on_event(const app_mngr::event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event: " << event.id()); + SDL_LOG_ERROR("Received unknown event: " << event.id()); return; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_response.cc index 2b952ea9ac..e93e7b3d4e 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_response.cc @@ -39,6 +39,8 @@ namespace app_mngr = application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ShowAppMenuResponse::ShowAppMenuResponse( const app_mngr::commands::MessageSharedPtr& message, app_mngr::ApplicationManager& application_manager, @@ -54,7 +56,7 @@ ShowAppMenuResponse::ShowAppMenuResponse( ShowAppMenuResponse::~ShowAppMenuResponse() {} void ShowAppMenuResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_request.cc index b439c1cb16..04310bcd58 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_request.cc @@ -46,6 +46,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ShowConstantTBTRequest::ShowConstantTBTRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -61,19 +63,19 @@ ShowConstantTBTRequest::ShowConstantTBTRequest( ShowConstantTBTRequest::~ShowConstantTBTRequest() {} void ShowConstantTBTRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application( (*message_)[strings::params][strings::connection_key].asUInt()); if (!app) { SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); return; } // SDLAQ-CRS-664, VC3.1 if ((*message_)[strings::msg_params].empty()) { - LOG4CXX_ERROR(logger_, "INVALID_DATA!"); + SDL_LOG_ERROR("INVALID_DATA!"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -83,8 +85,7 @@ void ShowConstantTBTRequest::Run() { msg_params = (*message_)[strings::msg_params]; if (IsWhiteSpaceExist()) { - LOG4CXX_ERROR(logger_, - "Incoming show constant TBT has contains \t\n \\t \\n"); + SDL_LOG_ERROR("Incoming show constant TBT has contains \t\n \\t \\n"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -96,7 +97,7 @@ void ShowConstantTBTRequest::Run() { msg_params, app, policy_handler_, application_manager_); if (mobile_apis::Result::SUCCESS != processing_result) { - LOG4CXX_ERROR(logger_, "INVALID_DATA!"); + SDL_LOG_ERROR("INVALID_DATA!"); SendResponse(false, processing_result); return; } @@ -106,7 +107,7 @@ void ShowConstantTBTRequest::Run() { verification_result = MessageHelper::VerifyImage( msg_params[strings::turn_icon], app, application_manager_); if (mobile_apis::Result::INVALID_DATA == verification_result) { - LOG4CXX_ERROR(logger_, "VerifyImage INVALID_DATA!"); + SDL_LOG_ERROR("VerifyImage INVALID_DATA!"); SendResponse(false, verification_result); return; } @@ -116,7 +117,7 @@ void ShowConstantTBTRequest::Run() { verification_result = MessageHelper::VerifyImage( msg_params[strings::next_turn_icon], app, application_manager_); if (mobile_apis::Result::INVALID_DATA == verification_result) { - LOG4CXX_ERROR(logger_, "VerifyImage INVALID_DATA!"); + SDL_LOG_ERROR("VerifyImage INVALID_DATA!"); SendResponse(false, verification_result); return; } @@ -185,13 +186,13 @@ void ShowConstantTBTRequest::Run() { } void ShowConstantTBTRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace hmi_apis; const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::Navigation_ShowConstantTBT: { - LOG4CXX_INFO(logger_, "Received Navigation_ShowConstantTBT event"); + SDL_LOG_INFO("Received Navigation_ShowConstantTBT event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation); const Common_Result::eType result_code = static_cast<Common_Result::eType>( @@ -207,21 +208,21 @@ void ShowConstantTBTRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); break; } } } bool ShowConstantTBTRequest::IsWhiteSpaceExist() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const char* str = NULL; if ((*message_)[strings::msg_params].keyExists(strings::turn_icon)) { str = (*message_)[strings::msg_params][strings::turn_icon][strings::value] .asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid turn_icon value syntax check failed"); + SDL_LOG_ERROR("Invalid turn_icon value syntax check failed"); return true; } } @@ -231,8 +232,7 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() { [strings::value] .asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, - "Invalid next_turn_icon value syntax check failed"); + SDL_LOG_ERROR("Invalid next_turn_icon value syntax check failed"); return true; } } @@ -241,8 +241,7 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() { str = (*message_)[strings::msg_params][strings::navigation_text_1] .asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, - "Invalid navigation_text_1 value syntax check failed"); + SDL_LOG_ERROR("Invalid navigation_text_1 value syntax check failed"); return true; } } @@ -251,8 +250,7 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() { str = (*message_)[strings::msg_params][strings::navigation_text_2] .asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, - "Invalid navigation_text_2 value syntax check failed"); + SDL_LOG_ERROR("Invalid navigation_text_2 value syntax check failed"); return true; } } @@ -260,7 +258,7 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() { if ((*message_)[strings::msg_params].keyExists(strings::eta)) { str = (*message_)[strings::msg_params][strings::eta].asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid eta value syntax check failed"); + SDL_LOG_ERROR("Invalid eta value syntax check failed"); return true; } } @@ -269,8 +267,7 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() { str = (*message_)[strings::msg_params][strings::total_distance].asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, - "Invalid total_distance value syntax check failed"); + SDL_LOG_ERROR("Invalid total_distance value syntax check failed"); return true; } } @@ -280,8 +277,7 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() { str = (*message_)[strings::msg_params][strings::time_to_destination] .asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, - "Invalid time_to_destination value syntax check failed"); + SDL_LOG_ERROR("Invalid time_to_destination value syntax check failed"); return true; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc index d027daf77d..7d546079e8 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ShowConstantTBTResponse::ShowConstantTBTResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,7 +58,7 @@ ShowConstantTBTResponse::ShowConstantTBTResponse( ShowConstantTBTResponse::~ShowConstantTBTResponse() {} void ShowConstantTBTResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc index 84d11f8e09..910ab9ef23 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc @@ -44,6 +44,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ShowRequest::ShowRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -83,9 +85,8 @@ void ShowRequest::HandleMetadata(const char* field_id, [hmi_request::field_types][i] = current_tag; } } else { - LOG4CXX_INFO(logger_, - "metadata tag provided with no item for " - << field_id << ", ignoring with warning"); + SDL_LOG_INFO("metadata tag provided with no item for " + << field_id << ", ignoring with warning"); // tag provided with no item, ignore with warning if (mobile_apis::Result::INVALID_ENUM == core_result_code_) { core_result_code_ = mobile_apis::Result::WARNINGS; @@ -94,14 +95,13 @@ void ShowRequest::HandleMetadata(const char* field_id, } } } else { - LOG4CXX_INFO(logger_, - "No metadata tagging provided for field: " << field_id); + SDL_LOG_INFO("No metadata tagging provided for field: " << field_id); } } bool ShowRequest::CheckTemplateConfigurationForApp( application_manager::Application& app) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if ((*message_)[strings::msg_params].keyExists(strings::window_id)) { current_window_id_ = @@ -112,21 +112,20 @@ bool ShowRequest::CheckTemplateConfigurationForApp( const auto new_template_layout = template_config_[strings::template_layout].asString(); const auto old_template_layout = app.window_layout(current_window_id_); - LOG4CXX_DEBUG(logger_, "New layout: " << new_template_layout); - LOG4CXX_DEBUG(logger_, "Old layout: " << old_template_layout); + SDL_LOG_DEBUG("New layout: " << new_template_layout); + SDL_LOG_DEBUG("Old layout: " << old_template_layout); const bool layouts_equal = (new_template_layout == old_template_layout); if (!new_template_layout.empty() && !layouts_equal) { // Template switched, hence allow any color change - LOG4CXX_DEBUG(logger_, - "Show Request: Setting new Layout: " << new_template_layout + SDL_LOG_DEBUG("Show Request: Setting new Layout: " << new_template_layout << " for window ID: " << current_window_id_); layout_change_required_ = true; return true; } - LOG4CXX_DEBUG(logger_, "Show Request: No Layout Change"); + SDL_LOG_DEBUG("Show Request: No Layout Change"); return false; }; @@ -140,10 +139,10 @@ bool ShowRequest::CheckTemplateConfigurationForApp( app.day_color_scheme(current_window_id_)) { // Color scheme param exists and has been previously set, // hence do not allow color change - LOG4CXX_DEBUG(logger_, "Day Color Scheme change is rejected"); + SDL_LOG_DEBUG("Day Color Scheme change is rejected"); return false; } - LOG4CXX_DEBUG(logger_, "Day Color Scheme change is allowed"); + SDL_LOG_DEBUG("Day Color Scheme change is allowed"); dcs_change_required_ = true; return true; @@ -159,10 +158,10 @@ bool ShowRequest::CheckTemplateConfigurationForApp( app.night_color_scheme(current_window_id_)) { // Color scheme param exists and has been previously set, // hence do not allow color change - LOG4CXX_DEBUG(logger_, "Night Color Scheme change is rejected"); + SDL_LOG_DEBUG("Night Color Scheme change is rejected"); return false; } - LOG4CXX_DEBUG(logger_, "Night Color Scheme Change is allowed"); + SDL_LOG_DEBUG("Night Color Scheme Change is allowed"); ncs_change_required_ = true; return true; @@ -192,7 +191,7 @@ bool ShowRequest::CheckTemplateConfigurationForApp( void ShowRequest::ApplyTemplateConfigurationForApp( mobile_apis::Result::eType result, application_manager::Application& app) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if (helpers::Compare<mobile_apis::Result::eType, helpers::EQ, helpers::ONE>( result, mobile_apis::Result::SUCCESS, @@ -200,7 +199,7 @@ void ShowRequest::ApplyTemplateConfigurationForApp( if (layout_change_required_) { const std::string new_layout = template_config_[strings::template_layout].asString(); - LOG4CXX_DEBUG(logger_, "New layout : " << new_layout << " is applied"); + SDL_LOG_DEBUG("New layout : " << new_layout << " is applied"); app.set_window_layout(current_window_id_, new_layout); if (template_config_.keyExists(strings::day_color_scheme)) { @@ -217,13 +216,13 @@ void ShowRequest::ApplyTemplateConfigurationForApp( } if (dcs_change_required_) { - LOG4CXX_DEBUG(logger_, "New day color scheme is applied"); + SDL_LOG_DEBUG("New day color scheme is applied"); app.set_day_color_scheme(current_window_id_, template_config_[strings::day_color_scheme]); } if (ncs_change_required_) { - LOG4CXX_DEBUG(logger_, "New night color scheme is applied"); + SDL_LOG_DEBUG("New night color scheme is applied"); app.set_night_color_scheme(current_window_id_, template_config_[strings::night_color_scheme]); } @@ -231,24 +230,24 @@ void ShowRequest::ApplyTemplateConfigurationForApp( } void ShowRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } // SDLAQ-CRS-494, VC3.1 if ((*message_)[strings::msg_params].empty()) { - LOG4CXX_ERROR(logger_, strings::msg_params << " is empty."); + SDL_LOG_ERROR(strings::msg_params << " is empty."); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } if (!CheckStringsOfShowRequest()) { - LOG4CXX_ERROR(logger_, "Incorrect characters in string"); + SDL_LOG_ERROR("Incorrect characters in string"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -266,7 +265,7 @@ void ShowRequest::Run() { } if (mobile_apis::Result::SUCCESS != processing_result) { - LOG4CXX_ERROR(logger_, "Processing of soft buttons failed."); + SDL_LOG_ERROR("Processing of soft buttons failed."); SendResponse(false, processing_result); return; } @@ -281,7 +280,7 @@ void ShowRequest::Run() { app, application_manager_); if (mobile_apis::Result::INVALID_DATA == verification_result) { - LOG4CXX_ERROR(logger_, "Image verification failed."); + SDL_LOG_ERROR("Image verification failed."); SendResponse(false, verification_result); return; } @@ -293,7 +292,7 @@ void ShowRequest::Run() { app, application_manager_); if (mobile_apis::Result::INVALID_DATA == verification_result) { - LOG4CXX_ERROR(logger_, "Image verification failed."); + SDL_LOG_ERROR("Image verification failed."); SendResponse(false, verification_result); return; } @@ -421,8 +420,7 @@ void ShowRequest::Run() { const auto window_id = (*message_)[strings::msg_params][strings::window_id].asInt(); if (!app->WindowIdExists(window_id)) { - LOG4CXX_ERROR(logger_, - "Window with id #" << window_id << " does not exist"); + SDL_LOG_ERROR("Window with id #" << window_id << " does not exist"); SendResponse(false, mobile_apis::Result::INVALID_ID); return; } @@ -453,21 +451,21 @@ void ShowRequest::Run() { } void ShowRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace helpers; const smart_objects::SmartObject& message = event.smart_object(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } switch (event.id()) { case hmi_apis::FunctionID::UI_Show: { - LOG4CXX_DEBUG(logger_, "Received UI_Show event."); + SDL_LOG_DEBUG("Received UI_Show event."); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI); std::string response_info; hmi_apis::Common_Result::eType result_code = @@ -498,41 +496,41 @@ void ShowRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event " << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); break; } } } bool ShowRequest::CheckStringsOfShowRequest() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const char* str; if ((*message_)[strings::msg_params].keyExists(strings::main_field_4)) { str = (*message_)[strings::msg_params][strings::main_field_4].asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid main_field_4 syntax check failed"); + SDL_LOG_ERROR("Invalid main_field_4 syntax check failed"); return false; } } if ((*message_)[strings::msg_params].keyExists(strings::main_field_3)) { str = (*message_)[strings::msg_params][strings::main_field_3].asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid main_field_3 syntax check failed"); + SDL_LOG_ERROR("Invalid main_field_3 syntax check failed"); return false; } } if ((*message_)[strings::msg_params].keyExists(strings::main_field_2)) { str = (*message_)[strings::msg_params][strings::main_field_2].asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid main_field_2 syntax check failed"); + SDL_LOG_ERROR("Invalid main_field_2 syntax check failed"); return false; } } if ((*message_)[strings::msg_params].keyExists(strings::main_field_1)) { str = (*message_)[strings::msg_params][strings::main_field_1].asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid main_field_1 syntax check failed"); + SDL_LOG_ERROR("Invalid main_field_1 syntax check failed"); return false; } } @@ -540,28 +538,28 @@ bool ShowRequest::CheckStringsOfShowRequest() { str = (*message_)[strings::msg_params][strings::template_title].asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid templateTitle syntax check failed"); + SDL_LOG_ERROR("Invalid templateTitle syntax check failed"); return false; } } if ((*message_)[strings::msg_params].keyExists(strings::status_bar)) { str = (*message_)[strings::msg_params][strings::status_bar].asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid status_bar syntax check failed"); + SDL_LOG_ERROR("Invalid status_bar syntax check failed"); return false; } } if ((*message_)[strings::msg_params].keyExists(strings::media_clock)) { str = (*message_)[strings::msg_params][strings::media_clock].asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid media_clock syntax check failed"); + SDL_LOG_ERROR("Invalid media_clock syntax check failed"); return false; } } if ((*message_)[strings::msg_params].keyExists(strings::media_track)) { str = (*message_)[strings::msg_params][strings::media_track].asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid media_track syntax check failed"); + SDL_LOG_ERROR("Invalid media_track syntax check failed"); return false; } } @@ -571,7 +569,7 @@ bool ShowRequest::CheckStringsOfShowRequest() { for (size_t i = 0; i < custom_presets_array.length(); ++i) { str = custom_presets_array[i].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid custom_presets syntax check failed"); + SDL_LOG_ERROR("Invalid custom_presets syntax check failed"); return false; } } @@ -581,7 +579,7 @@ bool ShowRequest::CheckStringsOfShowRequest() { str = (*message_)[strings::msg_params][strings::graphic][strings::value] .asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid graphic value syntax check failed"); + SDL_LOG_ERROR("Invalid graphic value syntax check failed"); return false; } } @@ -591,8 +589,7 @@ bool ShowRequest::CheckStringsOfShowRequest() { [strings::value] .asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, - "Invalid secondary_graphic value syntax check failed"); + SDL_LOG_ERROR("Invalid secondary_graphic value syntax check failed"); return false; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_response.cc index f5667189b7..074fcabc7a 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_response.cc @@ -41,6 +41,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ShowResponse::ShowResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,7 +58,7 @@ ShowResponse::ShowResponse( ShowResponse::~ShowResponse() {} void ShowResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_request.cc index dd7b426b40..15ced6d5a1 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_request.cc @@ -43,6 +43,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SliderRequest::SliderRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -72,20 +74,20 @@ bool SliderRequest::Init() { } void SliderRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr application = application_manager_.application( (*message_)[strings::params][strings::connection_key].asUInt()); if (!application) { - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } if ((*message_)[strings::msg_params][strings::num_ticks].asInt() < (*message_)[strings::msg_params][strings::position].asInt()) { - LOG4CXX_ERROR(logger_, "INVALID_DATA"); + SDL_LOG_ERROR("INVALID_DATA"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -94,7 +96,7 @@ void SliderRequest::Run() { if (1 < (*message_)[strings::msg_params][strings::slider_footer].length()) { if ((*message_)[strings::msg_params][strings::num_ticks].asUInt() != (*message_)[strings::msg_params][strings::slider_footer].length()) { - LOG4CXX_ERROR(logger_, "INVALID_DATA"); + SDL_LOG_ERROR("INVALID_DATA"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -102,7 +104,7 @@ void SliderRequest::Run() { } if (IsWhiteSpaceExist()) { - LOG4CXX_ERROR(logger_, "Incoming slider has contains \t\n \\t \\n"); + SDL_LOG_ERROR("Incoming slider has contains \t\n \\t \\n"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -126,7 +128,7 @@ void SliderRequest::Run() { } void SliderRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace helpers; using namespace smart_objects; using namespace hmi_apis; @@ -135,18 +137,18 @@ void SliderRequest::on_event(const event_engine::Event& event) { const event_engine::Event::EventID event_id = event.id(); if (event_id == FunctionID::UI_OnResetTimeout) { - LOG4CXX_INFO(logger_, "Received UI_OnResetTimeout event"); + SDL_LOG_INFO("Received UI_OnResetTimeout event"); application_manager_.updateRequestTimeout( connection_key(), correlation_id(), default_timeout()); return; } if (event_id != FunctionID::UI_Slider) { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } - LOG4CXX_DEBUG(logger_, "Received UI_Slider event"); + SDL_LOG_DEBUG("Received UI_Slider event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI); const Common_Result::eType response_code = static_cast<Common_Result::eType>( message[strings::params][hmi_response::code].asInt()); @@ -163,8 +165,7 @@ void SliderRequest::on_event(const event_engine::Event& event) { response_msg_params[strings::slider_position] = message[strings::params][strings::data][strings::slider_position]; } else { - LOG4CXX_ERROR(logger_, - strings::slider_position << " field is absent" + SDL_LOG_ERROR(strings::slider_position << " field is absent" " in response."); response_msg_params[strings::slider_position] = 0; } @@ -181,12 +182,12 @@ void SliderRequest::on_event(const event_engine::Event& event) { } bool SliderRequest::IsWhiteSpaceExist() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const char* str = NULL; str = (*message_)[strings::msg_params][strings::slider_header].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid slider_header value syntax check failed"); + SDL_LOG_ERROR("Invalid slider_header value syntax check failed"); return true; } @@ -200,7 +201,7 @@ bool SliderRequest::IsWhiteSpaceExist() { for (; it_sf != it_sf_end; ++it_sf) { str = (*it_sf).asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid slider_footer syntax check failed"); + SDL_LOG_ERROR("Invalid slider_footer syntax check failed"); return true; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_response.cc index 4ac96a272e..72b0003d8d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SliderResponse::SliderResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ SliderResponse::SliderResponse( SliderResponse::~SliderResponse() {} void SliderResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_request.cc index 0730a8730f..b8de053853 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_request.cc @@ -43,6 +43,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SpeakRequest::SpeakRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -60,20 +62,20 @@ SpeakRequest::SpeakRequest( SpeakRequest::~SpeakRequest() {} void SpeakRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } if (IsWhiteSpaceExist()) { - LOG4CXX_ERROR(logger_, - "Incoming speak has contains \\t\\n \\\\t \\\\n " - " text contains only whitespace in ttsChunks"); + SDL_LOG_ERROR( + "Incoming speak has contains \\t\\n \\\\t \\\\n " + " text contains only whitespace in ttsChunks"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -84,9 +86,8 @@ void SpeakRequest::Run() { MessageHelper::VerifyTtsFiles(tts_chunks, app, application_manager_); if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) { - LOG4CXX_ERROR( - logger_, - "MessageHelper::VerifyTtsFiles return " << verification_result); + SDL_LOG_ERROR("MessageHelper::VerifyTtsFiles return " + << verification_result); SendResponse(false, mobile_apis::Result::FILE_NOT_FOUND, "One or more files needed for tts_chunks are not present"); @@ -103,23 +104,23 @@ void SpeakRequest::Run() { } void SpeakRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); switch (event.id()) { case hmi_apis::FunctionID::TTS_Speak: { - LOG4CXX_INFO(logger_, "Received TTS_Speak event"); + SDL_LOG_INFO("Received TTS_Speak event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS); ProcessTTSSpeakResponse(event.smart_object()); break; } case hmi_apis::FunctionID::TTS_OnResetTimeout: { - LOG4CXX_INFO(logger_, "Received TTS_OnResetTimeout event"); + SDL_LOG_INFO("Received TTS_OnResetTimeout event"); application_manager_.updateRequestTimeout( connection_key(), correlation_id(), default_timeout()); break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); break; } } @@ -127,14 +128,14 @@ void SpeakRequest::on_event(const event_engine::Event& event) { void SpeakRequest::ProcessTTSSpeakResponse( const smart_objects::SmartObject& message) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace helpers; ApplicationSharedPtr application = application_manager_.application(connection_key()); if (!application) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); return; } @@ -158,7 +159,7 @@ void SpeakRequest::ProcessTTSSpeakResponse( } bool SpeakRequest::IsWhiteSpaceExist() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const char* str = NULL; if ((*message_)[strings::msg_params].keyExists(strings::tts_chunks)) { @@ -171,7 +172,7 @@ bool SpeakRequest::IsWhiteSpaceExist() { for (; it_tc != it_tc_end; ++it_tc) { str = (*it_tc)[strings::text].asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid tts_chunks syntax check failed"); + SDL_LOG_ERROR("Invalid tts_chunks syntax check failed"); return true; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_response.cc index 69b04977ef..3f9c49ac50 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_response.cc @@ -41,6 +41,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SpeakResponse::SpeakResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,7 +58,7 @@ SpeakResponse::SpeakResponse( SpeakResponse::~SpeakResponse() {} void SpeakResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_request.cc index 3797913f5b..42cb3c60c9 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_request.cc @@ -41,6 +41,8 @@ namespace commands { namespace str = strings; +SDL_CREATE_LOG_VARIABLE("Commands") + SubscribeButtonRequest::SubscribeButtonRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,12 +58,12 @@ SubscribeButtonRequest::SubscribeButtonRequest( SubscribeButtonRequest::~SubscribeButtonRequest() {} void SubscribeButtonRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "APPLICATION_NOT_REGISTERED"); + SDL_LOG_ERROR("APPLICATION_NOT_REGISTERED"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -71,8 +73,7 @@ void SubscribeButtonRequest::Run() { (*message_)[str::msg_params][str::button_name].asInt()); if (!IsSubscriptionAllowed(app, btn_id)) { - LOG4CXX_ERROR(logger_, - "Subscribe on button " << btn_id << " isn't allowed"); + SDL_LOG_ERROR("Subscribe on button " << btn_id << " isn't allowed"); SendResponse(false, mobile_apis::Result::REJECTED); return; } @@ -83,23 +84,22 @@ void SubscribeButtonRequest::Run() { bool play_pause_supported = CheckHMICapabilities(mobile_apis::ButtonName::PLAY_PAUSE); if (play_pause_supported) { - LOG4CXX_DEBUG(logger_, "Converting Legacy OK button to PLAY_PAUSE"); + SDL_LOG_DEBUG("Converting Legacy OK button to PLAY_PAUSE"); btn_id = mobile_apis::ButtonName::PLAY_PAUSE; (*message_)[str::msg_params][str::button_name] = btn_id; } else if (!ok_supported) { - LOG4CXX_ERROR(logger_, "OK button isn't allowed by HMI capabilities"); + SDL_LOG_ERROR("OK button isn't allowed by HMI capabilities"); SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE); } } else if (!CheckHMICapabilities(btn_id)) { - LOG4CXX_ERROR(logger_, - "Subscribe on button " - << btn_id << " isn't allowed by HMI capabilities"); + SDL_LOG_ERROR("Subscribe on button " + << btn_id << " isn't allowed by HMI capabilities"); SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE); return; } if (app->IsSubscribedToButton(btn_id)) { - LOG4CXX_ERROR(logger_, "Already subscribed to button " << btn_id); + SDL_LOG_ERROR("Already subscribed to button " << btn_id); SendResponse(false, mobile_apis::Result::IGNORED); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_response.cc index e584f84f4c..216d1e186d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_response.cc @@ -38,6 +38,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SubscribeButtonResponse::SubscribeButtonResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,12 +55,12 @@ SubscribeButtonResponse::SubscribeButtonResponse( SubscribeButtonResponse::~SubscribeButtonResponse() {} void SubscribeButtonResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // check if response false if (true == (*message_)[strings::msg_params].keyExists(strings::success)) { if ((*message_)[strings::msg_params][strings::success].asBool() == false) { - LOG4CXX_ERROR(logger_, "Success = false"); + SDL_LOG_ERROR("Success = false"); SendResponse(false); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_request.cc index 2ee7771833..6afa462f39 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_request.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SubscribeWayPointsRequest::SubscribeWayPointsRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,14 +56,13 @@ SubscribeWayPointsRequest::SubscribeWayPointsRequest( SubscribeWayPointsRequest::~SubscribeWayPointsRequest() {} void SubscribeWayPointsRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, - "An application with connection key " - << connection_key() << " is not registered."); + SDL_LOG_ERROR("An application with connection key " + << connection_key() << " is not registered."); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -83,12 +84,12 @@ void SubscribeWayPointsRequest::Run() { } void SubscribeWayPointsRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::Navigation_SubscribeWayPoints: { - LOG4CXX_INFO(logger_, "Received Navigation_SubscribeWayPoints event"); + SDL_LOG_INFO("Received Navigation_SubscribeWayPoints event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation); const hmi_apis::Common_Result::eType result_code = static_cast<hmi_apis::Common_Result::eType>( @@ -107,7 +108,7 @@ void SubscribeWayPointsRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); break; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_response.cc index 45486792d7..ab3fc0a4b8 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SubscribeWayPointsResponse::SubscribeWayPointsResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ SubscribeWayPointsResponse::SubscribeWayPointsResponse( SubscribeWayPointsResponse::~SubscribeWayPointsResponse() {} void SubscribeWayPointsResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_request.cc index 23604a6b93..502290328a 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_request.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SubtleAlertRequest::SubtleAlertRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -75,9 +77,9 @@ bool SubtleAlertRequest::Init() { // If soft buttons are present, SDL will not use initiate timeout tracking for // response. if (msg_params.keyExists(strings::soft_buttons)) { - LOG4CXX_INFO(logger_, - "Request contains soft buttons - request timeout " - "will be set to 0."); + SDL_LOG_INFO( + "Request contains soft buttons - request timeout " + "will be set to 0."); default_timeout_ = 0; } @@ -85,7 +87,7 @@ bool SubtleAlertRequest::Init() { } void SubtleAlertRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); uint32_t app_id = (*message_)[strings::params][strings::connection_key].asInt(); @@ -112,24 +114,24 @@ void SubtleAlertRequest::Run() { } void SubtleAlertRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::TTS_OnResetTimeout: case hmi_apis::FunctionID::UI_OnResetTimeout: { - LOG4CXX_INFO(logger_, - "Received UI_OnResetTimeout event " - " or TTS_OnResetTimeout event" - << awaiting_tts_speak_response_ << " " - << awaiting_tts_stop_speaking_response_ << " " - << awaiting_ui_subtle_alert_response_); + SDL_LOG_INFO( + "Received UI_OnResetTimeout event " + " or TTS_OnResetTimeout event" + << awaiting_tts_speak_response_ << " " + << awaiting_tts_stop_speaking_response_ << " " + << awaiting_ui_subtle_alert_response_); application_manager_.updateRequestTimeout( connection_key(), correlation_id(), default_timeout()); break; } case hmi_apis::FunctionID::UI_SubtleAlert: { - LOG4CXX_INFO(logger_, "Received UI_SubtleAlert event"); + SDL_LOG_INFO("Received UI_SubtleAlert event"); // Unsubscribe from event to avoid unwanted messages EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI); unsubscribe_from_event(hmi_apis::FunctionID::UI_SubtleAlert); @@ -154,7 +156,7 @@ void SubtleAlertRequest::on_event(const event_engine::Event& event) { break; } case hmi_apis::FunctionID::TTS_Speak: { - LOG4CXX_INFO(logger_, "Received TTS_Speak event"); + SDL_LOG_INFO("Received TTS_Speak event"); // Unsubscribe from event to avoid unwanted messages EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS); unsubscribe_from_event(hmi_apis::FunctionID::TTS_Speak); @@ -165,7 +167,7 @@ void SubtleAlertRequest::on_event(const event_engine::Event& event) { break; } case hmi_apis::FunctionID::TTS_StopSpeaking: { - LOG4CXX_INFO(logger_, "Received TTS_StopSpeaking event"); + SDL_LOG_INFO("Received TTS_StopSpeaking event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS); // Unsubscribe from event to avoid unwanted messages unsubscribe_from_event(hmi_apis::FunctionID::TTS_StopSpeaking); @@ -173,7 +175,7 @@ void SubtleAlertRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event" << event.id()); return; } } @@ -249,11 +251,11 @@ bool SubtleAlertRequest::PrepareResponseParameters( } bool SubtleAlertRequest::Validate(uint32_t app_id) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(app_id); if (!app) { - LOG4CXX_ERROR(logger_, "No application associated with session key"); + SDL_LOG_ERROR("No application associated with session key"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return false; } @@ -263,7 +265,7 @@ bool SubtleAlertRequest::Validate(uint32_t app_id) { app->AreCommandLimitsExceeded( static_cast<mobile_apis::FunctionID::eType>(function_id()), application_manager::TLimitSource::POLICY_TABLE)) { - LOG4CXX_ERROR(logger_, "SubtleAlert frequency is too high."); + SDL_LOG_ERROR("SubtleAlert frequency is too high."); SendResponse(false, mobile_apis::Result::REJECTED, "SubtleAlert frequency is too high."); @@ -284,7 +286,7 @@ bool SubtleAlertRequest::Validate(uint32_t app_id) { application_manager_); if (mobile_apis::Result::SUCCESS != processing_result) { - LOG4CXX_ERROR(logger_, "INVALID_DATA!"); + SDL_LOG_ERROR("INVALID_DATA!"); SendResponse(false, processing_result); return false; } @@ -293,7 +295,7 @@ bool SubtleAlertRequest::Validate(uint32_t app_id) { if ((!(*message_)[strings::msg_params].keyExists(strings::alert_text1)) && (!(*message_)[strings::msg_params].keyExists(strings::alert_text2)) && (!(*message_)[strings::msg_params].keyExists(strings::tts_chunks))) { - LOG4CXX_ERROR(logger_, "Mandatory parameters are missing"); + SDL_LOG_ERROR("Mandatory parameters are missing"); SendResponse(false, mobile_apis::Result::INVALID_DATA, "Mandatory parameters are missing"); @@ -307,9 +309,8 @@ bool SubtleAlertRequest::Validate(uint32_t app_id) { MessageHelper::VerifyTtsFiles(tts_chunks, app, application_manager_); if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) { - LOG4CXX_ERROR( - logger_, - "MessageHelper::VerifyTtsFiles return " << verification_result); + SDL_LOG_ERROR("MessageHelper::VerifyTtsFiles return " + << verification_result); SendResponse(false, mobile_apis::Result::FILE_NOT_FOUND, "One or more files needed for tts_chunks are not present"); @@ -321,7 +322,7 @@ bool SubtleAlertRequest::Validate(uint32_t app_id) { } void SubtleAlertRequest::SendSubtleAlertRequest(int32_t app_id) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(app_id); smart_objects::SmartObject msg_params = @@ -369,7 +370,7 @@ void SubtleAlertRequest::SendSubtleAlertRequest(int32_t app_id) { application_manager_); if (mobile_apis::Result::INVALID_DATA == verification_result) { - LOG4CXX_ERROR(logger_, "Image verification failed."); + SDL_LOG_ERROR("Image verification failed."); SendResponse(false, verification_result); return; } @@ -400,7 +401,7 @@ void SubtleAlertRequest::SendSubtleAlertRequest(int32_t app_id) { void SubtleAlertRequest::SendSpeakRequest(int32_t app_id, bool tts_chunks_exists, size_t length_tts_chunks) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace hmi_apis; using namespace smart_objects; // crate HMI speak request @@ -418,13 +419,13 @@ void SubtleAlertRequest::SendSpeakRequest(int32_t app_id, } bool SubtleAlertRequest::CheckStrings() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const char* str = NULL; if ((*message_)[strings::msg_params].keyExists(strings::alert_text1)) { str = (*message_)[strings::msg_params][strings::alert_text1].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid alert_text_1 syntax check failed"); + SDL_LOG_ERROR("Invalid alert_text_1 syntax check failed"); return false; } } @@ -432,7 +433,7 @@ bool SubtleAlertRequest::CheckStrings() { if ((*message_)[strings::msg_params].keyExists(strings::alert_text2)) { str = (*message_)[strings::msg_params][strings::alert_text2].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid alert_text_2 syntax check failed"); + SDL_LOG_ERROR("Invalid alert_text_2 syntax check failed"); return false; } } @@ -443,7 +444,7 @@ bool SubtleAlertRequest::CheckStrings() { for (size_t i = 0; i < tts_chunks_array.length(); ++i) { str = tts_chunks_array[i][strings::text].asCharArray(); if (strlen(str) && !CheckSyntax(str)) { - LOG4CXX_ERROR(logger_, "Invalid tts_chunks text syntax check failed"); + SDL_LOG_ERROR("Invalid tts_chunks text syntax check failed"); return false; } } @@ -452,7 +453,7 @@ bool SubtleAlertRequest::CheckStrings() { } bool SubtleAlertRequest::HasHmiResponsesToWait() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); return awaiting_ui_subtle_alert_response_ || awaiting_tts_speak_response_ || awaiting_tts_stop_speaking_response_; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_response.cc index ad9252997b..594a967877 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_response.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SubtleAlertResponse::SubtleAlertResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ SubtleAlertResponse::SubtleAlertResponse( SubtleAlertResponse::~SubtleAlertResponse() {} void SubtleAlertResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_request.cc index 033e70a29c..17e295304c 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_request.cc @@ -51,7 +51,7 @@ Copyright (c) 2018, Ford Motor Company namespace sdl_rpc_plugin { using namespace application_manager; -CREATE_LOGGERPTR_LOCAL(logger_, "ApplicationManager") +SDL_CREATE_LOG_VARIABLE("Commands") namespace { #ifdef ENABLE_LOG @@ -80,11 +80,10 @@ class QueryAppsDataValidator { : data_(object), manager_(manager) {} bool Validate() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if (!data_.isValid()) { - LOG4CXX_ERROR(logger_, - kQueryAppsValidationFailedPrefix - << "QueryApps response is not valid."); + SDL_LOG_ERROR(kQueryAppsValidationFailedPrefix + << "QueryApps response is not valid."); return false; } if (!HasResponseKey()) { @@ -96,10 +95,9 @@ class QueryAppsDataValidator { private: bool HasResponseKey() const { if (!data_.keyExists(json::response)) { - LOG4CXX_WARN(logger_, - kQueryAppsValidationFailedPrefix - << "QueryApps response does not contain '" - << json::response << "' parameter."); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "QueryApps response does not contain '" << json::response + << "' parameter."); return false; } return true; @@ -109,9 +107,8 @@ class QueryAppsDataValidator { smart_objects::SmartArray* objects_array = data_[json::response].asArray(); if (!objects_array) { - LOG4CXX_WARN(logger_, - kQueryAppsValidationFailedPrefix - << "QueryApps response is not array."); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "QueryApps response is not array."); return false; } @@ -125,16 +122,15 @@ class QueryAppsDataValidator { const smart_objects::SmartObject& app_data = *applications_iterator; if (!app_data.isValid()) { - LOG4CXX_WARN(logger_, - kQueryAppsValidationFailedPrefix - << "Wrong application data in json file."); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "Wrong application data in json file."); return false; } if (!CheckMandatoryParametersPresent(app_data)) { - LOG4CXX_WARN(logger_, - "Application hasn`t some of mandatory parameters. " - "Application will be skipped."); + SDL_LOG_WARN( + "Application hasn`t some of mandatory parameters. " + "Application will be skipped."); applications_iterator = objects_array->erase(applications_iterator); continue; @@ -153,12 +149,11 @@ class QueryAppsDataValidator { if (json::ios == os_type) { if (app_data[json::ios][json::urlScheme].asString().length() > kUrlSchemaLengthMax) { - LOG4CXX_WARN( - logger_, + SDL_LOG_WARN( kQueryAppsValidationFailedPrefix - << "An urlscheme length exceeds maximum allowed [" - << app_data[json::ios][json::urlScheme].asString().length() - << "]>[" << kUrlSchemaLengthMax << "]"); + << "An urlscheme length exceeds maximum allowed [" + << app_data[json::ios][json::urlScheme].asString().length() + << "]>[" << kUrlSchemaLengthMax << "]"); return false; } } @@ -166,23 +161,20 @@ class QueryAppsDataValidator { if (json::android == os_type) { if (app_data[json::android][json::packageName].asString().length() > kPackageNameLengthMax) { - LOG4CXX_WARN(logger_, - kQueryAppsValidationFailedPrefix - << "Package name length [" - << app_data[json::android][json::packageName] - .asString() - .length() - << "] exceeds max length [" << kPackageNameLengthMax - << "]in json file."); + SDL_LOG_WARN( + kQueryAppsValidationFailedPrefix + << "Package name length [" + << app_data[json::android][json::packageName].asString().length() + << "] exceeds max length [" << kPackageNameLengthMax + << "]in json file."); return false; } } // Languages verification if (!app_data[os_type].keyExists(json::languages)) { - LOG4CXX_WARN( - logger_, - kQueryAppsValidationFailedPrefix << "'languages' doesn't exist"); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "'languages' doesn't exist"); return false; } if (!ValidateLanguages(app_data[os_type][json::languages], @@ -199,18 +191,16 @@ class QueryAppsDataValidator { // Verify appid length const std::string app_id(app_data[json::appId].asString()); if (app_id.length() > kAppIdLengthMax) { - LOG4CXX_WARN(logger_, - kQueryAppsValidationFailedPrefix - << "An Object ID length exceeds maximum allowed [" - << app_id.length() << "]>[" << kAppIdLengthMax << "]"); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "An Object ID length exceeds maximum allowed [" + << app_id.length() << "]>[" << kAppIdLengthMax << "]"); return false; } // Verify that appid is unique if (applications_id_set_.find(app_id) != applications_id_set_.end()) { - LOG4CXX_WARN(logger_, - kQueryAppsValidationFailedPrefix - << "An Object ID is not unigue [" << app_id << "]"); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "An Object ID is not unigue [" << app_id << "]"); return false; } applications_id_set_.insert(app_id); @@ -219,18 +209,15 @@ class QueryAppsDataValidator { ApplicationSharedPtr registered_app = manager_.application_by_policy_id(app_id); if (registered_app) { - LOG4CXX_INFO( - logger_, - "Application with the id: " << app_id << " is already registered."); + SDL_LOG_INFO("Application with the id: " << app_id + << " is already registered."); } // And app name length const std::string appName(app_data[json::name].asString()); if (appName.length() > kAppNameLengthMax) { - LOG4CXX_WARN(logger_, - kQueryAppsValidationFailedPrefix - << "Name of application exceeds maximum allowed [" - << appName.length() << "]>[" << kAppNameLengthMax - << "]."); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "Name of application exceeds maximum allowed [" + << appName.length() << "]>[" << kAppNameLengthMax << "]."); return false; } return true; @@ -241,33 +228,29 @@ class QueryAppsDataValidator { bool default_language_found = false; const size_t languages_array_size = languages.length(); if (languages_array_size > kLanguageArraySizeMax) { - LOG4CXX_WARN(logger_, - kQueryAppsValidationFailedPrefix - << "'languages' array exceeds max size [" - << languages_array_size << "]>[" << kLanguageArraySizeMax - << "]"); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "'languages' array exceeds max size [" + << languages_array_size << "]>[" << kLanguageArraySizeMax + << "]"); return false; } // Every language has ttsname string and vrsynonyms array for (size_t idx = 0; idx < languages_array_size; ++idx) { const smart_objects::SmartObject& language = languages.getElement(idx); if (smart_objects::SmartType_Map != language.getType()) { - LOG4CXX_WARN( - logger_, - kQueryAppsValidationFailedPrefix << "language is not a map."); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "language is not a map."); return false; } if (language.length() != 1) { - LOG4CXX_WARN(logger_, - kQueryAppsValidationFailedPrefix - << "language map size is not equal 1."); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "language map size is not equal 1."); return false; } const std::string language_name = (*language.map_begin()).first; if (!language_name.length()) { - LOG4CXX_WARN( - logger_, - kQueryAppsValidationFailedPrefix << "language name is empty"); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "language name is empty"); return false; } // Verify default language defined @@ -280,9 +263,8 @@ class QueryAppsDataValidator { } // ttsName verification if (!language[language_name].keyExists(json::ttsName)) { - LOG4CXX_WARN(logger_, - kQueryAppsValidationFailedPrefix - << "'languages.ttsName' doesn't exist"); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "'languages.ttsName' doesn't exist"); return false; } const smart_objects::SmartObject& ttsNameObject = @@ -292,17 +274,15 @@ class QueryAppsDataValidator { const std::string ttsName = language[language_name][json::ttsName].asString(); if (ttsName.length() > kTtsNameLengthMax) { - LOG4CXX_WARN(logger_, - kQueryAppsValidationFailedPrefix - << "ttsName string exceeds max length [" - << ttsName.length() << "]>[" << kTtsNameLengthMax - << "]"); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "ttsName string exceeds max length [" + << ttsName.length() << "]>[" << kTtsNameLengthMax + << "]"); return false; } } else { - LOG4CXX_WARN(logger_, - kQueryAppsValidationFailedPrefix - << "ttsName is not the string type."); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "ttsName is not the string type."); return false; } @@ -311,9 +291,8 @@ class QueryAppsDataValidator { } } if (!default_language_found) { - LOG4CXX_WARN(logger_, - kQueryAppsValidationFailedPrefix - << " 'languages'.default' doesn't exist"); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << " 'languages'.default' doesn't exist"); return false; } return true; @@ -323,34 +302,29 @@ class QueryAppsDataValidator { const std::string& language_name, SynonymsMap& synonyms_map) const { if (!language[language_name].keyExists(json::vrSynonyms)) { - LOG4CXX_WARN(logger_, - kQueryAppsValidationFailedPrefix - << "'languages.vrSynonyms' doesn't exist"); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "'languages.vrSynonyms' doesn't exist"); return false; } const smart_objects::SmartArray* synonyms_array = language[language_name][json::vrSynonyms].asArray(); if (!synonyms_array) { - LOG4CXX_WARN( - logger_, - kQueryAppsValidationFailedPrefix << "vrSynonyms is not array."); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "vrSynonyms is not array."); return false; } const size_t synonyms_array_size = synonyms_array->size(); if (synonyms_array_size < kVrArraySizeMin) { - LOG4CXX_WARN(logger_, - kQueryAppsValidationFailedPrefix - << "vrSynomyms array has [" << synonyms_array_size - << "] size < allowed min size [" << kVrArraySizeMin - << "]"); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "vrSynomyms array has [" << synonyms_array_size + << "] size < allowed min size [" << kVrArraySizeMin << "]"); return false; } if (synonyms_array_size > kVrArraySizeMax) { - LOG4CXX_WARN(logger_, - kQueryAppsValidationFailedPrefix - << "vrSynomyms array size [" << synonyms_array_size - << "] exceeds maximum allowed size [" << kVrArraySizeMax - << "]"); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "vrSynomyms array size [" << synonyms_array_size + << "] exceeds maximum allowed size [" << kVrArraySizeMax + << "]"); return false; } @@ -358,19 +332,17 @@ class QueryAppsDataValidator { const smart_objects::SmartObject& synonym = (*synonyms_array)[idx]; const std::string vrSynonym = synonym.asString(); if (vrSynonym.length() > kVrSynonymLengthMax) { - LOG4CXX_WARN(logger_, - kQueryAppsValidationFailedPrefix - << "vrSYnomym item [" << idx - << "] exceeds max length [" << vrSynonym.length() - << "]>[" << kVrSynonymLengthMax << "]"); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "vrSYnomym item [" << idx << "] exceeds max length [" + << vrSynonym.length() << "]>[" << kVrSynonymLengthMax + << "]"); return false; } if (vrSynonym.length() < kVrSynonymLengthMin) { - LOG4CXX_WARN(logger_, - kQueryAppsValidationFailedPrefix - << "vrSYnomym item [" << idx << "] length [" - << vrSynonym.length() << "] is less then min length [" - << kVrSynonymLengthMin << "] allowed."); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "vrSYnomym item [" << idx << "] length [" + << vrSynonym.length() << "] is less then min length [" + << kVrSynonymLengthMin << "] allowed."); return false; } // Verify duplicates @@ -378,11 +350,10 @@ class QueryAppsDataValidator { synonyms_map.find(language_name); if (synonyms_map_iter != synonyms_map.end()) { if (!(*synonyms_map_iter).second.insert(vrSynonym).second) { - LOG4CXX_WARN(logger_, - kQueryAppsValidationFailedPrefix - << "vrSYnomym item already defined [" - << vrSynonym.c_str() << "] for language [" - << language_name << "]"); + SDL_LOG_WARN(kQueryAppsValidationFailedPrefix + << "vrSYnomym item already defined [" + << vrSynonym.c_str() << "] for language [" + << language_name << "]"); return false; } } @@ -449,13 +420,13 @@ SystemRequest::SystemRequest( SystemRequest::~SystemRequest() {} void SystemRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr application = application_manager_.application(connection_key()); if (application.use_count() == 0) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -473,14 +444,12 @@ void SystemRequest::Run() { if (!policy_handler.IsRequestTypeAllowed( application->device(), application->policy_app_id(), request_type)) { - LOG4CXX_ERROR(logger_, - "RequestType " << stringified_request_type + SDL_LOG_ERROR("RequestType " << stringified_request_type << " is DISALLOWED by policies"); SendResponse(false, mobile_apis::Result::DISALLOWED); return; } - LOG4CXX_TRACE(logger_, - "RequestType " << stringified_request_type << " is ALLOWED"); + SDL_LOG_TRACE("RequestType " << stringified_request_type << " is ALLOWED"); const bool request_subtype_present = (*message_)[strings::msg_params].keyExists(strings::request_subtype); @@ -489,14 +458,12 @@ void SystemRequest::Run() { (*message_)[strings::msg_params][strings::request_subtype].asString(); if (!policy_handler.IsRequestSubTypeAllowed(application->policy_app_id(), request_subtype)) { - LOG4CXX_ERROR(logger_, - "Request subtype: " << request_subtype + SDL_LOG_ERROR("Request subtype: " << request_subtype << " is DISALLOWED by policies"); SendResponse(false, mobile_apis::Result::DISALLOWED); return; } - LOG4CXX_TRACE(logger_, - "Request subtype: " << request_subtype << " is ALLOWED"); + SDL_LOG_TRACE("Request subtype: " << request_subtype << " is ALLOWED"); } std::string file_name = kSYNC; @@ -507,8 +474,7 @@ void SystemRequest::Run() { } if (!CheckSyntax(file_name)) { - LOG4CXX_ERROR(logger_, - "Incoming request contains \t\n \\t \\n or whitespace"); + SDL_LOG_ERROR("Incoming request contains \t\n \\t \\n or whitespace"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -516,7 +482,7 @@ void SystemRequest::Run() { if (!file_system::IsFileNameValid(file_name) && mobile_apis::RequestType::ICON_URL != request_type) { const std::string err_msg = "Sync file name contains forbidden symbols."; - LOG4CXX_ERROR(logger_, err_msg); + SDL_LOG_ERROR(err_msg); SendResponse(false, mobile_apis::Result::INVALID_DATA, err_msg.c_str()); return; } @@ -547,7 +513,7 @@ void SystemRequest::Run() { SendResponse(false, mobile_apis::Result::INVALID_DATA, err_msg.c_str()); return; } - LOG4CXX_DEBUG(logger_, "Got ICON_URL Request. File name: " << file_name); + SDL_LOG_DEBUG("Got ICON_URL Request. File name: " << file_name); } else { binary_data_folder = application_manager_.get_settings().system_files_path(); @@ -566,13 +532,12 @@ void SystemRequest::Run() { file_dst_path += file_name; if ((*message_)[strings::params].keyExists(strings::binary_data)) { - LOG4CXX_DEBUG( - logger_, + SDL_LOG_DEBUG( "Binary data is present. Trying to save it to: " << binary_data_folder); if (mobile_apis::Result::SUCCESS != (application_manager_.SaveBinary( binary_data, binary_data_folder, file_name, 0))) { - LOG4CXX_DEBUG(logger_, "Binary data can't be saved."); + SDL_LOG_DEBUG("Binary data can't be saved."); SendResponse(false, mobile_apis::Result::GENERIC_ERROR); return; } @@ -580,23 +545,22 @@ void SystemRequest::Run() { std::string app_full_file_path = binary_data_folder; app_full_file_path += file_name; - LOG4CXX_DEBUG(logger_, - "Binary data is not present. Trying to find file " - << file_name << " within previously saved app file in " - << binary_data_folder); + SDL_LOG_DEBUG("Binary data is not present. Trying to find file " + << file_name << " within previously saved app file in " + << binary_data_folder); const application_manager::AppFile* file = application->GetFile(app_full_file_path); if (!file || !file->is_download_complete || !file_system::MoveFile(app_full_file_path, file_dst_path)) { - LOG4CXX_DEBUG(logger_, "Binary data not found."); + SDL_LOG_DEBUG("Binary data not found."); SendResponse(false, mobile_apis::Result::REJECTED); return; } processing_file_ = file_dst_path; } - LOG4CXX_DEBUG(logger_, "Binary data ok."); + SDL_LOG_DEBUG("Binary data ok."); if (mobile_apis::RequestType::ICON_URL == request_type) { application_manager_.SetIconFileFromSystemRequest(file_name); @@ -620,7 +584,7 @@ void SystemRequest::Run() { Json::Value root; if (!reader.parse(json, &root)) { - LOG4CXX_DEBUG(logger_, "Unable to parse query_app json file. "); + SDL_LOG_DEBUG("Unable to parse query_app json file. "); return; } @@ -662,7 +626,7 @@ void SystemRequest::Run() { } void SystemRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); using namespace helpers; const smart_objects::SmartObject& message = event.smart_object(); @@ -683,7 +647,7 @@ void SystemRequest::on_event(const event_engine::Event& event) { application_manager_.application(connection_key()); if (application.use_count() == 0) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); return; } @@ -696,7 +660,7 @@ void SystemRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); return; } } @@ -705,16 +669,14 @@ void SystemRequest::on_event(const event_engine::Event& event) { bool SystemRequest::ValidateQueryAppData( smart_objects::SmartObject& data) const { if (!data.isValid()) { - LOG4CXX_ERROR( - logger_, - kQueryAppsValidationFailedPrefix << "QueryApps response is not valid."); + SDL_LOG_ERROR(kQueryAppsValidationFailedPrefix + << "QueryApps response is not valid."); return false; } if (!data.keyExists(json::response)) { - LOG4CXX_ERROR(logger_, - kQueryAppsValidationFailedPrefix - << "QueryApps response does not contain '" - << json::response << "' parameter."); + SDL_LOG_ERROR(kQueryAppsValidationFailedPrefix + << "QueryApps response does not contain '" << json::response + << "' parameter."); return false; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_response.cc index 428901a1c5..00b0cd3b5e 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + SystemResponse::SystemResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ SystemResponse::SystemResponse( SystemResponse::~SystemResponse() {} void SystemResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_request.cc index 3ba0513aeb..10f808b771 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_request.cc @@ -40,12 +40,14 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + void UnregisterAppInterfaceRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); if (!application_manager_.application(connection_key())) { SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_response.cc index 7c90639968..28d05bef73 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_response.cc @@ -38,8 +38,10 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + void UnregisterAppInterfaceResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendResponse((*message_)[strings::msg_params][strings::success].asBool()); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_request.cc index ec8de68c9e..69f85568eb 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_request.cc @@ -41,6 +41,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + namespace str = strings; UnsubscribeButtonRequest::UnsubscribeButtonRequest( @@ -58,12 +60,12 @@ UnsubscribeButtonRequest::UnsubscribeButtonRequest( UnsubscribeButtonRequest::~UnsubscribeButtonRequest() {} void UnsubscribeButtonRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, "APPLICATION_NOT_REGISTERED"); + SDL_LOG_ERROR("APPLICATION_NOT_REGISTERED"); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -78,23 +80,22 @@ void UnsubscribeButtonRequest::Run() { bool play_pause_supported = CheckHMICapabilities(mobile_apis::ButtonName::PLAY_PAUSE); if (play_pause_supported) { - LOG4CXX_DEBUG(logger_, "Converting Legacy OK button to PLAY_PAUSE"); + SDL_LOG_DEBUG("Converting Legacy OK button to PLAY_PAUSE"); btn_id = mobile_apis::ButtonName::PLAY_PAUSE; (*message_)[str::msg_params][str::button_name] = btn_id; } else if (!ok_supported) { - LOG4CXX_ERROR(logger_, "OK button isn't allowed by HMI capabilities"); + SDL_LOG_ERROR("OK button isn't allowed by HMI capabilities"); SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE); } } else if (!CheckHMICapabilities(btn_id)) { - LOG4CXX_ERROR(logger_, - "Button " << btn_id << " isn't allowed by HMI capabilities"); + SDL_LOG_ERROR("Button " << btn_id << " isn't allowed by HMI capabilities"); SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE); return; } if (!app->UnsubscribeFromButton( static_cast<mobile_apis::ButtonName::eType>(btn_id))) { - LOG4CXX_ERROR(logger_, "App doesn't subscribe to button " << btn_id); + SDL_LOG_ERROR("App doesn't subscribe to button " << btn_id); SendResponse(false, mobile_apis::Result::IGNORED); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_response.cc index c69d49bca1..8321840899 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UnsubscribeButtonResponse::UnsubscribeButtonResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,12 +56,12 @@ UnsubscribeButtonResponse::UnsubscribeButtonResponse( UnsubscribeButtonResponse::~UnsubscribeButtonResponse() {} void UnsubscribeButtonResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); // check if response false if (true == (*message_)[strings::msg_params].keyExists(strings::success)) { if ((*message_)[strings::msg_params][strings::success].asBool() == false) { - LOG4CXX_ERROR(logger_, "Success = false"); + SDL_LOG_ERROR("Success = false"); SendResponse(false); return; } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_request.cc index 17326a99a0..b15bbc5c56 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_request.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UnsubscribeWayPointsRequest::UnsubscribeWayPointsRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,14 +56,13 @@ UnsubscribeWayPointsRequest::UnsubscribeWayPointsRequest( UnsubscribeWayPointsRequest::~UnsubscribeWayPointsRequest() {} void UnsubscribeWayPointsRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (!app) { - LOG4CXX_ERROR(logger_, - "An application with connection key " - << connection_key() << " is not registered."); + SDL_LOG_ERROR("An application with connection key " + << connection_key() << " is not registered."); SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); return; } @@ -88,12 +89,12 @@ void UnsubscribeWayPointsRequest::Run() { } void UnsubscribeWayPointsRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application(connection_key()); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints: { - LOG4CXX_INFO(logger_, "Received Navigation_UnsubscribeWayPoints event"); + SDL_LOG_INFO("Received Navigation_UnsubscribeWayPoints event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation); const hmi_apis::Common_Result::eType result_code = static_cast<hmi_apis::Common_Result::eType>( @@ -112,7 +113,7 @@ void UnsubscribeWayPointsRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); break; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_response.cc index a7a180fb46..beb7ef695d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_response.cc @@ -39,6 +39,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UnsubscribeWayPointsResponse::UnsubscribeWayPointsResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ UnsubscribeWayPointsResponse::UnsubscribeWayPointsResponse( UnsubscribeWayPointsResponse::~UnsubscribeWayPointsResponse() {} void UnsubscribeWayPointsResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_request.cc index 8c2cce9765..824d1150b3 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_request.cc @@ -46,6 +46,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + namespace custom_str = utils::custom_string; UpdateTurnListRequest::UpdateTurnListRequest( @@ -63,20 +65,19 @@ UpdateTurnListRequest::UpdateTurnListRequest( UpdateTurnListRequest::~UpdateTurnListRequest() {} void UpdateTurnListRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); ApplicationSharedPtr app = application_manager_.application( (*message_)[strings::params][strings::connection_key].asUInt()); if (!app) { SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); - LOG4CXX_ERROR(logger_, "Application is not registered"); + SDL_LOG_ERROR("Application is not registered"); return; } if (IsWhiteSpaceExist()) { - LOG4CXX_ERROR(logger_, - "Incoming update turn list has contains \t\n \\t \\n"); + SDL_LOG_ERROR("Incoming update turn list has contains \t\n \\t \\n"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -90,7 +91,7 @@ void UpdateTurnListRequest::Run() { application_manager_); if (mobile_apis::Result::SUCCESS != processing_result) { - LOG4CXX_ERROR(logger_, "INVALID_DATA!"); + SDL_LOG_ERROR("INVALID_DATA!"); SendResponse(false, processing_result); return; } @@ -104,8 +105,7 @@ void UpdateTurnListRequest::Run() { MessageHelper::VerifyImage(turn_list_array[i][strings::turn_icon], app, application_manager_))) { - LOG4CXX_ERROR(logger_, - "MessageHelper::VerifyImage return INVALID_DATA"); + SDL_LOG_ERROR("MessageHelper::VerifyImage return INVALID_DATA"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -118,7 +118,7 @@ void UpdateTurnListRequest::Run() { if ((*message_)[strings::msg_params].keyExists(strings::turn_list)) { if (!CheckTurnListArray()) { - LOG4CXX_ERROR(logger_, "INVALID_DATA!"); + SDL_LOG_ERROR("INVALID_DATA!"); SendResponse(false, mobile_apis::Result::INVALID_DATA); return; } @@ -152,18 +152,18 @@ void UpdateTurnListRequest::Run() { hmi_apis::FunctionID::Navigation_UpdateTurnList, &msg_params, true); } else { // conditional mandatory - LOG4CXX_ERROR(logger_, "INVALID_DATA!"); + SDL_LOG_ERROR("INVALID_DATA!"); SendResponse(false, mobile_apis::Result::INVALID_DATA); } } void UpdateTurnListRequest::on_event(const event_engine::Event& event) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const smart_objects::SmartObject& message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::Navigation_UpdateTurnList: { - LOG4CXX_INFO(logger_, "Received Navigation_UpdateTurnList event"); + SDL_LOG_INFO("Received Navigation_UpdateTurnList event"); EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation); const hmi_apis::Common_Result::eType result_code = static_cast<hmi_apis::Common_Result::eType>( @@ -179,7 +179,7 @@ void UpdateTurnListRequest::on_event(const event_engine::Event& event) { break; } default: { - LOG4CXX_ERROR(logger_, "Received unknown event" << event.id()); + SDL_LOG_ERROR("Received unknown event " << event.id()); break; } } @@ -204,7 +204,7 @@ bool UpdateTurnListRequest::CheckTurnListArray() { } bool UpdateTurnListRequest::IsWhiteSpaceExist() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); const char* str = NULL; if ((*message_)[strings::msg_params].keyExists(strings::turn_list)) { @@ -218,8 +218,7 @@ bool UpdateTurnListRequest::IsWhiteSpaceExist() { if ((*it_tl).keyExists(strings::navigation_text)) { str = (*it_tl)[strings::navigation_text].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR( - logger_, + SDL_LOG_ERROR( "Invalid turn_list navigation_text text syntax check failed"); return true; } @@ -228,8 +227,8 @@ bool UpdateTurnListRequest::IsWhiteSpaceExist() { if ((*it_tl).keyExists(strings::turn_icon)) { str = (*it_tl)[strings::turn_icon][strings::value].asCharArray(); if (!CheckSyntax(str)) { - LOG4CXX_ERROR( - logger_, "Invalid turn_list turn_icon value syntax check failed"); + SDL_LOG_ERROR( + "Invalid turn_list turn_icon value syntax check failed"); return true; } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc index eca9e3703c..bedf91b45c 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc @@ -40,6 +40,8 @@ using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UpdateTurnListResponse::UpdateTurnListResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ UpdateTurnListResponse::UpdateTurnListResponse( UpdateTurnListResponse::~UpdateTurnListResponse() {} void UpdateTurnListResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } |