diff options
author | Juergen Gehring <juergen.gehring@bmw.de> | 2018-01-25 00:40:04 -0800 |
---|---|---|
committer | Juergen Gehring <juergen.gehring@bmw.de> | 2018-01-25 00:40:04 -0800 |
commit | c3e889f910121ad4aff92069c6a8a0bc4ff7520a (patch) | |
tree | 50a90c29907a8b9b179ab64097cd1c6d1f758162 /implementation/routing/src/routing_manager_proxy.cpp | |
parent | d61c5b092845109f7f07ec7582b332afb1b8517c (diff) | |
download | vSomeIP-c3e889f910121ad4aff92069c6a8a0bc4ff7520a.tar.gz |
vsomeip 2.9.32.9.3
Diffstat (limited to 'implementation/routing/src/routing_manager_proxy.cpp')
-rw-r--r-- | implementation/routing/src/routing_manager_proxy.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/implementation/routing/src/routing_manager_proxy.cpp b/implementation/routing/src/routing_manager_proxy.cpp index d94ae69..7eba42b 100644 --- a/implementation/routing/src/routing_manager_proxy.cpp +++ b/implementation/routing/src/routing_manager_proxy.cpp @@ -45,7 +45,8 @@ routing_manager_proxy::routing_manager_proxy(routing_manager_host *_host) : register_application_timer_(io_), logger_(logger::get()), request_debounce_timer_ (io_), - request_debounce_timer_running_(false) + request_debounce_timer_running_(false), + client_side_logging_(false) { } @@ -54,7 +55,11 @@ routing_manager_proxy::~routing_manager_proxy() { void routing_manager_proxy::init() { routing_manager_base::init(); - + const char *client_side_logging = getenv(VSOMEIP_ENV_CLIENTSIDELOGGING); + if (client_side_logging != nullptr) { + client_side_logging_ = true; + VSOMEIP_INFO << "Client side logging is enabled"; + } { std::lock_guard<std::mutex> its_lock(sender_mutex_); sender_ = create_local(VSOMEIP_ROUTING_CLIENT); @@ -877,6 +882,15 @@ void routing_manager_proxy::on_message(const byte_t *_data, length_t _size, return; } } +#ifdef USE_DLT + if (client_side_logging_) { + tc::trace_header its_header; + if (its_header.prepare(nullptr, false, its_instance)) + tc_->trace(its_header.data_, VSOMEIP_TRACE_HEADER_SIZE, + &_data[VSOMEIP_COMMAND_PAYLOAD_POS], + static_cast<std::uint16_t>(its_message_size)); + } +#endif host_->on_message(std::move(its_message)); } else { VSOMEIP_ERROR << "Routing proxy: on_message: " |