summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc')
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc
index 9c868172f5..90ed038b89 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc
@@ -48,6 +48,8 @@ namespace commands {
namespace mobile {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnSystemRequestNotification::OnSystemRequestNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -63,7 +65,7 @@ OnSystemRequestNotification::OnSystemRequestNotification(
OnSystemRequestNotification::~OnSystemRequestNotification() {}
void OnSystemRequestNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace application_manager;
using namespace mobile_apis;
using namespace helpers;
@@ -71,8 +73,7 @@ void OnSystemRequestNotification::Run() {
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (app.use_count() == 0) {
- LOG4CXX_ERROR(logger_,
- "Application with connection key " << connection_key()
+ SDL_LOG_ERROR("Application with connection key " << connection_key()
<< " is not registered.");
return;
}
@@ -88,8 +89,7 @@ void OnSystemRequestNotification::Run() {
if (!policy_handler.IsRequestTypeAllowed(
app->device(), app->policy_app_id(), request_type)) {
- LOG4CXX_WARN(logger_,
- "Request type " << stringified_request_type
+ SDL_LOG_WARN("Request type " << stringified_request_type
<< " is not allowed by policies");
return;
}
@@ -101,15 +101,13 @@ void OnSystemRequestNotification::Run() {
(*message_)[strings::msg_params][strings::request_subtype].asString();
if (!policy_handler.IsRequestSubTypeAllowed(app->policy_app_id(),
request_subtype)) {
- LOG4CXX_ERROR(logger_,
- "Request subtype: " << request_subtype
+ SDL_LOG_ERROR("Request subtype: " << request_subtype
<< " is DISALLOWED by policies");
return;
}
}
- LOG4CXX_DEBUG(logger_,
- "Processing Request type : " << stringified_request_type);
+ SDL_LOG_DEBUG("Processing Request type : " << stringified_request_type);
const bool binary_data_is_required =
Compare<mobile_apis::RequestType::eType, EQ, ONE>(
@@ -154,8 +152,7 @@ void OnSystemRequestNotification::Run() {
} else if (mobile_apis::RequestType::LOCK_SCREEN_ICON_URL == request_type) {
if (!(*message_)[strings::msg_params].keyExists(strings::url) ||
(*message_)[strings::msg_params][strings::url].empty()) {
- LOG4CXX_ERROR(logger_,
- "discarding LOCK_SCREEN_ICON_URL request without URL");
+ SDL_LOG_ERROR("discarding LOCK_SCREEN_ICON_URL request without URL");
return;
}
}
@@ -165,7 +162,7 @@ void OnSystemRequestNotification::Run() {
#ifdef PROPRIETARY_MODE
void OnSystemRequestNotification::AddHeader(BinaryMessage& message) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const uint32_t timeout = policy_handler_.TimeoutExchangeSec();
size_t content_length;
@@ -223,8 +220,8 @@ void OnSystemRequestNotification::AddHeader(BinaryMessage& message) const {
message.clear();
message.assign(header.begin(), header.end());
- LOG4CXX_DEBUG(
- logger_, "Header added: " << std::string(message.begin(), message.end()));
+ SDL_LOG_DEBUG(
+ "Header added: " << std::string(message.begin(), message.end()));
}
size_t OnSystemRequestNotification::ParsePTString(