From 062d3b0f2a6eb2185d14dc80a885cdfe4860ce23 Mon Sep 17 00:00:00 2001 From: VladSemenyuk Date: Tue, 1 Sep 2020 20:35:06 +0300 Subject: [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 * 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 --- .../src/cloud/cloud_websocket_connection_factory.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/components/transport_manager/src/cloud/cloud_websocket_connection_factory.cc') diff --git a/src/components/transport_manager/src/cloud/cloud_websocket_connection_factory.cc b/src/components/transport_manager/src/cloud/cloud_websocket_connection_factory.cc index d072685eef..a5d25c56c1 100644 --- a/src/components/transport_manager/src/cloud/cloud_websocket_connection_factory.cc +++ b/src/components/transport_manager/src/cloud/cloud_websocket_connection_factory.cc @@ -43,7 +43,7 @@ namespace transport_manager { namespace transport_adapter { -CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager") +SDL_CREATE_LOG_VARIABLE("TransportManager") CloudWebsocketConnectionFactory::CloudWebsocketConnectionFactory( TransportAdapterController* controller) @@ -55,7 +55,7 @@ TransportAdapter::Error CloudWebsocketConnectionFactory::Init() { TransportAdapter::Error CloudWebsocketConnectionFactory::CreateConnection( const DeviceUID& device_uid, const ApplicationHandle& app_handle) { - LOG4CXX_AUTO_TRACE(logger_); + SDL_LOG_AUTO_TRACE(); auto connection = controller_->FindPendingConnection(device_uid, app_handle); std::shared_ptr ws_connection = @@ -66,8 +66,8 @@ TransportAdapter::Error CloudWebsocketConnectionFactory::CreateConnection( TransportAdapter::Error error = ws_connection->Start(); if (TransportAdapter::OK != error) { - LOG4CXX_ERROR( - logger_, + SDL_LOG_ERROR( + "Cloud Websocket connection::Start() failed with error: " << error); } return error; -- cgit v1.2.1