summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_request.cc
diff options
context:
space:
mode:
authorVladSemenyuk <VSemenyuk@luxoft.com>2020-09-01 20:35:06 +0300
committerGitHub <noreply@github.com>2020-09-01 13:35:06 -0400
commit062d3b0f2a6eb2185d14dc80a885cdfe4860ce23 (patch)
tree766c4725b8b129cec2d420ff65ae7e9731e91194 /src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_request.cc
parent79fb6408810d776278bf3499c5273eb04159b076 (diff)
downloadsdl_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/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_request.cc')
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_request.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_request.cc
index 4882095d42..d020972ce6 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_request.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIIsReadyRequest::UIIsReadyRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,17 +56,17 @@ UIIsReadyRequest::UIIsReadyRequest(
UIIsReadyRequest::~UIIsReadyRequest() {}
void UIIsReadyRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
subscribe_on_event(hmi_apis::FunctionID::UI_IsReady, correlation_id());
SendRequest();
}
void UIIsReadyRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::UI_IsReady: {
- LOG4CXX_DEBUG(logger_, "Received UI_IsReady event");
+ SDL_LOG_DEBUG("Received UI_IsReady event");
unsubscribe_from_event(hmi_apis::FunctionID::UI_IsReady);
const bool is_available = app_mngr::commands::ChangeInterfaceState(
application_manager_, message, HmiInterfaces::HMI_INTERFACE_UI);
@@ -73,8 +75,7 @@ void UIIsReadyRequest::on_event(const event_engine::Event& event) {
if (!app_mngr::commands::CheckAvailabilityHMIInterfaces(
application_manager_, HmiInterfaces::HMI_INTERFACE_UI)) {
UpdateRequiredInterfaceCapabilitiesRequests(hmi_interface::ui);
- LOG4CXX_INFO(logger_,
- "HmiInterfaces::HMI_INTERFACE_UI isn't available");
+ SDL_LOG_INFO("HmiInterfaces::HMI_INTERFACE_UI isn't available");
return;
}
@@ -82,7 +83,7 @@ void UIIsReadyRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}