diff options
author | VladSemenyuk <VSemenyuk@luxoft.com> | 2020-09-01 20:35:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-01 13:35:06 -0400 |
commit | 062d3b0f2a6eb2185d14dc80a885cdfe4860ce23 (patch) | |
tree | 766c4725b8b129cec2d420ff65ae7e9731e91194 /src/components/application_manager/rpc_plugins/app_service_rpc_plugin | |
parent | 79fb6408810d776278bf3499c5273eb04159b076 (diff) | |
download | sdl_core-062d3b0f2a6eb2185d14dc80a885cdfe4860ce23.tar.gz |
[SDL 0046] Implement logger abstraction (#3472)
* Implement logger abstraction. Integrate it to SDL.
Create one logger instance for shared libraries
* Rename all logger macros.
* Update src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc
Co-authored-by: Shobhit Adlakha <ShobhitAd@users.noreply.github.com>
* Fix review comments(errors in log messages)
* Fix review coments
* Fix code style
* Add logger variable creation to new commads
* Fix review comment
* Fixe review comment(class imblemtation moved to .cc file)
Co-authored-by: Shobhit Adlakha <ShobhitAd@users.noreply.github.com>
Diffstat (limited to 'src/components/application_manager/rpc_plugins/app_service_rpc_plugin')
40 files changed, 173 insertions, 120 deletions
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/app_service_rpc_plugin.h b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/app_service_rpc_plugin.h index 5d85237899..444636ed75 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/app_service_rpc_plugin.h +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/app_service_rpc_plugin.h @@ -34,6 +34,7 @@ #define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_APP_SERVICE_PLUGIN_INCLUDE_APP_SERVICE_PLUGIN_APP_SERVICE_RPC_PLUGIN_H #include "application_manager/command_factory.h" +#include "utils/ilogger.h" namespace app_service_rpc_plugin { namespace app_mngr = application_manager; @@ -75,7 +76,8 @@ class AppServiceRpcPlugin : public plugins::RPCPlugin { }; } // namespace app_service_rpc_plugin -extern "C" application_manager::plugin_manager::RPCPlugin* Create(); +extern "C" application_manager::plugin_manager::RPCPlugin* Create( + logger::Logger* logger_instance); extern "C" void Delete(application_manager::plugin_manager::RPCPlugin* data); #endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_APP_SERVICE_PLUGIN_INCLUDE_APP_SERVICE_PLUGIN_APP_SERVICE_PLUGIN_H diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_app_extension.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_app_extension.cc index 87f947d250..5d5e96fdb7 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_app_extension.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_app_extension.cc @@ -33,7 +33,7 @@ #include "app_service_rpc_plugin/app_service_app_extension.h" #include "app_service_rpc_plugin/app_service_rpc_plugin.h" -CREATE_LOGGERPTR_GLOBAL(logger_, "AppServiceRpcPlugin") +SDL_CREATE_LOG_VARIABLE("AppServiceRpcPlugin") namespace app_service_rpc_plugin { @@ -44,22 +44,22 @@ AppServiceAppExtension::AppServiceAppExtension( : app_mngr::AppExtension(AppServiceAppExtensionUID) , plugin_(plugin) , app_(app) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); } AppServiceAppExtension::~AppServiceAppExtension() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); } bool AppServiceAppExtension::SubscribeToAppService( const std::string app_service_type) { - LOG4CXX_DEBUG(logger_, "Subscribe to app service: " << app_service_type); + SDL_LOG_DEBUG("Subscribe to app service: " << app_service_type); return subscribed_data_.insert(app_service_type).second; } bool AppServiceAppExtension::UnsubscribeFromAppService( const std::string app_service_type) { - LOG4CXX_DEBUG(logger_, app_service_type); + SDL_LOG_DEBUG(app_service_type); auto it = subscribed_data_.find(app_service_type); if (it != subscribed_data_.end()) { subscribed_data_.erase(it); @@ -69,14 +69,13 @@ bool AppServiceAppExtension::UnsubscribeFromAppService( } void AppServiceAppExtension::UnsubscribeFromAppService() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); subscribed_data_.clear(); } bool AppServiceAppExtension::IsSubscribedToAppService( const std::string app_service_type) const { - LOG4CXX_DEBUG(logger_, - "isSubscribedToAppService for type: " << app_service_type); + SDL_LOG_DEBUG("isSubscribedToAppService for type: " << app_service_type); return subscribed_data_.find(app_service_type) != subscribed_data_.end(); } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_command_factory.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_command_factory.cc index 8ce4d10b6e..ff40b587cb 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_command_factory.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_command_factory.cc @@ -32,7 +32,7 @@ #include "app_service_rpc_plugin/app_service_command_factory.h" -CREATE_LOGGERPTR_GLOBAL(logger_, "AppServiceRpcPlugin") +SDL_CREATE_LOG_VARIABLE("AppServiceRpcPlugin") namespace app_service_rpc_plugin { @@ -45,11 +45,11 @@ AppServiceCommandFactory::AppServiceCommandFactory( application_manager, rpc_service, hmi_capabilities, policy_handler)) , mobile_command_factory_(new AppServiceMobileCommandFactory( application_manager, rpc_service, hmi_capabilities, policy_handler)) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); } AppServiceCommandFactory::~AppServiceCommandFactory() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); } app_mngr::CommandSharedPtr AppServiceCommandFactory::CreateCommand( @@ -66,8 +66,7 @@ app_mngr::CommandSharedPtr AppServiceCommandFactory::CreateCommand( bool AppServiceCommandFactory::IsAbleToProcess( const int32_t function_id, const commands::Command::CommandSource source) const { - LOG4CXX_DEBUG(logger_, - "AppServiceCommandFactory::IsAbleToProcess" << function_id + SDL_LOG_DEBUG("AppServiceCommandFactory::IsAbleToProcess" << function_id << " " << source); return (commands::Command::SOURCE_HMI == source || commands::Command::SOURCE_SDL_TO_HMI == source) diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_hmi_command_factory.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_hmi_command_factory.cc index 3090ea8ced..1e468242af 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_hmi_command_factory.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_hmi_command_factory.cc @@ -55,7 +55,7 @@ #include "app_service_rpc_plugin/commands/hmi/on_as_app_service_data_notification.h" #include "app_service_rpc_plugin/commands/hmi/on_as_app_service_data_notification_from_hmi.h" -CREATE_LOGGERPTR_GLOBAL(logger_, "AppServiceRpcPlugin") +SDL_CREATE_LOG_VARIABLE("AppServiceRpcPlugin") namespace app_service_rpc_plugin { namespace strings = app_mngr::strings; @@ -69,7 +69,7 @@ AppServiceHmiCommandFactory::AppServiceHmiCommandFactory( , rpc_service_(rpc_service) , hmi_capabilities_(hmi_capabilities) , policy_handler_(policy_handler) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); } app_mngr::CommandSharedPtr AppServiceHmiCommandFactory::CreateCommand( @@ -95,9 +95,8 @@ app_mngr::CommandSharedPtr AppServiceHmiCommandFactory::CreateCommand( } UNUSED(message_type_str); - LOG4CXX_DEBUG(logger_, - "HMICommandFactory::CreateCommand function_id: " - << function_id << ", message type: " << message_type_str); + SDL_LOG_DEBUG("HMICommandFactory::CreateCommand function_id: " + << function_id << ", message type: " << message_type_str); return buildCommandCreator(function_id, message_type, source).create(message); } @@ -105,8 +104,7 @@ app_mngr::CommandSharedPtr AppServiceHmiCommandFactory::CreateCommand( bool AppServiceHmiCommandFactory::IsAbleToProcess( const int32_t function_id, const app_mngr::commands::Command::CommandSource source) const { - LOG4CXX_DEBUG(logger_, - "HMI App Service Plugin IsAbleToProcess: " << function_id); + SDL_LOG_DEBUG("HMI App Service Plugin IsAbleToProcess: " << function_id); UNUSED(source); return buildCommandCreator( function_id, hmi_apis::messageType::INVALID_ENUM, source) @@ -120,8 +118,7 @@ app_mngr::CommandCreator& AppServiceHmiCommandFactory::buildCommandCreator( auto factory = app_mngr::CommandCreatorFactory( application_manager_, rpc_service_, hmi_capabilities_, policy_handler_); - LOG4CXX_DEBUG(logger_, - "buildCommandCreator: " << function_id << " " << source); + SDL_LOG_DEBUG("buildCommandCreator: " << function_id << " " << source); switch (function_id) { case hmi_apis::FunctionID::AppService_PublishAppService: @@ -191,7 +188,7 @@ app_mngr::CommandCreator& AppServiceHmiCommandFactory::buildCommandCreator( : factory.GetCreator< commands::ASGetActiveServiceConsentResponse>(); default: - LOG4CXX_WARN(logger_, "Unsupported HMI function_id: " << function_id); + SDL_LOG_WARN("Unsupported HMI function_id: " << function_id); } return factory.GetCreator<app_mngr::InvalidCommand>(); } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc index 5c44fb5fae..4a2fe5c2c9 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc @@ -50,7 +50,7 @@ #include "app_service_rpc_plugin/commands/mobile/unpublish_app_service_request.h" #include "app_service_rpc_plugin/commands/mobile/unpublish_app_service_response.h" -CREATE_LOGGERPTR_GLOBAL(logger_, "AppServiceRpcPlugin") +SDL_CREATE_LOG_VARIABLE("AppServiceRpcPlugin") namespace app_service_rpc_plugin { namespace strings = app_mngr::strings; @@ -64,7 +64,7 @@ AppServiceMobileCommandFactory::AppServiceMobileCommandFactory( , rpc_service_(rpc_service) , hmi_capabilities_(hmi_capabilities) , policy_handler_(policy_handler) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); } app_mngr::CommandSharedPtr AppServiceMobileCommandFactory::CreateCommand( @@ -88,9 +88,8 @@ app_mngr::CommandSharedPtr AppServiceMobileCommandFactory::CreateCommand( } UNUSED(message_type_str); - LOG4CXX_DEBUG(logger_, - "HMICommandFactory::CreateCommand function_id: " - << function_id << ", message type: " << message_type_str); + SDL_LOG_DEBUG("HMICommandFactory::CreateCommand function_id: " + << function_id << ", message type: " << message_type_str); return buildCommandCreator(function_id, message_type, source).create(message); } @@ -170,7 +169,7 @@ app_mngr::CommandCreator& AppServiceMobileCommandFactory::buildCommandCreator( } break; default: - LOG4CXX_WARN(logger_, "Unsupported function_id: " << function_id); + SDL_LOG_WARN("Unsupported function_id: " << function_id); } return factory.GetCreator<app_mngr::InvalidCommand>(); } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_rpc_plugin.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_rpc_plugin.cc index 1c3a9c77c5..fd7b03fabc 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_rpc_plugin.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_rpc_plugin.cc @@ -38,7 +38,7 @@ #include "application_manager/smart_object_keys.h" namespace app_service_rpc_plugin { -CREATE_LOGGERPTR_GLOBAL(logger_, "AppServiceRpcPlugin") +SDL_CREATE_LOG_VARIABLE("AppServiceRpcPlugin") namespace strings = application_manager::strings; namespace plugins = application_manager::plugin_manager; @@ -109,12 +109,12 @@ void AppServiceRpcPlugin::DeleteSubscriptions( extern "C" __attribute__((visibility("default"))) application_manager::plugin_manager::RPCPlugin* -Create() { +Create(logger::Logger* logger_instance) { + logger::Logger::instance(logger_instance); return new app_service_rpc_plugin::AppServiceRpcPlugin(); } extern "C" __attribute__((visibility("default"))) void Delete( application_manager::plugin_manager::RPCPlugin* data) { delete data; - DELETE_THREAD_LOGGER(app_service_rpc_plugin::logger_); } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_app_service_activation_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_app_service_activation_request.cc index fd7312ca98..d9cf7acf1b 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_app_service_activation_request.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_app_service_activation_request.cc @@ -38,6 +38,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ASAppServiceActivationRequest::ASAppServiceActivationRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ ASAppServiceActivationRequest::ASAppServiceActivationRequest( ASAppServiceActivationRequest::~ASAppServiceActivationRequest() {} void ASAppServiceActivationRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); AppServiceManager& service_manager = application_manager_.GetAppServiceManager(); smart_objects::SmartObject params = (*message_)[strings::msg_params]; diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_app_service_activation_response.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_app_service_activation_response.cc index c77d3ed381..434fad51e9 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_app_service_activation_response.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_app_service_activation_response.cc @@ -36,6 +36,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ASAppServiceActivationResponse::ASAppServiceActivationResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ ASAppServiceActivationResponse::ASAppServiceActivationResponse( ASAppServiceActivationResponse::~ASAppServiceActivationResponse() {} void ASAppServiceActivationResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToHMI(message_); } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_active_service_consent_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_active_service_consent_request.cc index b1f3d6fdbf..e80c5f741c 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_active_service_consent_request.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_active_service_consent_request.cc @@ -36,6 +36,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ASGetActiveServiceConsentRequest::ASGetActiveServiceConsentRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ ASGetActiveServiceConsentRequest::ASGetActiveServiceConsentRequest( ASGetActiveServiceConsentRequest::~ASGetActiveServiceConsentRequest() {} void ASGetActiveServiceConsentRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_active_service_consent_response.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_active_service_consent_response.cc index 038c2922ad..5e59c9f3ab 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_active_service_consent_response.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_active_service_consent_response.cc @@ -36,6 +36,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ASGetActiveServiceConsentResponse::ASGetActiveServiceConsentResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ ASGetActiveServiceConsentResponse::ASGetActiveServiceConsentResponse( ASGetActiveServiceConsentResponse::~ASGetActiveServiceConsentResponse() {} void ASGetActiveServiceConsentResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event( hmi_apis::FunctionID::AppService_GetActiveServiceConsent); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc index e03c0ad15a..32fccb0192 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc @@ -43,6 +43,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ASGetAppServiceDataRequestFromHMI::ASGetAppServiceDataRequestFromHMI( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -58,12 +60,12 @@ ASGetAppServiceDataRequestFromHMI::ASGetAppServiceDataRequestFromHMI( ASGetAppServiceDataRequestFromHMI::~ASGetAppServiceDataRequestFromHMI() {} void ASGetAppServiceDataRequestFromHMI::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); std::string service_type = (*message_)[strings::msg_params][strings::service_type].asString(); - LOG4CXX_DEBUG(logger_, "Get Service Type: " << service_type); + SDL_LOG_DEBUG("Get Service Type: " << service_type); SendProviderRequest(mobile_apis::FunctionID::GetAppServiceDataID, hmi_apis::FunctionID::AppService_GetAppServiceData, @@ -172,8 +174,7 @@ void ASGetAppServiceDataRequestFromHMI::GetMediaImagePaths( bool ASGetAppServiceDataRequestFromHMI::ValidateResponse( smart_objects::SmartObject& message_params) { if (!message_params.keyExists(strings::service_data)) { - LOG4CXX_DEBUG( - logger_, + SDL_LOG_DEBUG( "GASD response received without any service data, passing through"); return true; } @@ -185,8 +186,7 @@ bool ASGetAppServiceDataRequestFromHMI::ValidateResponse( auto service = application_manager_.GetAppServiceManager().FindServiceByID(service_id); if (!service) { - LOG4CXX_ERROR(logger_, - "GASD response received with an unpublished service ID"); + SDL_LOG_ERROR("GASD response received with an unpublished service ID"); SendErrorResponse( correlation_id(), hmi_apis::FunctionID::AppService_GetAppServiceData, @@ -202,8 +202,7 @@ bool ASGetAppServiceDataRequestFromHMI::ValidateResponse( service_type, &service_type_value)) { auto app = application_manager_.application(service->connection_key); if (!app) { - LOG4CXX_ERROR(logger_, - "Failed to find service provider for GASD response"); + SDL_LOG_ERROR("Failed to find service provider for GASD response"); SendErrorResponse( correlation_id(), hmi_apis::FunctionID::AppService_GetAppServiceData, @@ -277,7 +276,7 @@ void ASGetAppServiceDataRequestFromHMI::on_event( } void ASGetAppServiceDataRequestFromHMI::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendErrorResponse(correlation_id(), hmi_apis::FunctionID::AppService_GetAppServiceData, hmi_apis::Common_Result::GENERIC_ERROR, diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_to_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_to_hmi.cc index 635cd7319a..e0b99105d7 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_to_hmi.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_to_hmi.cc @@ -38,6 +38,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ASGetAppServiceDataRequestToHMI::ASGetAppServiceDataRequestToHMI( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ ASGetAppServiceDataRequestToHMI::ASGetAppServiceDataRequestToHMI( ASGetAppServiceDataRequestToHMI::~ASGetAppServiceDataRequestToHMI() {} void ASGetAppServiceDataRequestToHMI::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_response_from_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_response_from_hmi.cc index c0b1b274fb..853c382f46 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_response_from_hmi.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_response_from_hmi.cc @@ -41,6 +41,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ASGetAppServiceDataResponseFromHMI::ASGetAppServiceDataResponseFromHMI( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,7 +58,7 @@ ASGetAppServiceDataResponseFromHMI::ASGetAppServiceDataResponseFromHMI( ASGetAppServiceDataResponseFromHMI::~ASGetAppServiceDataResponseFromHMI() {} void ASGetAppServiceDataResponseFromHMI::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event(hmi_apis::FunctionID::AppService_GetAppServiceData); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_response_to_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_response_to_hmi.cc index b489ec4765..6c53feb68f 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_response_to_hmi.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_response_to_hmi.cc @@ -38,6 +38,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ASGetAppServiceDataResponseToHMI::ASGetAppServiceDataResponseToHMI( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ ASGetAppServiceDataResponseToHMI::ASGetAppServiceDataResponseToHMI( ASGetAppServiceDataResponseToHMI::~ASGetAppServiceDataResponseToHMI() {} void ASGetAppServiceDataResponseToHMI::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToHMI(message_); } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_request.cc index fa704c1995..ac3666bf2e 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_request.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_request.cc @@ -38,6 +38,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ASGetAppServiceRecordsRequest::ASGetAppServiceRecordsRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ ASGetAppServiceRecordsRequest::ASGetAppServiceRecordsRequest( ASGetAppServiceRecordsRequest::~ASGetAppServiceRecordsRequest() {} void ASGetAppServiceRecordsRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); std::string type; if ((*message_)[strings::msg_params].keyExists(strings::service_type)) { type = (*message_)[strings::msg_params][strings::service_type].asString(); diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_response.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_response.cc index 0479aa8d31..f5f45d23f1 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_response.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_response.cc @@ -36,6 +36,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ASGetAppServiceRecordsResponse::ASGetAppServiceRecordsResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -51,7 +53,7 @@ ASGetAppServiceRecordsResponse::ASGetAppServiceRecordsResponse( ASGetAppServiceRecordsResponse::~ASGetAppServiceRecordsResponse() {} void ASGetAppServiceRecordsResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToHMI(message_); } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_from_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_from_hmi.cc index 6499b08c28..f5a1aac05c 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_from_hmi.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_from_hmi.cc @@ -39,6 +39,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ASPerformAppServiceInteractionRequestFromHMI:: ASPerformAppServiceInteractionRequestFromHMI( const application_manager::commands::MessageSharedPtr& message, @@ -56,7 +58,7 @@ ASPerformAppServiceInteractionRequestFromHMI:: ~ASPerformAppServiceInteractionRequestFromHMI() {} void ASPerformAppServiceInteractionRequestFromHMI::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params]; std::string hmi_origin_id = @@ -148,7 +150,7 @@ void ASPerformAppServiceInteractionRequestFromHMI::on_event( } void ASPerformAppServiceInteractionRequestFromHMI::onTimeOut() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); smart_objects::SmartObject response_params; response_params[strings::info] = "The provider did not respond to the request"; diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_to_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_to_hmi.cc index 22876328de..a0f5d69ed8 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_to_hmi.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_to_hmi.cc @@ -36,6 +36,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ASPerformAppServiceInteractionRequestToHMI:: ASPerformAppServiceInteractionRequestToHMI( const application_manager::commands::MessageSharedPtr& message, @@ -53,7 +55,7 @@ ASPerformAppServiceInteractionRequestToHMI:: ~ASPerformAppServiceInteractionRequestToHMI() {} void ASPerformAppServiceInteractionRequestToHMI::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_response_from_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_response_from_hmi.cc index a2ffa65a73..c8608588c0 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_response_from_hmi.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_response_from_hmi.cc @@ -36,6 +36,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ASPerformAppServiceInteractionResponseFromHMI:: ASPerformAppServiceInteractionResponseFromHMI( const application_manager::commands::MessageSharedPtr& message, @@ -53,7 +55,7 @@ ASPerformAppServiceInteractionResponseFromHMI:: ~ASPerformAppServiceInteractionResponseFromHMI() {} void ASPerformAppServiceInteractionResponseFromHMI::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::Event event( hmi_apis::FunctionID::AppService_PerformAppServiceInteraction); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_response_to_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_response_to_hmi.cc index 5ddef55c2a..45d6a15999 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_response_to_hmi.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_response_to_hmi.cc @@ -36,6 +36,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ASPerformAppServiceInteractionResponseToHMI:: ASPerformAppServiceInteractionResponseToHMI( const application_manager::commands::MessageSharedPtr& message, @@ -53,7 +55,7 @@ ASPerformAppServiceInteractionResponseToHMI:: ~ASPerformAppServiceInteractionResponseToHMI() {} void ASPerformAppServiceInteractionResponseToHMI::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToHMI(message_); } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_request.cc index 35a3e8a6b3..156530f9e3 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_request.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_request.cc @@ -39,6 +39,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ASPublishAppServiceRequest::ASPublishAppServiceRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,8 +56,8 @@ ASPublishAppServiceRequest::ASPublishAppServiceRequest( ASPublishAppServiceRequest::~ASPublishAppServiceRequest() {} void ASPublishAppServiceRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); - LOG4CXX_DEBUG(logger_, "Received a PublishAppService request from HMI"); + SDL_LOG_AUTO_TRACE(); + SDL_LOG_DEBUG("Received a PublishAppService request from HMI"); smart_objects::SmartObject response_params = smart_objects::SmartObject(smart_objects::SmartType_Map); smart_objects::SmartObject manifest = diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_response.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_response.cc index c143315b8c..49d3968cef 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_response.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_response.cc @@ -37,6 +37,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ASPublishAppServiceResponse::ASPublishAppServiceResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ ASPublishAppServiceResponse::ASPublishAppServiceResponse( ASPublishAppServiceResponse::~ASPublishAppServiceResponse() {} void ASPublishAppServiceResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToHMI(message_); } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_request.cc index 30905b5fa2..f29b974862 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_request.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_request.cc @@ -40,6 +40,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ASUnpublishAppServiceRequest::ASUnpublishAppServiceRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ ASUnpublishAppServiceRequest::ASUnpublishAppServiceRequest( ASUnpublishAppServiceRequest::~ASUnpublishAppServiceRequest() {} void ASUnpublishAppServiceRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); std::string service_id = (*message_)[strings::msg_params][strings::service_id].asString(); diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_response.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_response.cc index 0c8b479da8..6b665fafd0 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_response.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_response.cc @@ -39,6 +39,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + ASUnpublishAppServiceResponse::ASUnpublishAppServiceResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ ASUnpublishAppServiceResponse::ASUnpublishAppServiceResponse( ASUnpublishAppServiceResponse::~ASUnpublishAppServiceResponse() {} void ASUnpublishAppServiceResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToHMI(message_); } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification.cc index db1716ecb8..0f1fbcf1ce 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification.cc @@ -41,6 +41,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnASAppServiceDataNotification::OnASAppServiceDataNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -156,8 +158,7 @@ void OnASAppServiceDataNotification::GetNavigationImagePaths( bool OnASAppServiceDataNotification::ValidateParams( smart_objects::SmartObject& message_params) { if (!message_params.keyExists(strings::service_data)) { - LOG4CXX_DEBUG(logger_, - "OASD notification received without any service data"); + SDL_LOG_DEBUG("OASD notification received without any service data"); return false; } smart_objects::SmartObject& service_data = @@ -168,8 +169,7 @@ bool OnASAppServiceDataNotification::ValidateParams( auto service = application_manager_.GetAppServiceManager().FindServiceByID(service_id); if (!service) { - LOG4CXX_ERROR(logger_, - "OASD notification received with an unpublished service ID"); + SDL_LOG_ERROR("OASD notification received with an unpublished service ID"); return false; } @@ -179,8 +179,7 @@ bool OnASAppServiceDataNotification::ValidateParams( service_type, &service_type_value)) { auto app = application_manager_.application(service->connection_key); if (!app) { - LOG4CXX_ERROR(logger_, - "Failed to find service provider for OASD message"); + SDL_LOG_ERROR("Failed to find service provider for OASD message"); return false; } @@ -204,8 +203,8 @@ bool OnASAppServiceDataNotification::ValidateParams( } void OnASAppServiceDataNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); - LOG4CXX_DEBUG(logger_, "Sending AS data to HMI"); + SDL_LOG_AUTO_TRACE(); + SDL_LOG_DEBUG("Sending AS data to HMI"); if (ValidateParams((*message_)[strings::msg_params])) { SendNotification(); } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification_from_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification_from_hmi.cc index 1c73fc73f4..5483873c3c 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification_from_hmi.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification_from_hmi.cc @@ -38,6 +38,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnASAppServiceDataNotificationFromHMI::OnASAppServiceDataNotificationFromHMI( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,8 +56,8 @@ OnASAppServiceDataNotificationFromHMI:: ~OnASAppServiceDataNotificationFromHMI() {} void OnASAppServiceDataNotificationFromHMI::Run() { - LOG4CXX_AUTO_TRACE(logger_); - LOG4CXX_DEBUG(logger_, "Received an OnAppServiceData from HMI"); + SDL_LOG_AUTO_TRACE(); + SDL_LOG_DEBUG("Received an OnAppServiceData from HMI"); std::string service_id = (*message_)[strings::msg_params][strings::service_data] @@ -64,14 +66,14 @@ void OnASAppServiceDataNotificationFromHMI::Run() { AppService* service = application_manager_.GetAppServiceManager().FindServiceByID(service_id); if (!service) { - LOG4CXX_ERROR( - logger_, "No published services exist with service ID: " << service_id); + SDL_LOG_ERROR( + "No published services exist with service ID: " << service_id); return; } else if (service->mobile_service) { - LOG4CXX_ERROR(logger_, "Service was not published by the HMI"); + SDL_LOG_ERROR("Service was not published by the HMI"); return; } else if (!service->record[strings::service_active].asBool()) { - LOG4CXX_ERROR(logger_, "Service is not active"); + SDL_LOG_ERROR("Service is not active"); return; } @@ -83,11 +85,9 @@ void OnASAppServiceDataNotificationFromHMI::Run() { service->record[strings::service_manifest][strings::service_type] .asString(); if (published_service_type != service_type) { - LOG4CXX_ERROR(logger_, - "Service type mismatch, expected " - << service_type - << ", but service was published with type " - << published_service_type); + SDL_LOG_ERROR("Service type mismatch, expected " + << service_type << ", but service was published with type " + << published_service_type); return; } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_request.cc index e3bf40308d..719856625d 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_request.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_request.cc @@ -42,6 +42,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + GetAppServiceDataRequest::GetAppServiceDataRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -57,7 +59,7 @@ GetAppServiceDataRequest::GetAppServiceDataRequest( GetAppServiceDataRequest::~GetAppServiceDataRequest() {} void GetAppServiceDataRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendProviderRequest(mobile_apis::FunctionID::GetAppServiceDataID, hmi_apis::FunctionID::AppService_GetAppServiceData, diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_request_to_mobile.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_request_to_mobile.cc index 0af1a5436b..1a8912518a 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_request_to_mobile.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_request_to_mobile.cc @@ -38,6 +38,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + GetAppServiceDataRequestToMobile::GetAppServiceDataRequestToMobile( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ GetAppServiceDataRequestToMobile::GetAppServiceDataRequestToMobile( GetAppServiceDataRequestToMobile::~GetAppServiceDataRequestToMobile() {} void GetAppServiceDataRequestToMobile::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_response.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_response.cc index 32ad8e014d..9c0b46c209 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_response.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_response.cc @@ -38,6 +38,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + GetAppServiceDataResponse::GetAppServiceDataResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -53,7 +55,7 @@ GetAppServiceDataResponse::GetAppServiceDataResponse( GetAppServiceDataResponse::~GetAppServiceDataResponse() {} void GetAppServiceDataResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_response_from_mobile.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_response_from_mobile.cc index 90fca04eb2..04b969502b 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_response_from_mobile.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_response_from_mobile.cc @@ -40,6 +40,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + GetAppServiceDataResponseFromMobile::GetAppServiceDataResponseFromMobile( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -55,7 +57,7 @@ GetAppServiceDataResponseFromMobile::GetAppServiceDataResponseFromMobile( GetAppServiceDataResponseFromMobile::~GetAppServiceDataResponseFromMobile() {} void GetAppServiceDataResponseFromMobile::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::MobileEvent event(mobile_apis::FunctionID::GetAppServiceDataID); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification.cc index 1ffe99462d..674578946a 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification.cc @@ -46,6 +46,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnAppServiceDataNotification::OnAppServiceDataNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -61,8 +63,8 @@ OnAppServiceDataNotification::OnAppServiceDataNotification( OnAppServiceDataNotification::~OnAppServiceDataNotification() {} void OnAppServiceDataNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); - LOG4CXX_DEBUG(logger_, "Sending OnAppServiceData to consumer"); + SDL_LOG_AUTO_TRACE(); + SDL_LOG_DEBUG("Sending OnAppServiceData to consumer"); std::string service_id = (*message_)[strings::msg_params][strings::service_data] @@ -72,15 +74,15 @@ void OnAppServiceDataNotification::Run() { application_manager_.GetAppServiceManager().FindServiceByID(service_id); if (!service) { - LOG4CXX_ERROR(logger_, "Service sending OnAppServiceData is not published"); + SDL_LOG_ERROR("Service sending OnAppServiceData is not published"); return; } else if (!service ->record[strings::service_manifest] [strings::allow_app_consumers] .asBool()) { - LOG4CXX_ERROR(logger_, - "Service does not allow for app consumers, skipping mobile " - "OnAppServiceData notification"); + SDL_LOG_ERROR( + "Service does not allow for app consumers, skipping mobile " + "OnAppServiceData notification"); return; } @@ -93,7 +95,7 @@ void OnAppServiceDataNotification::Run() { [service_type](const ApplicationSharedPtr app) { DCHECK_OR_RETURN(app, false); auto& ext = AppServiceAppExtension::ExtractASExtension(*app); - LOG4CXX_DEBUG(logger_, "Check subscription for type: " << service_type); + SDL_LOG_DEBUG("Check subscription for type: " << service_type); return ext.IsSubscribedToAppService(service_type); }; @@ -107,12 +109,11 @@ void OnAppServiceDataNotification::Run() { for (; applications.end() != app_it; ++app_it) { const ApplicationSharedPtr app = *app_it; if (!app) { - LOG4CXX_ERROR(logger_, "NULL pointer"); + SDL_LOG_ERROR("NULL pointer"); continue; } - LOG4CXX_DEBUG(logger_, - "Sending OnAppServiceDataNotification to mobile connection: " - << app->app_id()); + SDL_LOG_DEBUG("Sending OnAppServiceDataNotification to mobile connection: " + << app->app_id()); (*message_)[app_mngr::strings::params][app_mngr::strings::connection_key] = app->app_id(); SendNotification(); diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc index 5caacc9801..4c1caebd36 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc @@ -41,6 +41,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnAppServiceDataNotificationFromMobile::OnAppServiceDataNotificationFromMobile( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -57,8 +59,8 @@ OnAppServiceDataNotificationFromMobile:: ~OnAppServiceDataNotificationFromMobile() {} void OnAppServiceDataNotificationFromMobile::Run() { - LOG4CXX_AUTO_TRACE(logger_); - LOG4CXX_DEBUG(logger_, "Received an OnAppServiceData"); + SDL_LOG_AUTO_TRACE(); + SDL_LOG_DEBUG("Received an OnAppServiceData"); MessageHelper::PrintSmartObject(*message_); uint32_t app_connection_key = connection_key(); @@ -74,9 +76,9 @@ void OnAppServiceDataNotificationFromMobile::Run() { app->policy_app_id(), std::string(), service_type, NULL); if (!result) { - LOG4CXX_DEBUG(logger_, - "Incorrect service type received in " - "OnAppServiceDataNotificationFromMobile"); + SDL_LOG_DEBUG( + "Incorrect service type received in " + "OnAppServiceDataNotificationFromMobile"); return; } @@ -87,15 +89,15 @@ void OnAppServiceDataNotificationFromMobile::Run() { AppService* service = application_manager_.GetAppServiceManager().FindServiceByID(service_id); if (!service) { - LOG4CXX_ERROR( - logger_, "No published services exist with service ID: " << service_id); + SDL_LOG_ERROR( + "No published services exist with service ID: " << service_id); return; } else if (!service->mobile_service || service->connection_key != app_connection_key) { - LOG4CXX_ERROR(logger_, "Service was not published by this application"); + SDL_LOG_ERROR("Service was not published by this application"); return; } else if (!service->record[strings::service_active].asBool()) { - LOG4CXX_ERROR(logger_, "Service is not active"); + SDL_LOG_ERROR("Service is not active"); return; } @@ -103,11 +105,9 @@ void OnAppServiceDataNotificationFromMobile::Run() { service->record[strings::service_manifest][strings::service_type] .asString(); if (published_service_type != service_type) { - LOG4CXX_ERROR(logger_, - "Service type mismatch, expected " - << service_type - << ", but service was published with type " - << published_service_type); + SDL_LOG_ERROR("Service type mismatch, expected " + << service_type << ", but service was published with type " + << published_service_type); return; } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request.cc index 63b6e47d8e..c303e6d99f 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request.cc @@ -41,6 +41,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + PerformAppServiceInteractionRequest::PerformAppServiceInteractionRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,7 +58,7 @@ PerformAppServiceInteractionRequest::PerformAppServiceInteractionRequest( PerformAppServiceInteractionRequest::~PerformAppServiceInteractionRequest() {} void PerformAppServiceInteractionRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); auto app = application_manager_.application(connection_key()); if (!app) { @@ -122,7 +124,7 @@ void PerformAppServiceInteractionRequest::Run() { void PerformAppServiceInteractionRequest::on_event( const event_engine::Event& event) { - LOG4CXX_DEBUG(logger_, "HMI PerformAppServiceInteraction on_event"); + SDL_LOG_DEBUG("HMI PerformAppServiceInteraction on_event"); const smart_objects::SmartObject& event_message = event.smart_object(); auto msg_params = event_message[strings::msg_params]; @@ -169,7 +171,7 @@ void PerformAppServiceInteractionRequest::on_event( void PerformAppServiceInteractionRequest::on_event( const event_engine::MobileEvent& event) { - LOG4CXX_DEBUG(logger_, "Mobile PerformAppServiceInteraction on_event"); + SDL_LOG_DEBUG("Mobile PerformAppServiceInteraction on_event"); const smart_objects::SmartObject& event_message = event.smart_object(); auto msg_params = event_message[strings::msg_params]; diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request_to_mobile.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request_to_mobile.cc index 2a7b644cb3..4997f63232 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request_to_mobile.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request_to_mobile.cc @@ -37,6 +37,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + PerformAppServiceInteractionRequestToMobile:: PerformAppServiceInteractionRequestToMobile( const application_manager::commands::MessageSharedPtr& message, @@ -54,7 +56,7 @@ PerformAppServiceInteractionRequestToMobile:: ~PerformAppServiceInteractionRequestToMobile() {} void PerformAppServiceInteractionRequestToMobile::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); SendRequest(); } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_response.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_response.cc index 5e84f42c34..a5a81eb325 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_response.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_response.cc @@ -37,6 +37,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + PerformAppServiceInteractionResponse::PerformAppServiceInteractionResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -52,7 +54,7 @@ PerformAppServiceInteractionResponse::PerformAppServiceInteractionResponse( PerformAppServiceInteractionResponse::~PerformAppServiceInteractionResponse() {} void PerformAppServiceInteractionResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_response_from_mobile.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_response_from_mobile.cc index 9912df84ce..25ef530b8d 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_response_from_mobile.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_response_from_mobile.cc @@ -38,6 +38,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + PerformAppServiceInteractionResponseFromMobile:: PerformAppServiceInteractionResponseFromMobile( const application_manager::commands::MessageSharedPtr& message, @@ -55,7 +57,7 @@ PerformAppServiceInteractionResponseFromMobile:: ~PerformAppServiceInteractionResponseFromMobile() {} void PerformAppServiceInteractionResponseFromMobile::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); event_engine::MobileEvent event( mobile_apis::FunctionID::PerformAppServiceInteractionID); event.set_smart_object(*message_); diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_request.cc index 53d1bf82fa..f2bc66520b 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_request.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_request.cc @@ -43,6 +43,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + PublishAppServiceRequest::PublishAppServiceRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -58,8 +60,8 @@ PublishAppServiceRequest::PublishAppServiceRequest( PublishAppServiceRequest::~PublishAppServiceRequest() {} void PublishAppServiceRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); - LOG4CXX_DEBUG(logger_, "Received a PublishAppService " << connection_key()); + SDL_LOG_AUTO_TRACE(); + SDL_LOG_DEBUG("Received a PublishAppService " << connection_key()); MessageHelper::PrintSmartObject(*message_); smart_objects::SmartObject response_params = diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_response.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_response.cc index d1bfc6e154..53dff48f43 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_response.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_response.cc @@ -39,6 +39,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + PublishAppServiceResponse::PublishAppServiceResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ PublishAppServiceResponse::PublishAppServiceResponse( PublishAppServiceResponse::~PublishAppServiceResponse() {} void PublishAppServiceResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_request.cc index 2cb43bce07..200bae01d9 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_request.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_request.cc @@ -41,6 +41,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UnpublishAppServiceRequest::UnpublishAppServiceRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,7 +58,7 @@ UnpublishAppServiceRequest::UnpublishAppServiceRequest( UnpublishAppServiceRequest::~UnpublishAppServiceRequest() {} void UnpublishAppServiceRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); std::string service_id = (*message_)[strings::msg_params][strings::service_id].asString(); diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_response.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_response.cc index 22450ecc4c..6b48c7f225 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_response.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_response.cc @@ -39,6 +39,8 @@ namespace app_service_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + UnpublishAppServiceResponse::UnpublishAppServiceResponse( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -54,7 +56,7 @@ UnpublishAppServiceResponse::UnpublishAppServiceResponse( UnpublishAppServiceResponse::~UnpublishAppServiceResponse() {} void UnpublishAppServiceResponse::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); rpc_service_.SendMessageToMobile(message_); } |