From 148f6e0c04c8448af0b26f30734faffc9c00d056 Mon Sep 17 00:00:00 2001 From: Dmitry Chmerev Date: Sat, 29 Mar 2014 21:35:04 +0400 Subject: [PATCH] ENABLE_LOG option added to turn logger completely off --- src/appMain/life_cycle.cc | 2 + src/appMain/life_cycle.h | 2 + .../application_manager/application_manager_impl.h | 2 + .../application_manager/commands/command_impl.h | 2 + .../include/application_manager/hmi_capabilities.h | 2 + .../application_manager/hmi_command_factory.h | 2 + .../application_manager/mobile_message_handler.h | 2 + .../policies_manager/policies_manager.h | 2 + .../include/application_manager/resume_ctrl.h | 2 + .../src/application_manager_impl.cc | 4 +- .../src/commands/command_impl.cc | 2 + .../application_manager/src/hmi_capabilities.cc | 2 + .../application_manager/src/hmi_command_factory.cc | 2 + .../src/mobile_message_handler.cc | 2 + .../src/policies_manager/policies_manager.cc | 2 + .../application_manager/src/resume_ctrl.cpp | 2 + .../include/connection_handler/connection.h | 2 + .../connection_handler/connection_handler_impl.h | 2 + .../include/connection_handler/device.h | 2 + .../connection_handler/src/connection.cc | 2 + .../src/connection_handler_impl.cc | 4 +- src/components/connection_handler/src/device.cc | 2 + src/components/dbus/codegen/make_qml_dbus_cpp.py | 4 +- src/components/dbus/include/dbus/dbus_adapter.h | 2 + .../hmi_message_handler/hmi_message_handler_impl.h | 2 + .../hmi_message_handler/messagebroker_adapter.h | 2 + .../src/hmi_message_handler_impl.cc | 2 + .../src/messagebroker_adapter.cc | 2 + .../audio/a2dp_source_player_adapter.h | 2 + .../audio/audio_stream_sender_thread.h | 2 + .../audio/from_mic_recorder_adapter.h | 2 + .../audio/from_mic_recorder_listener.h | 2 + .../audio/from_mic_to_file_recorder_thread.h | 2 + .../include/media_manager/media_adapter_impl.h | 2 + .../include/media_manager/media_manager_impl.h | 2 + .../include/media_manager/streamer_listener.h | 2 + .../src/audio/a2dp_source_player_adapter.cc | 6 +++ .../src/audio/audio_stream_sender_thread.cc | 2 + .../src/audio/from_mic_recorder_adapter.cc | 2 + .../src/audio/from_mic_recorder_listener.cc | 2 + .../src/audio/from_mic_to_file_recorder_thread.cc | 2 + .../media_manager/src/media_adapter_impl.cc | 2 + .../media_manager/src/media_manager_impl.cc | 2 + .../media_manager/src/streamer_listener.cc | 2 + .../include/policies/permissions_calculator.h | 2 + .../include/policies/policy_manager_impl.h | 2 + .../policies/src/permissions_calculator.cc | 2 + src/components/policies/src/policy_manager_impl.cc | 2 + .../protocol_handler/protocol_handler_impl.h | 2 + .../protocol_handler/src/protocol_handler_impl.cc | 2 + .../request_watchdog/src/request_watchdog.cc | 2 + .../transport_adapter/threaded_socket_connection.h | 2 + .../transport_adapter/transport_adapter_impl.h | 2 + .../transport_adapter_listener_impl.h | 2 + .../transport_manager/transport_manager_impl.h | 2 + .../transport_adapter_listener_impl.cc | 2 + .../src/transport_manager_impl.cc | 2 + .../src/usb/libusb/usb_connection.cc | 2 +- src/components/utils/include/utils/logger.h | 50 ++++++++++++++++++++++ .../utils/include/utils/threads/thread.h | 2 + src/components/utils/src/threads/posix_thread.cc | 2 + ...TransportManagerTestWithMultiThreadedClient.cpp | 2 + 62 files changed, 178 insertions(+), 4 deletions(-) diff --git a/src/appMain/life_cycle.cc b/src/appMain/life_cycle.cc index 7c6c928..2e04128 100644 --- a/src/appMain/life_cycle.cc +++ b/src/appMain/life_cycle.cc @@ -40,8 +40,10 @@ using threads::Thread; namespace main_namespace { +#ifdef ENABLE_LOG log4cxx::LoggerPtr LifeCycle::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("appMain")); +#endif // ENABLE_LOG namespace { diff --git a/src/appMain/life_cycle.h b/src/appMain/life_cycle.h index e916065..f6ed4e6 100644 --- a/src/appMain/life_cycle.h +++ b/src/appMain/life_cycle.h @@ -98,7 +98,9 @@ class LifeCycle : public utils::Singleton { System::Thread* dbus_adapter_thread_; #endif // QT_HMI +# ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +# endif // ENABLE_LOG DISALLOW_COPY_AND_ASSIGN(LifeCycle); diff --git a/src/components/application_manager/include/application_manager/application_manager_impl.h b/src/components/application_manager/include/application_manager/application_manager_impl.h index b82a64f..33a0659 100644 --- a/src/components/application_manager/include/application_manager/application_manager_impl.h +++ b/src/components/application_manager/include/application_manager/application_manager_impl.h @@ -582,7 +582,9 @@ class ApplicationManagerImpl : public ApplicationManager, hmi_apis::HMI_API* hmi_so_factory_; mobile_apis::MOBILE_API* mobile_so_factory_; +# ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +# endif // ENABLE_LOG static uint32_t corelation_id_; static const uint32_t max_corelation_id_; diff --git a/src/components/application_manager/include/application_manager/commands/command_impl.h b/src/components/application_manager/include/application_manager/commands/command_impl.h index 8fab40e..d12a2e8 100644 --- a/src/components/application_manager/include/application_manager/commands/command_impl.h +++ b/src/components/application_manager/include/application_manager/commands/command_impl.h @@ -40,7 +40,9 @@ namespace application_manager { namespace commands { +#ifdef ENABLE_LOG extern log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG /** * @brief Class is intended to encapsulate RPC as an object diff --git a/src/components/application_manager/include/application_manager/hmi_capabilities.h b/src/components/application_manager/include/application_manager/hmi_capabilities.h index 93d3428..6fa0403 100644 --- a/src/components/application_manager/include/application_manager/hmi_capabilities.h +++ b/src/components/application_manager/include/application_manager/hmi_capabilities.h @@ -405,7 +405,9 @@ class HMICapabilities { smart_objects::SmartObject* prerecorded_speech_; ApplicationManagerImpl* app_mngr_; +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG DISALLOW_COPY_AND_ASSIGN(HMICapabilities); }; diff --git a/src/components/application_manager/include/application_manager/hmi_command_factory.h b/src/components/application_manager/include/application_manager/hmi_command_factory.h index de0fa7e..e12051a 100644 --- a/src/components/application_manager/include/application_manager/hmi_command_factory.h +++ b/src/components/application_manager/include/application_manager/hmi_command_factory.h @@ -56,7 +56,9 @@ class HMICommandFactory { private: HMICommandFactory(); +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG DISALLOW_COPY_AND_ASSIGN(HMICommandFactory); }; diff --git a/src/components/application_manager/include/application_manager/mobile_message_handler.h b/src/components/application_manager/include/application_manager/mobile_message_handler.h index 5d7be9a..20d46a7 100644 --- a/src/components/application_manager/include/application_manager/mobile_message_handler.h +++ b/src/components/application_manager/include/application_manager/mobile_message_handler.h @@ -58,7 +58,9 @@ class MobileMessageHandler { //! ------------------------------------------------------------- private: +# ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +# endif // ENABLE_LOG DISALLOW_COPY_AND_ASSIGN(MobileMessageHandler); }; diff --git a/src/components/application_manager/include/application_manager/policies_manager/policies_manager.h b/src/components/application_manager/include/application_manager/policies_manager/policies_manager.h index e401bc7..31332d6 100644 --- a/src/components/application_manager/include/application_manager/policies_manager/policies_manager.h +++ b/src/components/application_manager/include/application_manager/policies_manager/policies_manager.h @@ -62,7 +62,9 @@ class PoliciesManager { private: PoliciesItems items_; +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG DISALLOW_COPY_AND_ASSIGN(PoliciesManager); }; diff --git a/src/components/application_manager/include/application_manager/resume_ctrl.h b/src/components/application_manager/include/application_manager/resume_ctrl.h index 88aeb0c..2ba1dfd 100644 --- a/src/components/application_manager/include/application_manager/resume_ctrl.h +++ b/src/components/application_manager/include/application_manager/resume_ctrl.h @@ -167,7 +167,9 @@ class ResumeCtrl: public event_engine::EventObserver { ApplicationSharedPtr app; }; +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG /** * @brief Time step to check resumption TIME_OUT diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc index 512588b..9a19301 100644 --- a/src/components/application_manager/src/application_manager_impl.cc +++ b/src/components/application_manager/src/application_manager_impl.cc @@ -54,8 +54,10 @@ namespace application_manager { +#ifdef ENABLE_LOG log4cxx::LoggerPtr ApplicationManagerImpl::logger_ = log4cxx::LoggerPtr( - log4cxx::Logger::getLogger("ApplicationManager")); + log4cxx::Logger::getLogger("ApplicationManager")); +#endif // ENABLE_LOG uint32_t ApplicationManagerImpl::corelation_id_ = 0; const uint32_t ApplicationManagerImpl::max_corelation_id_ = UINT_MAX; diff --git a/src/components/application_manager/src/commands/command_impl.cc b/src/components/application_manager/src/commands/command_impl.cc index 95d96bd..02e3362 100644 --- a/src/components/application_manager/src/commands/command_impl.cc +++ b/src/components/application_manager/src/commands/command_impl.cc @@ -36,8 +36,10 @@ namespace application_manager { namespace commands { +#ifdef ENABLE_LOG log4cxx::LoggerPtr logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("Commands")); +#endif const int32_t CommandImpl::hmi_protocol_type_ = 1; const int32_t CommandImpl::mobile_protocol_type_ = 0; diff --git a/src/components/application_manager/src/hmi_capabilities.cc b/src/components/application_manager/src/hmi_capabilities.cc index 589185d..be6eb94 100644 --- a/src/components/application_manager/src/hmi_capabilities.cc +++ b/src/components/application_manager/src/hmi_capabilities.cc @@ -44,8 +44,10 @@ namespace application_manager { +#ifdef ENABLE_LOG log4cxx::LoggerPtr HMICapabilities::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("HMICapabilities")); +#endif std::map languages_enum_values = { {"EN_US", hmi_apis::Common_Language::EN_US}, diff --git a/src/components/application_manager/src/hmi_command_factory.cc b/src/components/application_manager/src/hmi_command_factory.cc index e0dbea0..2e31890 100644 --- a/src/components/application_manager/src/hmi_command_factory.cc +++ b/src/components/application_manager/src/hmi_command_factory.cc @@ -229,8 +229,10 @@ namespace application_manager { +#ifdef ENABLE_LOG log4cxx::LoggerPtr HMICommandFactory::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("ApplicationManager")); +#endif // ENABLE_LOG CommandSharedPtr HMICommandFactory::CreateCommand( const MessageSharedPtr& message) { diff --git a/src/components/application_manager/src/mobile_message_handler.cc b/src/components/application_manager/src/mobile_message_handler.cc index 94c2772..1dec9d2 100644 --- a/src/components/application_manager/src/mobile_message_handler.cc +++ b/src/components/application_manager/src/mobile_message_handler.cc @@ -50,8 +50,10 @@ const uint8_t kUnknown = 0xF; namespace application_manager { +#ifdef ENABLE_LOG log4cxx::LoggerPtr MobileMessageHandler::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("MobileMessageHandler")); +#endif // ENABLE_LOG application_manager::Message* MobileMessageHandler::HandleIncomingMessageProtocolV1( diff --git a/src/components/application_manager/src/policies_manager/policies_manager.cc b/src/components/application_manager/src/policies_manager/policies_manager.cc index 408d26c..a7754d8 100644 --- a/src/components/application_manager/src/policies_manager/policies_manager.cc +++ b/src/components/application_manager/src/policies_manager/policies_manager.cc @@ -120,8 +120,10 @@ namespace policies_manager { //! --------------------------------------------------------------------------- +#ifdef ENABLE_LOG log4cxx::LoggerPtr PoliciesManager::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("PoliciesManager")); +#endif // ENABLE_LOG //! --------------------------------------------------------------------------- diff --git a/src/components/application_manager/src/resume_ctrl.cpp b/src/components/application_manager/src/resume_ctrl.cpp index a1db687..e9d8ffe 100644 --- a/src/components/application_manager/src/resume_ctrl.cpp +++ b/src/components/application_manager/src/resume_ctrl.cpp @@ -14,8 +14,10 @@ #include "resumption/last_state.h" namespace application_manager { +#ifdef ENABLE_LOG log4cxx::LoggerPtr ResumeCtrl::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("ResumeCtrl")); +#endif // ENABLE_LOG namespace Formatters = NsSmartDeviceLink::NsJSONHandler::Formatters; ResumeCtrl::ResumeCtrl(ApplicationManagerImpl* app_mngr) diff --git a/src/components/connection_handler/include/connection_handler/connection.h b/src/components/connection_handler/include/connection_handler/connection.h index 7bad902..df95460 100644 --- a/src/components/connection_handler/include/connection_handler/connection.h +++ b/src/components/connection_handler/include/connection_handler/connection.h @@ -200,7 +200,9 @@ class Connection { /** * \brief For logging. */ +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG }; }/* namespace connection_handler */ diff --git a/src/components/connection_handler/include/connection_handler/connection_handler_impl.h b/src/components/connection_handler/include/connection_handler/connection_handler_impl.h index 31277b4..aef4c45 100644 --- a/src/components/connection_handler/include/connection_handler/connection_handler_impl.h +++ b/src/components/connection_handler/include/connection_handler/connection_handler_impl.h @@ -309,7 +309,9 @@ class ConnectionHandlerImpl : public ConnectionHandler, /** *\brief For logging. */ +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG DISALLOW_COPY_AND_ASSIGN(ConnectionHandlerImpl); FRIEND_BASE_SINGLETON_CLASS(ConnectionHandlerImpl); diff --git a/src/components/connection_handler/include/connection_handler/device.h b/src/components/connection_handler/include/connection_handler/device.h index b480aeb..355d72a 100644 --- a/src/components/connection_handler/include/connection_handler/device.h +++ b/src/components/connection_handler/include/connection_handler/device.h @@ -104,7 +104,9 @@ class Device { /** * \brief For logging. */ +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG }; /** diff --git a/src/components/connection_handler/src/connection.cc b/src/components/connection_handler/src/connection.cc index 1ffecb5..38596d6 100644 --- a/src/components/connection_handler/src/connection.cc +++ b/src/components/connection_handler/src/connection.cc @@ -45,8 +45,10 @@ */ namespace connection_handler { +#ifdef ENABLE_LOG log4cxx::LoggerPtr Connection::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("ConnectionHandler")); +#endif // ENABLE_LOG Connection::Connection(ConnectionHandle connection_handle, DeviceHandle connection_device_handle, diff --git a/src/components/connection_handler/src/connection_handler_impl.cc b/src/components/connection_handler/src/connection_handler_impl.cc index 995526f..1dc3934 100644 --- a/src/components/connection_handler/src/connection_handler_impl.cc +++ b/src/components/connection_handler/src/connection_handler_impl.cc @@ -62,8 +62,10 @@ transport_manager::ConnectionUID ConnectionUIDFromHandle(ConnectionHandle handle return transport_manager::ConnectionUID(handle); } +#ifdef ENABLE_LOG log4cxx::LoggerPtr ConnectionHandlerImpl::logger_ = log4cxx::LoggerPtr( - log4cxx::Logger::getLogger("ConnectionHandler")); + log4cxx::Logger::getLogger("ConnectionHandler")); +#endif // ENABLE_LOG ConnectionHandlerImpl::ConnectionHandlerImpl() : connection_handler_observer_(NULL), diff --git a/src/components/connection_handler/src/device.cc b/src/components/connection_handler/src/device.cc index 35c9acb..7746d6d 100644 --- a/src/components/connection_handler/src/device.cc +++ b/src/components/connection_handler/src/device.cc @@ -41,8 +41,10 @@ */ namespace connection_handler { +#ifdef ENABLE_LOG log4cxx::LoggerPtr Device::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("ConnectionHandler")); +#endif // ENABLE_LOG Device::Device(DeviceHandle device_handle, const std::string& user_friendly_name, diff --git a/src/components/dbus/codegen/make_qml_dbus_cpp.py b/src/components/dbus/codegen/make_qml_dbus_cpp.py index 9107813..be44d58 100755 --- a/src/components/dbus/codegen/make_qml_dbus_cpp.py +++ b/src/components/dbus/codegen/make_qml_dbus_cpp.py @@ -728,7 +728,9 @@ source_out.write("""/** source_out.write("#include \"" + header_name + "\"\n\n"); source_out.write("#include \n") source_out.write("#include \n\n") -source_out.write("extern log4cxx::LoggerPtr logger_;\n\n") +source_out.write("#ifdef ENABLE_LOG\n") +source_out.write("extern log4cxx::LoggerPtr logger_;\n") +source_out.write("#endif // ENABLE_LOG\n\n") impl.make_dbus_type_definitions(source_out) impl.make_dbus_adaptor_definitions(source_out) impl.make_dbus_register_metatypes_definition(source_out) diff --git a/src/components/dbus/include/dbus/dbus_adapter.h b/src/components/dbus/include/dbus/dbus_adapter.h index a704fc9..b7660d0 100644 --- a/src/components/dbus/include/dbus/dbus_adapter.h +++ b/src/components/dbus/include/dbus/dbus_adapter.h @@ -79,7 +79,9 @@ class DBusAdapter { const DBusSchema& get_schema() const; protected: +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG /** * \brief calls method on HMI diff --git a/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler_impl.h b/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler_impl.h index 4800f30..f6839aa 100644 --- a/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler_impl.h +++ b/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler_impl.h @@ -113,7 +113,9 @@ class HMIMessageHandlerImpl // Thread that pumps messages being passed to hmi. impl::ToHmiQueue messages_to_hmi_; +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG DISALLOW_COPY_AND_ASSIGN(HMIMessageHandlerImpl); diff --git a/src/components/hmi_message_handler/include/hmi_message_handler/messagebroker_adapter.h b/src/components/hmi_message_handler/include/hmi_message_handler/messagebroker_adapter.h index 6bd2447..d91963c 100644 --- a/src/components/hmi_message_handler/include/hmi_message_handler/messagebroker_adapter.h +++ b/src/components/hmi_message_handler/include/hmi_message_handler/messagebroker_adapter.h @@ -82,7 +82,9 @@ class MessageBrokerAdapter : public HMIMessageAdapter, static const std::string ADDRESS; static const uint16_t PORT; +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG DISALLOW_COPY_AND_ASSIGN(MessageBrokerAdapter); }; } // namespace hmi_message_handler diff --git a/src/components/hmi_message_handler/src/hmi_message_handler_impl.cc b/src/components/hmi_message_handler/src/hmi_message_handler_impl.cc index 7df82fd..48dcbf7 100644 --- a/src/components/hmi_message_handler/src/hmi_message_handler_impl.cc +++ b/src/components/hmi_message_handler/src/hmi_message_handler_impl.cc @@ -35,8 +35,10 @@ namespace hmi_message_handler { +#ifdef ENABLE_LOG log4cxx::LoggerPtr HMIMessageHandlerImpl::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("HMIMessageHandler")); +#endif // ENABLE_LOG HMIMessageHandlerImpl::HMIMessageHandlerImpl() : observer_(NULL), diff --git a/src/components/hmi_message_handler/src/messagebroker_adapter.cc b/src/components/hmi_message_handler/src/messagebroker_adapter.cc index ef23dc3..1eecc2c 100644 --- a/src/components/hmi_message_handler/src/messagebroker_adapter.cc +++ b/src/components/hmi_message_handler/src/messagebroker_adapter.cc @@ -39,8 +39,10 @@ namespace hmi_message_handler { typedef NsMessageBroker::CMessageBrokerController MessageBrokerController; +#ifdef ENABLE_LOG log4cxx::LoggerPtr MessageBrokerAdapter::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("HMIMessageHandler")); +#endif // ENABLE_LOG MessageBrokerAdapter::MessageBrokerAdapter(HMIMessageHandler* handler_param, const std::string& server_address, diff --git a/src/components/media_manager/include/media_manager/audio/a2dp_source_player_adapter.h b/src/components/media_manager/include/media_manager/audio/a2dp_source_player_adapter.h index ae84335..4711334 100644 --- a/src/components/media_manager/include/media_manager/audio/a2dp_source_player_adapter.h +++ b/src/components/media_manager/include/media_manager/audio/a2dp_source_player_adapter.h @@ -58,7 +58,9 @@ class A2DPSourcePlayerAdapter : public MediaAdapterImpl { class A2DPSourcePlayerThread; std::map sources_; +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG DISALLOW_COPY_AND_ASSIGN(A2DPSourcePlayerAdapter); }; diff --git a/src/components/media_manager/include/media_manager/audio/audio_stream_sender_thread.h b/src/components/media_manager/include/media_manager/audio/audio_stream_sender_thread.h index c5ee323..74c1d13 100644 --- a/src/components/media_manager/include/media_manager/audio/audio_stream_sender_thread.h +++ b/src/components/media_manager/include/media_manager/audio/audio_stream_sender_thread.h @@ -126,7 +126,9 @@ class AudioStreamSenderThread : public threads::ThreadDelegate { sync_primitives::Lock shouldBeStoped_lock_; static const int32_t kAudioPassThruTimeout; +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG DISALLOW_COPY_AND_ASSIGN(AudioStreamSenderThread); }; diff --git a/src/components/media_manager/include/media_manager/audio/from_mic_recorder_adapter.h b/src/components/media_manager/include/media_manager/audio/from_mic_recorder_adapter.h index f49526a..9d1bad6 100644 --- a/src/components/media_manager/include/media_manager/audio/from_mic_recorder_adapter.h +++ b/src/components/media_manager/include/media_manager/audio/from_mic_recorder_adapter.h @@ -59,7 +59,9 @@ class FromMicRecorderAdapter : public MediaAdapterImpl { std::string output_file_; int32_t duration_; const int32_t kDefaultDuration; +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG DISALLOW_COPY_AND_ASSIGN(FromMicRecorderAdapter); }; } // namespace media_manager diff --git a/src/components/media_manager/include/media_manager/audio/from_mic_recorder_listener.h b/src/components/media_manager/include/media_manager/audio/from_mic_recorder_listener.h index 37896b3..c1c451f 100644 --- a/src/components/media_manager/include/media_manager/audio/from_mic_recorder_listener.h +++ b/src/components/media_manager/include/media_manager/audio/from_mic_recorder_listener.h @@ -59,7 +59,9 @@ class FromMicRecorderListener : public MediaAdapterListener { threads::Thread* reader_; std::string file_name_; int32_t current_application_; +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG DISALLOW_COPY_AND_ASSIGN(FromMicRecorderListener); }; } // namespace media_manager diff --git a/src/components/media_manager/include/media_manager/audio/from_mic_to_file_recorder_thread.h b/src/components/media_manager/include/media_manager/audio/from_mic_to_file_recorder_thread.h index ff0af43..d9eeddb 100644 --- a/src/components/media_manager/include/media_manager/audio/from_mic_to_file_recorder_thread.h +++ b/src/components/media_manager/include/media_manager/audio/from_mic_to_file_recorder_thread.h @@ -56,7 +56,9 @@ class FromMicToFileRecorderThread : public threads::ThreadDelegate { void set_record_duration(int32_t duration); private: +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG int32_t argc_; gchar** argv_; diff --git a/src/components/media_manager/include/media_manager/media_adapter_impl.h b/src/components/media_manager/include/media_manager/media_adapter_impl.h index 20d44b4..a7d0234 100644 --- a/src/components/media_manager/include/media_manager/media_adapter_impl.h +++ b/src/components/media_manager/include/media_manager/media_adapter_impl.h @@ -56,7 +56,9 @@ class MediaAdapterImpl : public MediaAdapter { int32_t current_application_; private: +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG DISALLOW_COPY_AND_ASSIGN(MediaAdapterImpl); }; diff --git a/src/components/media_manager/include/media_manager/media_manager_impl.h b/src/components/media_manager/include/media_manager/media_manager_impl.h index 87f948a..d0e84a3 100644 --- a/src/components/media_manager/include/media_manager/media_manager_impl.h +++ b/src/components/media_manager/include/media_manager/media_manager_impl.h @@ -82,7 +82,9 @@ class MediaManagerImpl : public MediaManager, bool audio_stream_active_; private: +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG DISALLOW_COPY_AND_ASSIGN(MediaManagerImpl); FRIEND_BASE_SINGLETON_CLASS(MediaManagerImpl); diff --git a/src/components/media_manager/include/media_manager/streamer_listener.h b/src/components/media_manager/include/media_manager/streamer_listener.h index df9da33..7210a1a 100644 --- a/src/components/media_manager/include/media_manager/streamer_listener.h +++ b/src/components/media_manager/include/media_manager/streamer_listener.h @@ -53,7 +53,9 @@ class StreamerListener : public MediaAdapterListener { virtual void OnActivityEnded(int32_t application_key); private: int32_t current_application_; +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG DISALLOW_COPY_AND_ASSIGN(StreamerListener); }; } // namespace media_manager diff --git a/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc b/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc index 892c638..6e59b0e 100644 --- a/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc +++ b/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc @@ -42,8 +42,10 @@ namespace media_manager { +#ifdef ENABLE_LOG log4cxx::LoggerPtr A2DPSourcePlayerAdapter::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("A2DPSourcePlayerAdapter")); +#endif // ENABLE_LOG class A2DPSourcePlayerAdapter::A2DPSourcePlayerThread : public threads::ThreadDelegate { @@ -55,7 +57,9 @@ class A2DPSourcePlayerAdapter::A2DPSourcePlayerThread bool exitThreadMain(); private: +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG // The Sample format to use static const pa_sample_spec sSampleFormat_; @@ -159,8 +163,10 @@ bool A2DPSourcePlayerAdapter::is_app_performing_activity(int32_t return (application_key == current_application_); } +#ifdef ENABLE_LOG log4cxx::LoggerPtr A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::logger_ = log4cxx::LoggerPtr(log4cxx::Logger::getLogger("A2DPSourcePlayerThread")); +#endif // ENABLE_LOG const pa_sample_spec A2DPSourcePlayerAdapter::A2DPSourcePlayerThread:: sSampleFormat_ = { diff --git a/src/components/media_manager/src/audio/audio_stream_sender_thread.cc b/src/components/media_manager/src/audio/audio_stream_sender_thread.cc index 14b0333..e690093 100644 --- a/src/components/media_manager/src/audio/audio_stream_sender_thread.cc +++ b/src/components/media_manager/src/audio/audio_stream_sender_thread.cc @@ -54,8 +54,10 @@ namespace media_manager { using sync_primitives::AutoLock; const int32_t AudioStreamSenderThread::kAudioPassThruTimeout = 1; +#ifdef ENABLE_LOG log4cxx::LoggerPtr AudioStreamSenderThread::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("AudioPassThruThread")); +#endif // ENABLE_LOG AudioStreamSenderThread::AudioStreamSenderThread( const std::string fileName, uint32_t session_key) diff --git a/src/components/media_manager/src/audio/from_mic_recorder_adapter.cc b/src/components/media_manager/src/audio/from_mic_recorder_adapter.cc index 94fec18..4eb3f3c 100644 --- a/src/components/media_manager/src/audio/from_mic_recorder_adapter.cc +++ b/src/components/media_manager/src/audio/from_mic_recorder_adapter.cc @@ -37,8 +37,10 @@ namespace media_manager { +#ifdef ENABLE_LOG log4cxx::LoggerPtr FromMicRecorderAdapter::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("FromMicRecorderAdapter")); +#endif // ENABLE_LOG FromMicRecorderAdapter::FromMicRecorderAdapter() : recorder_thread_(NULL) diff --git a/src/components/media_manager/src/audio/from_mic_recorder_listener.cc b/src/components/media_manager/src/audio/from_mic_recorder_listener.cc index a64e476..a44b6ce 100644 --- a/src/components/media_manager/src/audio/from_mic_recorder_listener.cc +++ b/src/components/media_manager/src/audio/from_mic_recorder_listener.cc @@ -36,8 +36,10 @@ namespace media_manager { +#ifdef ENABLE_LOG log4cxx::LoggerPtr FromMicRecorderListener::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("FromMicRecorderListener")); +#endif // ENABLE_LOG FromMicRecorderListener::FromMicRecorderListener( const std::string& file_name) diff --git a/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc b/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc index 1763957..adf31de 100644 --- a/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc +++ b/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc @@ -36,8 +36,10 @@ namespace media_manager { +#ifdef ENABLE_LOG log4cxx::LoggerPtr FromMicToFileRecorderThread::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("FromMicToFileRecorderThread")); +#endif // ENABLE_LOG GMainLoop* FromMicToFileRecorderThread::loop = NULL; diff --git a/src/components/media_manager/src/media_adapter_impl.cc b/src/components/media_manager/src/media_adapter_impl.cc index 24e25a6..bfa072f 100644 --- a/src/components/media_manager/src/media_adapter_impl.cc +++ b/src/components/media_manager/src/media_adapter_impl.cc @@ -34,8 +34,10 @@ namespace media_manager { +#ifdef ENABLE_LOG log4cxx::LoggerPtr MediaAdapterImpl::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("MediaAdapterImpl")); +#endif // ENABLE_LOG MediaAdapterImpl::MediaAdapterImpl() : current_application_(0) { diff --git a/src/components/media_manager/src/media_manager_impl.cc b/src/components/media_manager/src/media_manager_impl.cc index e692d88..94e042b 100644 --- a/src/components/media_manager/src/media_manager_impl.cc +++ b/src/components/media_manager/src/media_manager_impl.cc @@ -52,8 +52,10 @@ namespace media_manager { +#ifdef ENABLE_LOG log4cxx::LoggerPtr MediaManagerImpl::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("MediaManagerImpl")); +#endif // ENABLE_LOG MediaManagerImpl::MediaManagerImpl() : protocol_handler_(NULL) diff --git a/src/components/media_manager/src/streamer_listener.cc b/src/components/media_manager/src/streamer_listener.cc index 656476b..8a7e024 100644 --- a/src/components/media_manager/src/streamer_listener.cc +++ b/src/components/media_manager/src/streamer_listener.cc @@ -35,8 +35,10 @@ namespace media_manager { +#ifdef ENABLE_LOG log4cxx::LoggerPtr StreamerListener::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("StreamerListener")); +#endif // ENABLE_LOG StreamerListener::StreamerListener() : current_application_(0) { diff --git a/src/components/policies/include/policies/permissions_calculator.h b/src/components/policies/include/policies/permissions_calculator.h index c96ebaa..810b2d6 100644 --- a/src/components/policies/include/policies/permissions_calculator.h +++ b/src/components/policies/include/policies/permissions_calculator.h @@ -132,7 +132,9 @@ class PermissionsCalculator { /** * @brief Logger */ +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG }; } // namespace policies diff --git a/src/components/policies/include/policies/policy_manager_impl.h b/src/components/policies/include/policies/policy_manager_impl.h index adfddf8..04acab7 100644 --- a/src/components/policies/include/policies/policy_manager_impl.h +++ b/src/components/policies/include/policies/policy_manager_impl.h @@ -109,7 +109,9 @@ class PolicyManagerImpl : public PolicyManager, /** * @brief Logger */ +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG /** * @brief Result of call of public method Init() diff --git a/src/components/policies/src/permissions_calculator.cc b/src/components/policies/src/permissions_calculator.cc index 240ed13..08ec8b2 100644 --- a/src/components/policies/src/permissions_calculator.cc +++ b/src/components/policies/src/permissions_calculator.cc @@ -48,8 +48,10 @@ namespace jsonhandler = NsSmartDeviceLink::NsJSONHandler; using ::NsSmartDeviceLink::NsSmartObjects::SmartObject; using ::NsSmartDeviceLink::NsSmartObjects::SmartType; +#ifdef ENABLE_LOG log4cxx::LoggerPtr PermissionsCalculator::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("Policies")); +#endif // ENABLE_LOG //---------------------------------------------------------------------------- diff --git a/src/components/policies/src/policy_manager_impl.cc b/src/components/policies/src/policy_manager_impl.cc index 095cdc0..8599572 100644 --- a/src/components/policies/src/policy_manager_impl.cc +++ b/src/components/policies/src/policy_manager_impl.cc @@ -41,8 +41,10 @@ namespace policies { namespace smart_objects = NsSmartDeviceLink::NsSmartObjects; +#ifdef ENABLE_LOG log4cxx::LoggerPtr PolicyManagerImpl::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("Policies")); +#endif // ENABLE_LOG //--------------------------------------------------------------- diff --git a/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h b/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h index aafae07..92bc51d 100644 --- a/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h +++ b/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h @@ -416,7 +416,9 @@ class ProtocolHandlerImpl /** * \brief For logging. */ +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG /** *\brief Pointer on instance of class implementing IProtocolObserver diff --git a/src/components/protocol_handler/src/protocol_handler_impl.cc b/src/components/protocol_handler/src/protocol_handler_impl.cc index 251546c..707dbef 100644 --- a/src/components/protocol_handler/src/protocol_handler_impl.cc +++ b/src/components/protocol_handler/src/protocol_handler_impl.cc @@ -42,8 +42,10 @@ namespace protocol_handler { +#ifdef ENABLE_LOG log4cxx::LoggerPtr ProtocolHandlerImpl::logger_ = log4cxx::LoggerPtr( log4cxx::Logger::getLogger("ProtocolHandler")); +#endif // ENABLE_LOG /** diff --git a/src/components/request_watchdog/src/request_watchdog.cc b/src/components/request_watchdog/src/request_watchdog.cc index aafbdf3..b7396dc 100644 --- a/src/components/request_watchdog/src/request_watchdog.cc +++ b/src/components/request_watchdog/src/request_watchdog.cc @@ -46,8 +46,10 @@ using namespace sync_primitives; const int32_t RequestWatchdog::DEFAULT_CYCLE_TIMEOUT; +#ifdef ENABLE_LOG log4cxx::LoggerPtr RequestWatchdog::logger_ = log4cxx::LoggerPtr(log4cxx::Logger::getLogger("RequestWatchdog")); +#endif // ENABLE_LOG /* Watchdog* RequestWatchdog::instance() { static RequestWatchdog instnc; diff --git a/src/components/transport_manager/include/transport_manager/transport_adapter/threaded_socket_connection.h b/src/components/transport_manager/include/transport_manager/transport_adapter/threaded_socket_connection.h index 1778e5e..8192caf 100644 --- a/src/components/transport_manager/include/transport_manager/transport_adapter/threaded_socket_connection.h +++ b/src/components/transport_manager/include/transport_manager/transport_adapter/threaded_socket_connection.h @@ -157,7 +157,9 @@ class ThreadedSocketConnection : public Connection { const ApplicationHandle app_handle_; }; +#ifdef ENABLE_LOG extern log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG } // namespace transport_adapter } // namespace transport_manager diff --git a/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h b/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h index ac22931..b66d27f 100644 --- a/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h +++ b/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h @@ -490,7 +490,9 @@ class TransportAdapterImpl : public TransportAdapter, ClientConnectionListener* client_connection_listener_; }; +#ifdef ENABLE_LOG extern log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG } // namespace transport_adapter } // namespace transport_manager diff --git a/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener_impl.h b/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener_impl.h index 3a9975e..2493975 100644 --- a/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener_impl.h +++ b/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener_impl.h @@ -294,7 +294,9 @@ class TransportAdapterListenerImpl /** * \brief For logging. */ +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG TransportManagerImpl* transport_manager_impl_; TransportAdapter* transport_adapter_; }; diff --git a/src/components/transport_manager/include/transport_manager/transport_manager_impl.h b/src/components/transport_manager/include/transport_manager/transport_manager_impl.h index fa74fad..409e227 100755 --- a/src/components/transport_manager/include/transport_manager/transport_manager_impl.h +++ b/src/components/transport_manager/include/transport_manager/transport_manager_impl.h @@ -330,7 +330,9 @@ class TransportManagerImpl : public TransportManager { /** * \brief For logging. */ +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG /** * @brief store messages diff --git a/src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc b/src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc index a4c9e00..7cbd01f 100644 --- a/src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc +++ b/src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc @@ -42,8 +42,10 @@ namespace transport_manager { +#ifdef ENABLE_LOG log4cxx::LoggerPtr TransportAdapterListenerImpl::logger_ = log4cxx::LoggerPtr(log4cxx::Logger::getLogger("TransportManager")); +#endif // ENABLE_LOG TransportAdapterListenerImpl::~TransportAdapterListenerImpl() {} diff --git a/src/components/transport_manager/src/transport_manager_impl.cc b/src/components/transport_manager/src/transport_manager_impl.cc index cba7c73..3d9ecd5 100644 --- a/src/components/transport_manager/src/transport_manager_impl.cc +++ b/src/components/transport_manager/src/transport_manager_impl.cc @@ -58,8 +58,10 @@ using ::transport_manager::transport_adapter::TransportAdapter; namespace transport_manager { +#ifdef ENABLE_LOG log4cxx::LoggerPtr TransportManagerImpl::logger_ = log4cxx::LoggerPtr(log4cxx::Logger::getLogger("TransportManager")); +#endif // ENABLE_LOG TransportManagerImpl::Connection TransportManagerImpl::convert(TransportManagerImpl::ConnectionInternal& p) { TransportManagerImpl::Connection c; diff --git a/src/components/transport_manager/src/usb/libusb/usb_connection.cc b/src/components/transport_manager/src/usb/libusb/usb_connection.cc index 00c792d..9a1b4c8 100644 --- a/src/components/transport_manager/src/usb/libusb/usb_connection.cc +++ b/src/components/transport_manager/src/usb/libusb/usb_connection.cc @@ -105,7 +105,7 @@ bool UsbConnection::PostInTransfer() { void UsbConnection::OnInTransfer(libusb_transfer* transfer) { if (transfer->status == LIBUSB_TRANSFER_COMPLETED) { - if (logger_->isTraceEnabled()) { + if (LOG4CXX_IS_TRACE_ENABLED(logger_)) { std::ostringstream hexdata; for (int i = 0; i < transfer->actual_length; ++i) { hexdata << " " << std::hex << std::setw(2) << std::setfill('0') diff --git a/src/components/utils/include/utils/logger.h b/src/components/utils/include/utils/logger.h index a88c6aa..a8dd7cb 100644 --- a/src/components/utils/include/utils/logger.h +++ b/src/components/utils/include/utils/logger.h @@ -42,6 +42,10 @@ namespace log4cxx { + +#ifdef ENABLE_LOG + #define LOG4CXX_IS_TRACE_ENABLED(logger) logger->isTraceEnabled() + #define LOG4CXX_INFO_EXT(logger, logEvent) LOG4CXX_INFO(logger, __PRETTY_FUNCTION__ << ": " << logEvent) #define LOG4CXX_INFO_STR_EXT(logger, logEvent) LOG4CXX_INFO_STR(logger, __PRETTY_FUNCTION__ << ": " << logEvent) @@ -64,6 +68,52 @@ namespace log4cxx #define LOG4CXX_TRACE_EXIT(logger) LOG4CXX_TRACE(logger, "EXIT: " << __PRETTY_FUNCTION__ ) #define LOG4CXX_ERROR_WITH_ERRNO(logger, message) LOG4CXX_ERROR(logger, message << ", error code " << errno << " (" << strerror(errno) << ")") +#else + #define LOG4CXX_IS_TRACE_ENABLED(logger) false + + #undef LOG4CXX_INFO + #define LOG4CXX_INFO(x,y) + + #undef LOG4CXX_WARN + #define LOG4CXX_WARN(x,y) + + #undef LOG4CXX_ERROR + #define LOG4CXX_ERROR(x,y) + + #undef LOG4CXX_ERROR_WITH_ERRNO + #define LOG4CXX_ERROR_WITH_ERRNO(x,y) + + #undef LOG4CXX_TRACE + #define LOG4CXX_TRACE(x,y) + + #undef LOG4CXX_DEBUG + #define LOG4CXX_DEBUG(x,y) + + #undef LOG4CXX_FATAL + #define LOG4CXX_FATAL(x,y) + + #define LOG4CXX_INFO_EXT(logger, logEvent) + #define LOG4CXX_INFO_STR_EXT(logger, logEvent) + + #define LOG4CXX_TRACE_EXT(logger, logEvent) + #define LOG4CXX_TRACE_STR_EXT(logger, logEvent) + + #define LOG4CXX_DEBUG_EXT(logger, logEvent) + #define LOG4CXX_DEBUG_STR_EXT(logger, logEvent) + + #define LOG4CXX_WARN_EXT(logger, logEvent) + #define LOG4CXX_WARN_STR_EXT(logger, logEvent) + + #define LOG4CXX_ERROR_EXT(logger, logEvent) + #define LOG4CXX_ERROR_STR_EXT(logger, logEvent) + + #define LOG4CXX_FATAL_EXT(logger, logEvent) + #define LOG4CXX_FATAL_STR_EXT(logger, logEvent) + + #define LOG4CXX_TRACE_ENTER(logger) + #define LOG4CXX_TRACE_EXIT(logger) + +#endif // ENABLE_LOG } #define LOG4CXXLOGGER_HPP_ diff --git a/src/components/utils/include/utils/threads/thread.h b/src/components/utils/include/utils/threads/thread.h index bbe0acd..a8b4441 100644 --- a/src/components/utils/include/utils/threads/thread.h +++ b/src/components/utils/include/utils/threads/thread.h @@ -223,7 +223,9 @@ class Thread { ThreadOptions thread_options_; bool isThreadRunning_; +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG private: DISALLOW_COPY_AND_ASSIGN(Thread); diff --git a/src/components/utils/src/threads/posix_thread.cc b/src/components/utils/src/threads/posix_thread.cc index 719b3d4..bc43d4a 100644 --- a/src/components/utils/src/threads/posix_thread.cc +++ b/src/components/utils/src/threads/posix_thread.cc @@ -50,8 +50,10 @@ static void* threadFunc(void* closure) { namespace threads { size_t Thread::kMinStackSize = PTHREAD_STACK_MIN; /* Ubuntu : 16384 ; QNX : 256; */ +#ifdef ENABLE_LOG log4cxx::LoggerPtr Thread::logger_ = log4cxx::LoggerPtr(log4cxx::Logger::getLogger("threads::Thread")); +#endif // ENABLE_LOG bool Thread::Id::operator==(const Thread::Id other) const { return pthread_equal(id_, other.id_) != 0; diff --git a/test/components/transport_manager/TransportManagerTestWithMultiThreadedClient.cpp b/test/components/transport_manager/TransportManagerTestWithMultiThreadedClient.cpp index a930c03..4ff4a63 100644 --- a/test/components/transport_manager/TransportManagerTestWithMultiThreadedClient.cpp +++ b/test/components/transport_manager/TransportManagerTestWithMultiThreadedClient.cpp @@ -164,7 +164,9 @@ namespace test { namespace components { namespace TransportManager { namespace T protected: ITransportAdapterListener & mListener; IHandleGenerator & mHandleGenerator; +#ifdef ENABLE_LOG static log4cxx::LoggerPtr logger_; +#endif // ENABLE_LOG }; /** -- 2.7.4