OpenDDS  Snapshot(2023/04/28-20:55)
Logging.cpp
Go to the documentation of this file.
1 /*
2  *
3  *
4  * Distributed under the OpenDDS License.
5  * See: http://www.opendds.org/license.html
6  */
7 #include "DCPS/DdsDcps_pch.h"
8 
9 #include "Logging.h"
10 
11 #include "GuidConverter.h"
12 
14 
15 namespace OpenDDS {
16 namespace DCPS {
17 
18 bool log_bits = false;
19 
20 void OpenDDS_Dcps_Export log_progress(const char* activity,
21  const GUID_t& local,
22  const GUID_t& remote,
23  const MonotonicTime_t& start_time,
24  const GUID_t& reference)
25 {
26  ACE_DEBUG((LM_INFO, "(%P|%t) {transport_debug.log_progress} local: %C remote: %C reference: %C time(ms): %Lu activity: %C\n",
27  DCPS::LogGuid(local).c_str(), DCPS::LogGuid(remote).c_str(), DCPS::LogGuid(reference).c_str(),
28  duration_to_time_value(MonotonicTimePoint::now().to_monotonic_time() - start_time).msec(),
29  activity));
30 }
31 
32 } // namespace DCPS
33 } // namespace OpenDDS
34 
#define ACE_DEBUG(X)
LM_INFO
#define OpenDDS_Dcps_Export
Definition: dcps_export.h:24
void OpenDDS_Dcps_Export log_progress(const char *activity, const GUID_t &local, const GUID_t &remote, const MonotonicTime_t &start_time, const GUID_t &reference)
Definition: Logging.cpp:20
static TimePoint_T< MonotonicClock > now()
Definition: TimePoint_T.inl:41
bool log_bits
Definition: Logging.cpp:18
ACE_INLINE OpenDDS_Dcps_Export ACE_Time_Value duration_to_time_value(const DDS::Duration_t &t)
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28