summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/rpc_plugins/vehicle_info_plugin/src')
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/on_vi_vehicle_data_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_request.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_response.cc11
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_request.cc13
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_request.cc13
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_request.cc10
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc12
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc18
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_request.cc19
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_request.cc44
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_response.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/custom_vehicle_data_manager_impl.cc22
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_data_item_schema.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc14
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc13
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc11
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_plugin.cc23
37 files changed, 213 insertions, 172 deletions
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/on_vi_vehicle_data_notification.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/on_vi_vehicle_data_notification.cc
index b8d1b3a100..88884e365a 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/on_vi_vehicle_data_notification.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/on_vi_vehicle_data_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVIVehicleDataNotification::OnVIVehicleDataNotification(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -50,7 +52,7 @@ OnVIVehicleDataNotification::OnVIVehicleDataNotification(
OnVIVehicleDataNotification::~OnVIVehicleDataNotification() {}
void OnVIVehicleDataNotification::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/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_request.cc
index ae64c74f26..95999c76f9 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIDiagnosticMessageRequest::VIDiagnosticMessageRequest(
const app_mngr::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -49,7 +51,7 @@ VIDiagnosticMessageRequest::VIDiagnosticMessageRequest(
VIDiagnosticMessageRequest::~VIDiagnosticMessageRequest() {}
void VIDiagnosticMessageRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_response.cc
index 6482d97d10..4ee6e1e495 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIDiagnosticMessageResponse::VIDiagnosticMessageResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -50,7 +52,7 @@ VIDiagnosticMessageResponse::VIDiagnosticMessageResponse(
VIDiagnosticMessageResponse::~VIDiagnosticMessageResponse() {}
void VIDiagnosticMessageResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(
hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage);
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_request.cc
index 620ee4c3e4..6b312c826d 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIGetDTCsRequest::VIGetDTCsRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -49,7 +51,7 @@ VIGetDTCsRequest::VIGetDTCsRequest(
VIGetDTCsRequest::~VIGetDTCsRequest() {}
void VIGetDTCsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_response.cc
index 64e948a4e1..b84e67d7c5 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIGetDTCsResponse::VIGetDTCsResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -50,7 +52,7 @@ VIGetDTCsResponse::VIGetDTCsResponse(
VIGetDTCsResponse::~VIGetDTCsResponse() {}
void VIGetDTCsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_GetDTCs);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_request.cc
index eded6c685b..a3e3a83f62 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_request.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIGetVehicleDataRequest::VIGetVehicleDataRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -51,7 +53,7 @@ VIGetVehicleDataRequest::VIGetVehicleDataRequest(
VIGetVehicleDataRequest::~VIGetVehicleDataRequest() {}
void VIGetVehicleDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto& rpc_spec_vehicle_data = MessageHelper::vehicle_data();
auto& msg_params = (*message_)[strings::msg_params];
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_response.cc
index 763ddf1cfa..0ef6a97e91 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_response.cc
@@ -39,6 +39,8 @@ namespace vehicle_info_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIGetVehicleDataResponse::VIGetVehicleDataResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -51,7 +53,7 @@ VIGetVehicleDataResponse::VIGetVehicleDataResponse(
VIGetVehicleDataResponse::~VIGetVehicleDataResponse() {}
void VIGetVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_GetVehicleData);
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_request.cc
index e8df12ca5c..26a9990079 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIGetVehicleTypeRequest::VIGetVehicleTypeRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -49,13 +51,13 @@ VIGetVehicleTypeRequest::VIGetVehicleTypeRequest(
VIGetVehicleTypeRequest::~VIGetVehicleTypeRequest() {}
void VIGetVehicleTypeRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
void VIGetVehicleTypeRequest::onTimeOut() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
hmi_apis::FunctionID::VehicleInfo_GetVehicleType);
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_response.cc
index dcc73d26f3..dbd1b48033 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIGetVehicleTypeResponse::VIGetVehicleTypeResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -48,7 +50,7 @@ VIGetVehicleTypeResponse::VIGetVehicleTypeResponse(
VIGetVehicleTypeResponse::~VIGetVehicleTypeResponse() {}
void VIGetVehicleTypeResponse::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());
@@ -57,8 +59,7 @@ void VIGetVehicleTypeResponse::Run() {
hmi_apis::FunctionID::VehicleInfo_GetVehicleType);
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;
}
@@ -70,8 +71,8 @@ void VIGetVehicleTypeResponse::Run() {
hmi_interface::vehicle_info,
sections_to_update,
message_->getSchema())) {
- LOG4CXX_ERROR(
- logger_, "Failed to save VehicleInfo.GetVehicleType response to cache");
+ SDL_LOG_ERROR(
+ "Failed to save VehicleInfo.GetVehicleType response to cache");
}
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_request.cc
index 3525be059d..578f650e98 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_request.cc
@@ -42,6 +42,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIIsReadyRequest::VIIsReadyRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -55,18 +57,18 @@ VIIsReadyRequest::VIIsReadyRequest(
VIIsReadyRequest::~VIIsReadyRequest() {}
void VIIsReadyRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
subscribe_on_event(hmi_apis::FunctionID::VehicleInfo_IsReady,
correlation_id());
SendRequest();
}
void VIIsReadyRequest::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::VehicleInfo_IsReady: {
- LOG4CXX_DEBUG(logger_, "VehicleInfo_IsReady event");
+ SDL_LOG_DEBUG("VehicleInfo_IsReady event");
unsubscribe_from_event(hmi_apis::FunctionID::VehicleInfo_IsReady);
const bool is_available = app_mngr::commands::ChangeInterfaceState(
application_manager_,
@@ -78,8 +80,7 @@ void VIIsReadyRequest::on_event(const event_engine::Event& event) {
policy_handler_.OnVIIsReady();
if (!app_mngr::commands::CheckAvailabilityHMIInterfaces(
application_manager_, HmiInterfaces::HMI_INTERFACE_VehicleInfo)) {
- LOG4CXX_INFO(
- logger_,
+ SDL_LOG_INFO(
"HmiInterfaces::HMI_INTERFACE_VehicleInfo isn't available");
hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
hmi_apis::FunctionID::VehicleInfo_GetVehicleType);
@@ -90,7 +91,7 @@ void VIIsReadyRequest::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/vehicle_info_plugin/src/commands/hmi/vi_is_ready_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_response.cc
index 349a1137ce..b40ecc51db 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIIsReadyResponse::VIIsReadyResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -48,7 +50,7 @@ VIIsReadyResponse::VIIsReadyResponse(
VIIsReadyResponse::~VIIsReadyResponse() {}
void VIIsReadyResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_IsReady);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_request.cc
index 47373bb4bf..529ed248d0 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIReadDIDRequest::VIReadDIDRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -49,7 +51,7 @@ VIReadDIDRequest::VIReadDIDRequest(
VIReadDIDRequest::~VIReadDIDRequest() {}
void VIReadDIDRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_response.cc
index 7c2db1e875..09abb3c9fc 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_response.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIReadDIDResponse::VIReadDIDResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -49,7 +51,7 @@ VIReadDIDResponse::VIReadDIDResponse(
VIReadDIDResponse::~VIReadDIDResponse() {}
void VIReadDIDResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_ReadDID);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_request.cc
index 4c5f067d0d..12a938fe08 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_request.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VISubscribeVehicleDataRequest::VISubscribeVehicleDataRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -51,7 +53,7 @@ VISubscribeVehicleDataRequest::VISubscribeVehicleDataRequest(
VISubscribeVehicleDataRequest::~VISubscribeVehicleDataRequest() {}
void VISubscribeVehicleDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto& rpc_spec_vehicle_data = MessageHelper::vehicle_data();
auto& msg_params = (*message_)[strings::msg_params];
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_response.cc
index 061e13c766..5fbd9a7f82 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_response.cc
@@ -37,6 +37,8 @@ namespace vehicle_info_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VISubscribeVehicleDataResponse::VISubscribeVehicleDataResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -49,7 +51,7 @@ VISubscribeVehicleDataResponse::VISubscribeVehicleDataResponse(
VISubscribeVehicleDataResponse::~VISubscribeVehicleDataResponse() {}
void VISubscribeVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(
hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc
index aa24ac7375..d9c9b0729a 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIUnsubscribeVehicleDataRequest::VIUnsubscribeVehicleDataRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -51,7 +53,7 @@ VIUnsubscribeVehicleDataRequest::VIUnsubscribeVehicleDataRequest(
VIUnsubscribeVehicleDataRequest::~VIUnsubscribeVehicleDataRequest() {}
void VIUnsubscribeVehicleDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto& rpc_spec_vehicle_data = MessageHelper::vehicle_data();
auto& msg_params = (*message_)[strings::msg_params];
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc
index 01fc521b10..ea1ab16d0d 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc
@@ -37,6 +37,8 @@ namespace vehicle_info_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIUnsubscribeVehicleDataResponse::VIUnsubscribeVehicleDataResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -49,7 +51,7 @@ VIUnsubscribeVehicleDataResponse::VIUnsubscribeVehicleDataResponse(
VIUnsubscribeVehicleDataResponse::~VIUnsubscribeVehicleDataResponse() {}
void VIUnsubscribeVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(
hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_request.cc
index ef6c284faf..762528c51b 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_request.cc
@@ -44,6 +44,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
DiagnosticMessageRequest::DiagnosticMessageRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -56,12 +58,12 @@ DiagnosticMessageRequest::DiagnosticMessageRequest(
DiagnosticMessageRequest::~DiagnosticMessageRequest() {}
void DiagnosticMessageRequest::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,8 +79,7 @@ void DiagnosticMessageRequest::Run() {
if (supported_diag_modes.end() == std::find(supported_diag_modes.begin(),
supported_diag_modes.end(),
msg_diagnostic_mode)) {
- LOG4CXX_ERROR(logger_,
- "Received diagnostic mode " << msg_diagnostic_mode
+ SDL_LOG_ERROR("Received diagnostic mode " << msg_diagnostic_mode
<< " is not supported.");
SendResponse(false,
mobile_apis::Result::REJECTED,
@@ -96,7 +97,7 @@ void DiagnosticMessageRequest::Run() {
}
void DiagnosticMessageRequest::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()) {
@@ -116,7 +117,7 @@ void DiagnosticMessageRequest::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/vehicle_info_plugin/src/commands/mobile/diagnostic_message_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_response.cc
index f5ccc4d0a7..5448d8c48b 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
DiagnosticMessageResponse::DiagnosticMessageResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -51,7 +53,7 @@ DiagnosticMessageResponse::DiagnosticMessageResponse(
DiagnosticMessageResponse::~DiagnosticMessageResponse() {}
void DiagnosticMessageResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_request.cc
index dfa1cf305b..2f236dd8b2 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_request.cc
@@ -42,6 +42,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetDTCsRequest::GetDTCsRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -54,13 +56,13 @@ GetDTCsRequest::GetDTCsRequest(
GetDTCsRequest::~GetDTCsRequest() {}
void GetDTCsRequest::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_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -83,7 +85,7 @@ void GetDTCsRequest::Run() {
}
void GetDTCsRequest::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()) {
@@ -105,7 +107,7 @@ void GetDTCsRequest::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/vehicle_info_plugin/src/commands/mobile/get_dtcs_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_response.cc
index 33945a2f00..6631274c0d 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetDTCsResponse::GetDTCsResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -51,7 +53,7 @@ GetDTCsResponse::GetDTCsResponse(
GetDTCsResponse::~GetDTCsResponse() {}
void GetDTCsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc
index d15cf6a580..e5656d60c5 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc
@@ -47,6 +47,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
namespace str = strings;
GetVehicleDataRequest::GetVehicleDataRequest(
@@ -62,12 +64,12 @@ GetVehicleDataRequest::GetVehicleDataRequest(
GetVehicleDataRequest::~GetVehicleDataRequest() {}
void GetVehicleDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "No such application : " << connection_key());
+ SDL_LOG_ERROR("No such application : " << connection_key());
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -110,7 +112,7 @@ void GetVehicleDataRequest::Run() {
}
void GetVehicleDataRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject message = event.smart_object();
switch (event.id()) {
@@ -178,7 +180,7 @@ void GetVehicleDataRequest::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;
}
}
@@ -188,7 +190,7 @@ bool GetVehicleDataRequest::CheckFrequency(Application& app) {
if (app.AreCommandLimitsExceeded(
static_cast<mobile_apis::FunctionID::eType>(function_id()),
application_manager::TLimitSource::CONFIG_FILE)) {
- LOG4CXX_ERROR(logger_, "GetVehicleData frequency is too high.");
+ SDL_LOG_ERROR("GetVehicleData frequency is too high.");
return false;
}
return true;
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_response.cc
index 60a44745a5..c263acd33f 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_response.cc
@@ -40,6 +40,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetVehicleDataResponse::GetVehicleDataResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -52,7 +54,7 @@ GetVehicleDataResponse::GetVehicleDataResponse(
GetVehicleDataResponse::~GetVehicleDataResponse() {}
void GetVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc
index 79134cae40..e336b778ff 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc
@@ -45,6 +45,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVehicleDataNotification::OnVehicleDataNotification(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -58,7 +60,7 @@ OnVehicleDataNotification::OnVehicleDataNotification(
OnVehicleDataNotification::~OnVehicleDataNotification() {}
void OnVehicleDataNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<ApplicationSharedPtr> notify_apps;
std::vector<ApplicationSharedPtr>::iterator notified_app_it =
@@ -70,7 +72,7 @@ void OnVehicleDataNotification::Run() {
const auto& param_names = (*message_)[strings::msg_params].enumerate();
for (const auto& name : param_names) {
- LOG4CXX_DEBUG(logger_, "vehicle_data name: " << name);
+ SDL_LOG_DEBUG("vehicle_data name: " << name);
auto vehicle_data_value = (*message_)[strings::msg_params][name].asInt();
application_manager_.IviInfoUpdated(name, vehicle_data_value);
@@ -84,7 +86,7 @@ void OnVehicleDataNotification::Run() {
application_manager_.applications(), subscribed_to_ivi_predicate);
for (const auto& app : applications) {
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
continue;
}
notified_app_it = find(notify_apps.begin(), notify_apps.end(), app);
@@ -101,14 +103,12 @@ void OnVehicleDataNotification::Run() {
}
}
- LOG4CXX_DEBUG(logger_,
- "Number of Notifications to be send: " << notify_apps.size());
+ SDL_LOG_DEBUG("Number of Notifications to be send: " << notify_apps.size());
for (size_t idx = 0; idx < notify_apps.size(); idx++) {
- LOG4CXX_INFO(logger_,
- "Send OnVehicleData PRNDL notification to "
- << notify_apps[idx]->name().c_str() << " application id "
- << notify_apps[idx]->app_id());
+ SDL_LOG_INFO("Send OnVehicleData PRNDL notification to "
+ << notify_apps[idx]->name().c_str() << " application id "
+ << notify_apps[idx]->app_id());
(*message_)[strings::params][strings::connection_key] =
notify_apps[idx]->app_id();
(*message_)[strings::msg_params] = appSO[idx];
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_request.cc
index c090df7852..c718d18965 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_request.cc
@@ -43,6 +43,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ReadDIDRequest::ReadDIDRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -55,19 +57,18 @@ ReadDIDRequest::ReadDIDRequest(
ReadDIDRequest::~ReadDIDRequest() {}
void ReadDIDRequest::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);
- LOG4CXX_INFO(
- logger_,
+ SDL_LOG_INFO(
"Correlation_id :"
- << (*message_)[strings::params][strings::correlation_id].asUInt());
+ << (*message_)[strings::params][strings::correlation_id].asUInt());
if (!app) {
- LOG4CXX_ERROR(logger_, "An application is not registered.");
+ SDL_LOG_ERROR("An application is not registered.");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -75,13 +76,13 @@ void ReadDIDRequest::Run() {
if (app->AreCommandLimitsExceeded(
static_cast<mobile_apis::FunctionID::eType>(function_id()),
application_manager::TLimitSource::CONFIG_FILE)) {
- LOG4CXX_ERROR(logger_, "ReadDID frequency is too high.");
+ SDL_LOG_ERROR("ReadDID frequency is too high.");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
if ((*message_)[strings::msg_params][strings::did_location].empty()) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA");
+ SDL_LOG_ERROR("INVALID_DATA");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -99,7 +100,7 @@ void ReadDIDRequest::Run() {
}
void ReadDIDRequest::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()) {
@@ -120,7 +121,7 @@ void ReadDIDRequest::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/vehicle_info_plugin/src/commands/mobile/read_did_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_response.cc
index 42e7fc1ba9..806aeb611c 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ReadDIDResponse::ReadDIDResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -51,7 +53,7 @@ ReadDIDResponse::ReadDIDResponse(
ReadDIDResponse::~ReadDIDResponse() {}
void ReadDIDResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc
index 29818232c0..d51790ea55 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc
@@ -42,6 +42,8 @@ namespace vehicle_info_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SubscribeVehicleDataRequest::SubscribeVehicleDataRequest(
const application_manager::commands::MessageSharedPtr& message,
VehicleInfoCommandParams params)
@@ -55,12 +57,12 @@ SubscribeVehicleDataRequest::SubscribeVehicleDataRequest(
SubscribeVehicleDataRequest::~SubscribeVehicleDataRequest() {}
void SubscribeVehicleDataRequest::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;
}
@@ -90,13 +92,13 @@ void SubscribeVehicleDataRequest::Run() {
}
void SubscribeVehicleDataRequest::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();
if (hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData != event.id()) {
- LOG4CXX_ERROR(logger_, "Received unknown event.");
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
@@ -104,7 +106,7 @@ void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
application_manager_.application(CommandRequestImpl::connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer.");
+ SDL_LOG_ERROR("NULL pointer.");
return;
}
@@ -134,7 +136,7 @@ void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
const auto& converted_name = ConvertResponseToRequestName(param);
if (vi_waiting_for_subscribe_.end() ==
vi_waiting_for_subscribe_.find(converted_name)) {
- LOG4CXX_DEBUG(logger_, "erase " << converted_name);
+ SDL_LOG_DEBUG("erase " << converted_name);
converted_msg_params.erase(param);
}
}
@@ -184,8 +186,7 @@ bool SubscribeVehicleDataRequest::CheckSubscriptionStatus(
std::string vi_name, const smart_objects::SmartObject& msg_params) {
const auto subscribed_items = msg_params.enumerate();
if (subscribed_items.end() == subscribed_items.find(vi_name)) {
- LOG4CXX_WARN(logger_,
- vi_name << " is waiting to be subscribed, but missing in "
+ SDL_LOG_WARN(vi_name << " is waiting to be subscribed, but missing in "
"vehicle response.");
return false;
}
@@ -193,8 +194,7 @@ bool SubscribeVehicleDataRequest::CheckSubscriptionStatus(
auto res_code = msg_params[vi_name][strings::result_code].asInt();
if (VD_ResultCode::VDRC_SUCCESS != res_code &&
VD_ResultCode::VDRC_DATA_ALREADY_SUBSCRIBED != res_code) {
- LOG4CXX_WARN(logger_,
- "Subscription to " << vi_name << " for " << connection_key()
+ SDL_LOG_WARN("Subscription to " << vi_name << " for " << connection_key()
<< " failed.");
return false;
}
@@ -203,7 +203,7 @@ bool SubscribeVehicleDataRequest::CheckSubscriptionStatus(
bool SubscribeVehicleDataRequest::SubscribePendingVehicleData(
ApplicationSharedPtr app, smart_objects::SmartObject& msg_params) {
- LOG4CXX_DEBUG(logger_, "Subscribing to all pending VehicleData");
+ SDL_LOG_DEBUG("Subscribing to all pending VehicleData");
std::set<hmi_apis::Common_VehicleDataResultCode::eType> skiped_result_codes(
{VD_ResultCode::VDRC_TRUNCATED_DATA,
@@ -245,7 +245,7 @@ bool SubscribeVehicleDataRequest::Init() {
void SubscribeVehicleDataRequest::AddAlreadySubscribedVI(
smart_objects::SmartObject& msg_params) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace mobile_apis;
for (const auto& item : vi_already_subscribed_by_this_app_) {
@@ -272,7 +272,7 @@ struct SubscribedToIVIPredicate {
bool SubscribeVehicleDataRequest::IsSomeoneSubscribedFor(
const std::string& param_name) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SubscribedToIVIPredicate finder(param_name);
DataAccessor<ApplicationSet> accessor = application_manager_.applications();
ApplicationSetConstIt it = std::find_if(
@@ -298,11 +298,10 @@ void SubscribeVehicleDataRequest::CheckVISubscriptions(
[this, &out_response_params](
const std::string& key_name,
const mobile_apis::VehicleDataType::eType vd_type) {
- LOG4CXX_DEBUG(
- logger_,
- "App with connection key "
- << connection_key()
- << " is subscribed already for VehicleData: " << key_name);
+ SDL_LOG_DEBUG("App with connection key "
+ << connection_key()
+ << " is subscribed already for VehicleData: "
+ << key_name);
vi_already_subscribed_by_this_app_.insert(key_name);
out_response_params[key_name][strings::data_type] = vd_type;
out_response_params[key_name][strings::result_code] =
@@ -314,21 +313,20 @@ void SubscribeVehicleDataRequest::CheckVISubscriptions(
const std::string& key_name,
const mobile_apis::VehicleDataType::eType vd_type,
vehicle_info_plugin::VehicleInfoAppExtension& ext) {
- LOG4CXX_DEBUG(logger_,
- "There are apps subscribed already for "
- "VehicleDataType: "
- << key_name);
+ SDL_LOG_DEBUG(
+ "There are apps subscribed already for "
+ "VehicleDataType: "
+ << key_name);
if (!ext.subscribeToVehicleInfo(key_name)) {
- LOG4CXX_ERROR(
- logger_, "Unable to subscribe for VehicleDataType: " << key_name);
+ SDL_LOG_ERROR(
+ "Unable to subscribe for VehicleDataType: " << key_name);
return;
}
- LOG4CXX_DEBUG(
- logger_,
- "App with connection key "
- << connection_key()
- << " have been subscribed for VehicleDataType: " << key_name);
+ SDL_LOG_DEBUG("App with connection key "
+ << connection_key()
+ << " have been subscribed for VehicleDataType: "
+ << key_name);
vi_already_subscribed_by_another_apps_.insert(key_name);
out_response_params[key_name][strings::data_type] = vd_type;
out_response_params[key_name][strings::result_code] =
@@ -341,11 +339,9 @@ void SubscribeVehicleDataRequest::CheckVISubscriptions(
out_request_params[vi_name] = (*message_)[strings::msg_params][vi_name];
vi_waiting_for_subscribe_.insert(vi_name);
- LOG4CXX_DEBUG(
- logger_,
- "App with connection key "
- << connection_key()
- << " will be subscribed for VehicleDataType: " << vi_name);
+ SDL_LOG_DEBUG("App with connection key "
+ << connection_key()
+ << " will be subscribed for VehicleDataType: " << vi_name);
++subscribed_items;
return true;
};
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_response.cc
index 8330176af6..0527532acc 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_response.cc
@@ -40,6 +40,8 @@ namespace vehicle_info_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SubscribeVehicleDataResponse::SubscribeVehicleDataResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -52,7 +54,7 @@ SubscribeVehicleDataResponse::SubscribeVehicleDataResponse(
SubscribeVehicleDataResponse::~SubscribeVehicleDataResponse() {}
void SubscribeVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_request.cc
index fccf56ecf5..8ffeaf922a 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_request.cc
@@ -47,6 +47,8 @@ namespace vehicle_info_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UnsubscribeVehicleDataRequest::UnsubscribeVehicleDataRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -60,12 +62,12 @@ UnsubscribeVehicleDataRequest::UnsubscribeVehicleDataRequest(
UnsubscribeVehicleDataRequest::~UnsubscribeVehicleDataRequest() {}
void UnsubscribeVehicleDataRequest::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;
}
@@ -82,20 +84,19 @@ void UnsubscribeVehicleDataRequest::Run() {
std::set<std::string> custom_vehicle_data;
auto app_not_subscribed_response = [this](const std::string& key_name) {
- LOG4CXX_DEBUG(logger_,
- "App with connection key "
- << connection_key()
- << " is not subscribed for VehicleData: " << key_name);
+ SDL_LOG_DEBUG("App with connection key "
+ << connection_key()
+ << " is not subscribed for VehicleData: " << key_name);
vi_already_unsubscribed_by_this_app_.insert(key_name);
response_params_[key_name][strings::result_code] =
mobile_apis::VehicleDataResultCode::VDRC_DATA_NOT_SUBSCRIBED;
};
auto other_app_subscribed_response = [this](const std::string& key_name) {
- LOG4CXX_DEBUG(logger_,
- "There are apps still subscribed for "
- "VehicleDataType: "
- << key_name);
+ SDL_LOG_DEBUG(
+ "There are apps still subscribed for "
+ "VehicleDataType: "
+ << key_name);
vi_still_subscribed_by_another_apps_.insert(key_name);
response_params_[key_name][strings::result_code] =
mobile_apis::VehicleDataResultCode::VDRC_SUCCESS;
@@ -117,9 +118,8 @@ void UnsubscribeVehicleDataRequest::Run() {
continue;
}
- LOG4CXX_DEBUG(logger_,
- "Unsubscribed app with connection key "
- << connection_key() << " from VehicleDataType: " << name);
+ SDL_LOG_DEBUG("Unsubscribed app with connection key "
+ << connection_key() << " from VehicleDataType: " << name);
++unsubscribed_items;
@@ -177,13 +177,13 @@ void UnsubscribeVehicleDataRequest::Run() {
}
void UnsubscribeVehicleDataRequest::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();
if (hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData != event.id()) {
- LOG4CXX_ERROR(logger_, "Received unknown event.");
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
@@ -192,7 +192,7 @@ void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
application_manager_.application(CommandRequestImpl::connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer.");
+ SDL_LOG_ERROR("NULL pointer.");
return;
}
@@ -260,7 +260,7 @@ bool UnsubscribeVehicleDataRequest::Init() {
bool UnsubscribeVehicleDataRequest::IsSomeoneSubscribedFor(
const std::string& param_name) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto conn_key = connection_key();
auto subscribed_to_ivi = [&param_name,
&conn_key](const ApplicationSharedPtr app) {
@@ -280,7 +280,7 @@ bool UnsubscribeVehicleDataRequest::IsSomeoneSubscribedFor(
void UnsubscribeVehicleDataRequest::AddAlreadyUnsubscribedVI(
smart_objects::SmartObject& response) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace mobile_apis;
for (const auto& item : vi_already_unsubscribed_by_this_app_) {
@@ -297,16 +297,14 @@ bool UnsubscribeVehicleDataRequest::CheckSubscriptionStatus(
std::string key, const smart_objects::SmartObject& msg_params) {
const auto unsubscribed_items = msg_params.enumerate();
if (unsubscribed_items.end() == unsubscribed_items.find(key)) {
- LOG4CXX_WARN(logger_,
- key << " is waiting to be unsubscribed, but missing in "
+ SDL_LOG_WARN(key << " is waiting to be unsubscribed, but missing in "
"vehicle response.");
return false;
}
auto res_code = msg_params[key][strings::result_code].asInt();
if (hmi_apis::Common_VehicleDataResultCode::VDRC_SUCCESS != res_code) {
- LOG4CXX_WARN(logger_,
- "Unubscribing from " << key << " for " << connection_key()
+ SDL_LOG_WARN("Unubscribing from " << key << " for " << connection_key()
<< " failed.");
return false;
}
@@ -315,7 +313,7 @@ bool UnsubscribeVehicleDataRequest::CheckSubscriptionStatus(
bool UnsubscribeVehicleDataRequest::UnsubscribePendingVehicleData(
ApplicationSharedPtr app, const smart_objects::SmartObject& msg_params) {
- LOG4CXX_DEBUG(logger_, "Unsubscribing from all pending VehicleData");
+ SDL_LOG_DEBUG("Unsubscribing from all pending VehicleData");
for (const auto& vi_name : vi_waiting_for_unsubscribe_) {
const auto converted_item = ConvertRequestToResponseName(vi_name);
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_response.cc
index 352239c331..89b5261938 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_response.cc
@@ -38,6 +38,8 @@ namespace vehicle_info_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UnsubscribeVehicleDataResponse::UnsubscribeVehicleDataResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -50,12 +52,12 @@ UnsubscribeVehicleDataResponse::UnsubscribeVehicleDataResponse(
UnsubscribeVehicleDataResponse::~UnsubscribeVehicleDataResponse() {}
void UnsubscribeVehicleDataResponse::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/vehicle_info_plugin/src/custom_vehicle_data_manager_impl.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/custom_vehicle_data_manager_impl.cc
index 9df6d922aa..b85fd5aaaf 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/custom_vehicle_data_manager_impl.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/custom_vehicle_data_manager_impl.cc
@@ -45,7 +45,7 @@
#include "utils/helpers.h"
#include "utils/optional.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "VehicleInfoPlugin")
+SDL_CREATE_LOG_VARIABLE("VehicleInfoPlugin")
namespace vehicle_info_plugin {
@@ -64,7 +64,7 @@ CustomVehicleDataManagerImpl::CustomVehicleDataManagerImpl(
std::string CustomVehicleDataManagerImpl::GetVehicleDataItemType(
const std::string& vehicle_data_item_name) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto& schema = FindSchemaByNameNonRecursive(vehicle_data_item_name);
return schema.is_initialized() ? std::string(schema->type)
@@ -86,7 +86,7 @@ bool CustomVehicleDataManagerImpl::IsRemovedCustomVehicleDataName(
void CustomVehicleDataManagerImpl::CreateMobileMessageParams(
smart_objects::SmartObject& msg_params) {
using namespace application_manager;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
typedef std::function<smart_objects::SmartObject(
const smart_objects::SmartObject& input_params,
@@ -105,7 +105,7 @@ void CustomVehicleDataManagerImpl::CreateMobileMessageParams(
? FindSchemaByKeyRecursive(key)
: FindSchemaByKeyNonRecursive(key);
if (!schema.is_initialized()) {
- LOG4CXX_DEBUG(logger_, "Schema for: " << key << " cannot be found");
+ SDL_LOG_DEBUG("Schema for: " << key << " cannot be found");
continue;
}
@@ -208,7 +208,7 @@ const OptionalDataItem FindSchema(
const std::vector<policy_table::VehicleDataItem>& oem_items,
SearchMethod search_method,
Comparer comparer) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<policy_table::VehicleDataItem> items;
for (const auto& item : oem_items) {
@@ -495,7 +495,7 @@ void CustomVehicleDataManagerImpl::UpdateVehicleDataItems() {
void CustomVehicleDataManagerImpl::OnPolicyEvent(
plugin_manager::PolicyEvent policy_event) {
using namespace plugin_manager;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
switch (policy_event) {
case kApplicationPolicyUpdated:
@@ -510,7 +510,7 @@ void CustomVehicleDataManagerImpl::OnPolicyEvent(
const OptionalDataItem
CustomVehicleDataManagerImpl::FindSchemaByNameNonRecursive(
const std::string& name) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto& oem_items = vehicle_data_provider_.GetVehicleDataItems();
auto compare_by_name = [&name](const policy_table::VehicleDataItem& item) {
@@ -523,7 +523,7 @@ CustomVehicleDataManagerImpl::FindSchemaByNameNonRecursive(
const OptionalDataItem
CustomVehicleDataManagerImpl::FindRemovedSchemaByNameNonRecursive(
const std::string& name) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto& removed_oem_items =
vehicle_data_provider_.GetRemovedVehicleDataItems();
@@ -537,7 +537,7 @@ CustomVehicleDataManagerImpl::FindRemovedSchemaByNameNonRecursive(
const OptionalDataItem CustomVehicleDataManagerImpl::FindSchemaByNameRecursive(
const std::string& name) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto& oem_items = vehicle_data_provider_.GetVehicleDataItems();
auto compare_by_name = [&name](const policy_table::VehicleDataItem& item) {
@@ -550,7 +550,7 @@ const OptionalDataItem CustomVehicleDataManagerImpl::FindSchemaByNameRecursive(
const OptionalDataItem
CustomVehicleDataManagerImpl::FindSchemaByKeyNonRecursive(
const std::string& key) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto& oem_items = vehicle_data_provider_.GetVehicleDataItems();
auto compare_by_key = [&key](const policy_table::VehicleDataItem& item) {
@@ -562,7 +562,7 @@ CustomVehicleDataManagerImpl::FindSchemaByKeyNonRecursive(
const OptionalDataItem CustomVehicleDataManagerImpl::FindSchemaByKeyRecursive(
const std::string& key) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto& oem_items = vehicle_data_provider_.GetVehicleDataItems();
auto compare_by_key = [&key](const policy_table::VehicleDataItem& item) {
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_data_item_schema.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_data_item_schema.cc
index 750da9fa6e..b4ae7aca45 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_data_item_schema.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_data_item_schema.cc
@@ -4,7 +4,7 @@
namespace vehicle_info_plugin {
#ifdef ENABLE_LOG
-CREATE_LOGGERPTR_LOCAL(vehicle_data_logger, "VehicleDataItemSchema");
+SDL_CREATE_LOG_VARIABLE("VehicleDataItemSchema");
#endif // ENABLE_LOG
VehicleDataItemSchema::VehicleDataItemSchema(PolicyDataItem& policy_item,
@@ -153,7 +153,7 @@ smart_objects::ISchemaItemPtr VehicleDataItemSchema::GetPODTypeSchema(
std::string error_msg = std::string("Invalid POD type provided: ") +
std::string(policy_item.type);
- LOG4CXX_ERROR(vehicle_data_logger, error_msg.c_str());
+ SDL_LOG_ERROR(error_msg.c_str());
return nullptr;
}
@@ -168,7 +168,7 @@ smart_objects::ISchemaItemPtr VehicleDataItemSchema::getEnumSchema(
const std::string& type_name) const {
auto enum_schema = policy_table::EnumSchemaItemFactory::Get(type_name);
if (!enum_schema) {
- LOG4CXX_ERROR(vehicle_data_logger, "NULL pointer: " << type_name);
+ SDL_LOG_ERROR("NULL pointer: " << type_name);
}
return enum_schema;
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc
index 149299d3bb..952f980984 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc
@@ -33,7 +33,7 @@
#include "vehicle_info_plugin/vehicle_info_app_extension.h"
#include "vehicle_info_plugin/vehicle_info_plugin.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "VehicleInfoPlugin")
+SDL_CREATE_LOG_VARIABLE("VehicleInfoPlugin")
namespace vehicle_info_plugin {
@@ -45,22 +45,22 @@ VehicleInfoAppExtension::VehicleInfoAppExtension(
VehicleInfoAppExtension::VehicleInfoAppExtensionUID)
, plugin_(plugin)
, app_(app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
VehicleInfoAppExtension::~VehicleInfoAppExtension() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
bool VehicleInfoAppExtension::subscribeToVehicleInfo(
const std::string& vehicle_data) {
- LOG4CXX_DEBUG(logger_, vehicle_data);
+ SDL_LOG_DEBUG(vehicle_data);
return subscribed_data_.insert(vehicle_data).second;
}
bool VehicleInfoAppExtension::unsubscribeFromVehicleInfo(
const std::string& vehicle_data) {
- LOG4CXX_DEBUG(logger_, vehicle_data);
+ SDL_LOG_DEBUG(vehicle_data);
auto it = subscribed_data_.find(vehicle_data);
if (it != subscribed_data_.end()) {
subscribed_data_.erase(it);
@@ -70,13 +70,13 @@ bool VehicleInfoAppExtension::unsubscribeFromVehicleInfo(
}
void VehicleInfoAppExtension::unsubscribeFromVehicleInfo() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
subscribed_data_.clear();
}
bool VehicleInfoAppExtension::isSubscribedToVehicleInfo(
const std::string& vehicle_data) const {
- LOG4CXX_DEBUG(logger_, vehicle_data);
+ SDL_LOG_DEBUG(vehicle_data);
return subscribed_data_.find(vehicle_data) != subscribed_data_.end();
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc
index 52ee9f476d..5bebdf8e2a 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc
@@ -32,7 +32,7 @@
#include "vehicle_info_plugin/vehicle_info_command_factory.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "VehicleInfoPlugin")
+SDL_CREATE_LOG_VARIABLE("VehicleInfoPlugin")
namespace vehicle_info_plugin {
@@ -57,7 +57,7 @@ VehicleInfoCommandFactory::VehicleInfoCommandFactory(
hmi_capabilities,
policy_handler,
custom_vehicle_data_manager)) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
VehicleInfoCommandFactory::~VehicleInfoCommandFactory() {}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc
index e8d852b612..3687245066 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc
@@ -52,7 +52,7 @@
#include "vehicle_info_plugin/commands/hmi/vi_unsubscribe_vehicle_data_request.h"
#include "vehicle_info_plugin/commands/hmi/vi_unsubscribe_vehicle_data_response.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "VehicleInfoPlugin")
+SDL_CREATE_LOG_VARIABLE("VehicleInfoPlugin")
namespace vehicle_info_plugin {
namespace strings = app_mngr::strings;
@@ -108,7 +108,7 @@ struct VehicleInfoCommandCreatorFactory {
template <typename VehicleInfoCommandType>
application_manager::CommandCreator& GetCreator() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
static VehicleInfoCommandCreator<VehicleInfoCommandType> res(params_);
return res;
}
@@ -126,7 +126,7 @@ VehicleInfoHmiCommandFactory::VehicleInfoHmiCommandFactory(
, hmi_capabilities_(hmi_capabilities)
, policy_handler_(policy_handler)
, custom_vehicle_data_manager_(custom_vehicle_data_manager) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
app_mngr::CommandSharedPtr VehicleInfoHmiCommandFactory::CreateCommand(
@@ -150,9 +150,8 @@ app_mngr::CommandSharedPtr VehicleInfoHmiCommandFactory::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).create(message);
}
@@ -212,7 +211,7 @@ app_mngr::CommandCreator& VehicleInfoHmiCommandFactory::buildCommandCreator(
? factory.GetCreator<commands::VIDiagnosticMessageRequest>()
: factory.GetCreator<commands::VIDiagnosticMessageResponse>();
default:
- LOG4CXX_WARN(logger_, "Unsupported function_id: " << function_id);
+ SDL_LOG_WARN("Unsupported function_id: " << function_id);
return factory.GetCreator<VehicleInfoInvalidCommand>();
}
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc
index c3c8d9c8d7..b2d7df5d28 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc
@@ -52,7 +52,7 @@
#include "vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_request.h"
#include "vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_response.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "VehicleInfoPlugin")
+SDL_CREATE_LOG_VARIABLE("VehicleInfoPlugin")
namespace vehicle_info_plugin {
namespace strings = app_mngr::strings;
@@ -108,7 +108,7 @@ struct VehicleInfoCommandCreatorFactory {
template <typename VehicleInfoCommandType>
application_manager::CommandCreator& GetCreator() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
static VehicleInfoCommandCreator<VehicleInfoCommandType> res(params_);
return res;
}
@@ -126,7 +126,7 @@ VehicleInfoMobileCommandFactory::VehicleInfoMobileCommandFactory(
, hmi_capabilities_(hmi_capabilities)
, policy_handler_(policy_handler)
, custom_vehicle_data_manager_(custom_vehicle_data_manager) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
app_mngr::CommandSharedPtr VehicleInfoMobileCommandFactory::CreateCommand(
@@ -150,9 +150,8 @@ app_mngr::CommandSharedPtr VehicleInfoMobileCommandFactory::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 get_creator_factory(function_id, message_type, source).create(message);
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_plugin.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_plugin.cc
index 1c553fb84d..18c9b6413e 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_plugin.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_plugin.cc
@@ -40,7 +40,7 @@
#include "vehicle_info_plugin/vehicle_info_command_factory.h"
namespace vehicle_info_plugin {
-CREATE_LOGGERPTR_GLOBAL(logger_, "VehicleInfoPlugin")
+SDL_CREATE_LOG_VARIABLE("VehicleInfoPlugin")
namespace strings = application_manager::strings;
namespace plugins = application_manager::plugin_manager;
@@ -117,7 +117,7 @@ void VehicleInfoPlugin::OnApplicationEvent(
}
void VehicleInfoPlugin::UnsubscribeFromRemovedVDItems() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
typedef std::vector<std::string> StringsVector;
auto get_items_to_unsubscribe = [this]() -> StringsVector {
@@ -131,10 +131,9 @@ void VehicleInfoPlugin::UnsubscribeFromRemovedVDItems() {
subscription_name)) {
ext.unsubscribeFromVehicleInfo(subscription_name);
if (!helpers::in_range(output_items_list, subscription_name)) {
- LOG4CXX_DEBUG(logger_,
- "Vehicle data item "
- << subscription_name
- << " has been removed by policy");
+ SDL_LOG_DEBUG("Vehicle data item "
+ << subscription_name
+ << " has been removed by policy");
output_items_list.push_back(subscription_name);
}
}
@@ -146,7 +145,7 @@ void VehicleInfoPlugin::UnsubscribeFromRemovedVDItems() {
const StringsVector items_to_unsubscribe = get_items_to_unsubscribe();
if (items_to_unsubscribe.empty()) {
- LOG4CXX_DEBUG(logger_, "There is no data to unsubscribe");
+ SDL_LOG_DEBUG("There is no data to unsubscribe");
return;
}
@@ -172,14 +171,14 @@ bool IsOtherAppAlreadySubscribedFor(
void VehicleInfoPlugin::ProcessResumptionSubscription(
application_manager::Application& app, VehicleInfoAppExtension& ext) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject msg_params =
smart_objects::SmartObject(smart_objects::SmartType_Map);
const auto& subscriptions = ext.Subscriptions();
if (subscriptions.empty()) {
- LOG4CXX_DEBUG(logger_, "No vehicle data to subscribe. Exiting");
+ SDL_LOG_DEBUG("No vehicle data to subscribe. Exiting");
return;
}
@@ -216,7 +215,7 @@ application_manager::ApplicationSharedPtr FindAppSubscribedToIVI(
smart_objects::SmartObjectSPtr VehicleInfoPlugin::GetUnsubscribeIVIRequest(
const std::vector<std::string>& ivi_names) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace smart_objects;
auto msg_params = smart_objects::SmartObject(smart_objects::SmartType_Map);
@@ -284,12 +283,12 @@ void VehicleInfoPlugin::DeleteSubscriptions(
extern "C" __attribute__((visibility("default")))
application_manager::plugin_manager::RPCPlugin*
-Create() {
+Create(logger::Logger* logger_instance) {
+ logger::Logger::instance(logger_instance);
return new vehicle_info_plugin::VehicleInfoPlugin();
}
extern "C" __attribute__((visibility("default"))) void Delete(
application_manager::plugin_manager::RPCPlugin* data) {
delete data;
- DELETE_THREAD_LOGGER(vehicle_info_plugin::logger_);
}