diff options
author | Elisey Zamakhov <EZamakhov@luxoft.com> | 2015-04-02 13:20:49 +0300 |
---|---|---|
committer | Elisey Zamakhov <EZamakhov@luxoft.com> | 2015-04-03 18:51:16 +0300 |
commit | c9a0ed76e82eb1ebeea752d74897a8f9f57d9de6 (patch) | |
tree | 4ccfc30c7eaeccd36ac5a70086bc643521311ae6 | |
parent | c72129343e34d4b20c9a27d71e12fbc812cc30d6 (diff) | |
download | sdl_core-c9a0ed76e82eb1ebeea752d74897a8f9f57d9de6.tar.gz |
Log level modification
4 files changed, 34 insertions, 31 deletions
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc index 7ac10fba9c..1a38486745 100644 --- a/src/components/application_manager/src/application_manager_impl.cc +++ b/src/components/application_manager/src/application_manager_impl.cc @@ -1064,8 +1064,9 @@ bool ApplicationManagerImpl::OnServiceStartedCallback( using namespace protocol_handler; using namespace helpers; - LOG4CXX_INFO(logger_, - "OnServiceStartedCallback " << type << " in session " << session_key); + LOG4CXX_DEBUG(logger_, + "OnServiceStartedCallback " << type + << " in session 0x" << std::hex << session_key); if (type == kRpc) { LOG4CXX_INFO(logger_, "RPC service is about to be started."); return true; @@ -1089,9 +1090,9 @@ bool ApplicationManagerImpl::OnServiceStartedCallback( void ApplicationManagerImpl::OnServiceEndedCallback(const int32_t& session_key, const protocol_handler::ServiceType& type) { using namespace protocol_handler; - LOG4CXX_INFO_EXT( - logger_, - "OnServiceEndedCallback " << type << " in session " << session_key); + LOG4CXX_DEBUG(logger_, + "OnServiceEndedCallback " << type + << " in session 0x" << std::hex << session_key); if (type == kRpc) { LOG4CXX_INFO(logger_, "Remove application."); diff --git a/src/components/connection_handler/src/heartbeat_monitor.cc b/src/components/connection_handler/src/heartbeat_monitor.cc index 4dbafdd361..fdb3208d02 100644 --- a/src/components/connection_handler/src/heartbeat_monitor.cc +++ b/src/components/connection_handler/src/heartbeat_monitor.cc @@ -60,7 +60,7 @@ void HeartBeatMonitor::Process() { if (state.HasTimeoutElapsed()) { const uint8_t session_id = it->first; if (state.IsReadyToClose()) { - LOG4CXX_DEBUG(logger_, "Will close session"); + LOG4CXX_WARN(logger_, "Will close session"); connection_->CloseSession(session_id); it = sessions_.begin(); continue; @@ -103,12 +103,12 @@ void HeartBeatMonitor::AddSession(uint8_t session_id) { void HeartBeatMonitor::RemoveSession(uint8_t session_id) { AutoLock auto_lock(sessions_list_lock_); - LOG4CXX_INFO(logger_, - "Remove session with id " << session_id); + LOG4CXX_DEBUG(logger_, + "Remove session with id " << static_cast<int>(session_id)); if (sessions_.erase(session_id) == 0) { - LOG4CXX_INFO(logger_, - "Remove session with id " << session_id << + LOG4CXX_WARN(logger_, + "Remove session with id " << static_cast<int>(session_id) << " was unsuccessful"); } } @@ -146,7 +146,7 @@ void HeartBeatMonitor::set_heartbeat_timeout_seconds(int32_t timeout, HeartBeatMonitor::SessionState::SessionState(int32_t heartbeat_timeout_seconds) : heartbeat_timeout_seconds_(heartbeat_timeout_seconds), is_heartbeat_sent(false) { - LOG4CXX_DEBUG(logger_, "SessionState ctor."); + LOG4CXX_AUTO_TRACE(logger_); RefreshExpiration(); } @@ -158,8 +158,9 @@ void HeartBeatMonitor::SessionState::RefreshExpiration () { void HeartBeatMonitor::SessionState::UpdateTimeout( int32_t heartbeat_timeout_seconds) { + LOG4CXX_DEBUG(logger_, "Update timout with value " << + heartbeat_timeout_seconds_); heartbeat_timeout_seconds_ = heartbeat_timeout_seconds; - LOG4CXX_DEBUG(logger_, "Update timout"); RefreshExpiration(); } diff --git a/src/components/protocol_handler/src/protocol_handler_impl.cc b/src/components/protocol_handler/src/protocol_handler_impl.cc index b0b521d132..e288b4eb9b 100644 --- a/src/components/protocol_handler/src/protocol_handler_impl.cc +++ b/src/components/protocol_handler/src/protocol_handler_impl.cc @@ -173,7 +173,7 @@ void ProtocolHandlerImpl::SendStartSessionAck(ConnectionID connection_id, raw_ford_messages_to_mobile_.PostMessage( impl::RawFordMessageToMobile(ptr, false)); - LOG4CXX_INFO(logger_, + LOG4CXX_DEBUG(logger_, "SendStartSessionAck() for connection " << connection_id << " for service_type " << static_cast<int32_t>(service_type) << " session_id " << static_cast<int32_t>(session_id) @@ -194,7 +194,7 @@ void ProtocolHandlerImpl::SendStartSessionNAck(ConnectionID connection_id, raw_ford_messages_to_mobile_.PostMessage( impl::RawFordMessageToMobile(ptr, false)); - LOG4CXX_INFO(logger_, + LOG4CXX_DEBUG(logger_, "SendStartSessionNAck() for connection " << connection_id << " for service_type " << static_cast<int32_t>(service_type) << " session_id " << static_cast<int32_t>(session_id)); @@ -214,7 +214,7 @@ void ProtocolHandlerImpl::SendEndSessionNAck(ConnectionID connection_id, raw_ford_messages_to_mobile_.PostMessage( impl::RawFordMessageToMobile(ptr, false)); - LOG4CXX_INFO(logger_, "SendEndSessionNAck() for connection " << connection_id + LOG4CXX_DEBUG(logger_, "SendEndSessionNAck() for connection " << connection_id << " for service_type " << static_cast<int32_t>(service_type) << " session_id " << static_cast<int32_t>(session_id)); } @@ -233,7 +233,7 @@ void ProtocolHandlerImpl::SendEndSessionAck(ConnectionID connection_id, raw_ford_messages_to_mobile_.PostMessage( impl::RawFordMessageToMobile(ptr, false)); - LOG4CXX_INFO(logger_, + LOG4CXX_DEBUG(logger_, "SendEndSessionAck() for connection " << connection_id << " for service_type " << static_cast<int32_t>(service_type) << " session_id " << static_cast<int32_t>(session_id)); @@ -254,11 +254,11 @@ void ProtocolHandlerImpl::SendEndServicePrivate(int32_t connection_id, raw_ford_messages_to_mobile_.PostMessage( impl::RawFordMessageToMobile(ptr, false)); - LOG4CXX_INFO(logger_, "SendEndSession() for connection " << connection_id + LOG4CXX_DEBUG(logger_, "SendEndSession() for connection " << connection_id << " for service_type " << service_type << " session_id " << static_cast<int32_t>(session_id)); } else { - LOG4CXX_WARN(logger_, "SendEndSession is failed connection or session does not exist"); + LOG4CXX_WARN(logger_, "SendEndSession is failed connection or session does not exist"); } } @@ -673,10 +673,11 @@ RESULT_CODE ProtocolHandlerImpl::HandleMessage(ConnectionID connection_id, LOG4CXX_TRACE(logger_, "handleMessage() - case FRAME_TYPE_CONTROL"); return HandleControlMessage(connection_id, packet); case FRAME_TYPE_SINGLE: + LOG4CXX_TRACE(logger_, "handleMessage() - case FRAME_TYPE_SINGLE"); return HandleSingleFrameMessage(connection_id, packet); case FRAME_TYPE_FIRST: case FRAME_TYPE_CONSECUTIVE: - LOG4CXX_TRACE(logger_, "handleMessage() - case FRAME_TYPE_CONSECUTIVE"); + LOG4CXX_TRACE(logger_, "handleMessage() - case FRAME_TYPE_FIRST or FRAME_TYPE_CONSECUTIVE"); return HandleMultiFrameMessage(connection_id, packet); default: { LOG4CXX_WARN(logger_, "handleMessage() - case unknown frame type" @@ -742,16 +743,16 @@ RESULT_CODE ProtocolHandlerImpl::HandleMultiFrameMessage( const uint32_t key = session_observer_->KeyFromPair(connection_id, packet->session_id()); - LOG4CXX_INFO_EXT( + LOG4CXX_DEBUG( logger_, "Packet " << packet << "; session id " << static_cast<int32_t>(key)); if (packet->frame_type() == FRAME_TYPE_FIRST) { - LOG4CXX_INFO(logger_, "handleMultiFrameMessage() - FRAME_TYPE_FIRST " + LOG4CXX_DEBUG(logger_, "handleMultiFrameMessage() - FRAME_TYPE_FIRST " << packet->data_size()); incomplete_multi_frame_messages_[key] = packet; } else { - LOG4CXX_INFO(logger_, "handleMultiFrameMessage() - Consecutive frame"); + LOG4CXX_DEBUG(logger_, "handleMultiFrameMessage() - Consecutive frame"); std::map<int32_t, ProtocolFramePtr>::iterator it = incomplete_multi_frame_messages_.find(key); @@ -770,7 +771,7 @@ RESULT_CODE ProtocolHandlerImpl::HandleMultiFrameMessage( } if (packet->frame_data() == FRAME_DATA_LAST_CONSECUTIVE) { - LOG4CXX_INFO( + LOG4CXX_DEBUG( logger_, "Last frame of multiframe message size " << packet->data_size() << "; connection key " << key); @@ -796,7 +797,7 @@ RESULT_CODE ProtocolHandlerImpl::HandleMultiFrameMessage( completePacket->service_type(), completePacket->payload_size())); - LOG4CXX_INFO(logger_, + LOG4CXX_DEBUG(logger_, "total_data_bytes " << completePacket->total_data_bytes() << " packet_size " << completePacket->packet_size() << " data size " << completePacket->data_size() << @@ -888,7 +889,7 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageEndSession( packet.protocol_version(), service_type); message_counters_.erase(current_session_id); } else { - LOG4CXX_INFO_EXT( + LOG4CXX_WARN( logger_, "Refused to end session " << static_cast<int>(service_type) << " type."); SendEndSessionNAck(connection_id, current_session_id, packet.protocol_version(), @@ -969,7 +970,7 @@ class StartSessionHandler : public security_manager::SecurityManagerListener { RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession( ConnectionID connection_id, const ProtocolPacket &packet) { - LOG4CXX_TRACE(logger_, + LOG4CXX_DEBUG(logger_, "Protocol version: " << static_cast<int>(packet.protocol_version())); const ServiceType service_type = ServiceTypeFromByte(packet.service_type()); @@ -1044,7 +1045,7 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession( RESULT_CODE ProtocolHandlerImpl::HandleControlMessageHeartBeat( ConnectionID connection_id, const ProtocolPacket &packet) { - LOG4CXX_INFO( + LOG4CXX_DEBUG( logger_, "Sending heart beat acknowledgment for connection " << connection_id); uint8_t protocol_version; @@ -1117,7 +1118,7 @@ void ProtocolHandlerImpl::Handle( if (((0 != message->data()) && (0 != message->data_size())) || FRAME_TYPE_CONTROL == message->frame_type() || FRAME_TYPE_FIRST == message->frame_type()) { - LOG4CXX_INFO_EXT(logger_, "Packet: dataSize " << message->data_size()); + LOG4CXX_DEBUG(logger_, "Packet: dataSize " << message->data_size()); HandleMessage(message->connection_id(), message); } else { LOG4CXX_WARN(logger_, @@ -1126,7 +1127,7 @@ void ProtocolHandlerImpl::Handle( } void ProtocolHandlerImpl::Handle(const impl::RawFordMessageToMobile message) { - LOG4CXX_INFO_EXT( + LOG4CXX_DEBUG( logger_, "Message to mobile app: connection id " << static_cast<int>(message->connection_id()) << ";" @@ -1254,7 +1255,7 @@ RESULT_CODE ProtocolHandlerImpl::DecryptFrame(ProtocolFramePtr packet) { void ProtocolHandlerImpl::SendFramesNumber(uint32_t connection_key, int32_t number_of_frames) { - LOG4CXX_INFO(logger_, + LOG4CXX_DEBUG(logger_, "SendFramesNumber MobileNaviAck for session " << connection_key); // TODO(EZamakhov): add protocol version check - to avoid send for PROTOCOL_VERSION_1 diff --git a/src/components/transport_manager/src/tcp/tcp_device.cc b/src/components/transport_manager/src/tcp/tcp_device.cc index 92848a4246..2dacd9e8a2 100644 --- a/src/components/transport_manager/src/tcp/tcp_device.cc +++ b/src/components/transport_manager/src/tcp/tcp_device.cc @@ -142,7 +142,7 @@ int TcpDevice::GetApplicationPort(const ApplicationHandle app_handle) const { return -1; } if (it->second.incoming) { - LOG4CXX_WARN(logger_, "Application is incoming"); + LOG4CXX_DEBUG(logger_, "Application is incoming"); return -1; } LOG4CXX_DEBUG(logger_, "port " << it->second.port); |