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/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification.cc | |
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/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification.cc')
-rw-r--r-- | src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification.cc index df3bce0154..66a0fbb3f6 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification.cc @@ -41,6 +41,8 @@ namespace sdl_rpc_plugin { using namespace application_manager; namespace commands { +SDL_CREATE_LOG_VARIABLE("Commands") + OnHMIStatusNotification::OnHMIStatusNotification( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -56,20 +58,20 @@ OnHMIStatusNotification::OnHMIStatusNotification( OnHMIStatusNotification::~OnHMIStatusNotification() {} void OnHMIStatusNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); (*message_)[strings::params][strings::message_type] = static_cast<int32_t>(application_manager::MessageType::kNotification); ApplicationSharedPtr app = application_manager_.application(connection_key()); if (app.use_count() == 0) { - LOG4CXX_ERROR(logger_, "OnHMIStatusNotification application doesn't exist"); + SDL_LOG_ERROR("OnHMIStatusNotification application doesn't exist"); return; } // If the response has no hmi level, return and don't send the notification if (!(*message_)[strings::msg_params].keyExists(strings::hmi_level)) { // our notification clearly isn't well-formed - LOG4CXX_ERROR(logger_, "OnHMIStatusNotification has no hmiLevel field"); + SDL_LOG_ERROR("OnHMIStatusNotification has no hmiLevel field"); return; } @@ -82,8 +84,7 @@ void OnHMIStatusNotification::Run() { (mobile_apis::HMILevel::HMI_LIMITED == hmi_level)) { if (!(app->tts_properties_in_full())) { app->set_tts_properties_in_full(true); - LOG4CXX_INFO(logger_, - "OnHMIStatusNotification AddAppToTTSGlobalPropertiesList"); + SDL_LOG_INFO("OnHMIStatusNotification AddAppToTTSGlobalPropertiesList"); application_manager_.AddAppToTTSGlobalPropertiesList(app->app_id()); } } |