2 #include "ace/Global_Macros.h"
3 #include "ace/os_include/arpa/os_inet.h"
4 #include "ace/Time_Value.h"
5 #include "ace/OS_NS_string.h"
7 #if defined (ACE_HAS_ALLOC_HOOKS)
8 # include "ace/Malloc_Base.h"
9 #endif /* ACE_HAS_ALLOC_HOOKS */
11 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
14 ACE_Log_Record::~ACE_Log_Record ()
17 #if defined (ACE_HAS_ALLOC_HOOKS)
18 ACE_Allocator::instance()->free(this->msg_data_);
20 delete [] this->msg_data_;
21 #endif /* ACE_HAS_ALLOC_HOOKS */
25 ACE_Log_Record::type () const
27 ACE_TRACE ("ACE_Log_Record::type");
32 ACE_Log_Record::category (ACE_Log_Category_TSS* t)
34 ACE_TRACE ("ACE_Log_Record::category");
39 ACE_INLINE ACE_Log_Category_TSS*
40 ACE_Log_Record::category () const
42 ACE_TRACE ("ACE_Log_Record::category");
43 return this->category_;
47 ACE_Log_Record::type (ACE_UINT32 t)
49 ACE_TRACE ("ACE_Log_Record::type");
54 ACE_Log_Record::length () const
56 ACE_TRACE ("ACE_Log_Record::length");
57 return (long) this->length_;
61 ACE_Log_Record::length (long l)
63 ACE_TRACE ("ACE_Log_Record::length");
64 this->length_ = static_cast<ACE_UINT32> (l);
67 ACE_INLINE ACE_Time_Value
68 ACE_Log_Record::time_stamp () const
70 ACE_TRACE ("ACE_Log_Record::time_stamp");
71 return ACE_Time_Value (this->secs_, (long) this->usecs_);
75 ACE_Log_Record::time_stamp (const ACE_Time_Value &ts)
77 ACE_TRACE ("ACE_Log_Record::time_stamp");
78 this->secs_ = ts.sec ();
79 this->usecs_ = (ACE_UINT32) ts.usec ();
83 ACE_Log_Record::pid () const
85 ACE_TRACE ("ACE_Log_Record::pid");
86 return (long) this->pid_;
90 ACE_Log_Record::pid (long p)
92 ACE_TRACE ("ACE_Log_Record::pid");
93 this->pid_ = (ACE_UINT32) p;
96 ACE_INLINE const ACE_TCHAR *
97 ACE_Log_Record::msg_data () const
99 ACE_TRACE ("ACE_Log_Record::msg_data");
100 return this->msg_data_;
104 ACE_Log_Record::msg_data_len () const
106 ACE_TRACE ("ACE_Log_Record::msg_data_len");
107 return ACE_OS::strlen (this->msg_data_) + 1;
110 ACE_END_VERSIONED_NAMESPACE_DECL