2 #include "ace/OS_NS_string.h"
3 #include "ace/OS_NS_unistd.h"
5 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
9 ACE_Log_Msg::priority_mask (MASK_TYPE mask_type)
11 return mask_type == THREAD
12 ? this->priority_mask_
13 : ACE_Log_Msg::process_priority_mask_;
18 ACE_Log_Msg::log_priority_enabled (ACE_Log_Priority log_priority)
20 return ACE_BIT_ENABLED (this->priority_mask_ |
21 ACE_Log_Msg::process_priority_mask_,
27 ACE_Log_Msg::op_status (int status)
29 this->status_ = status;
34 ACE_Log_Msg::op_status () const
41 ACE_Log_Msg::restart (bool r)
48 ACE_Log_Msg::restart () const
50 return this->restart_;
55 ACE_Log_Msg::errnum () const
62 ACE_Log_Msg::errnum (int e)
69 ACE_Log_Msg::linenum () const
71 return this->linenum_;
76 ACE_Log_Msg::linenum (int l)
85 return this->trace_depth_++;
92 return this->trace_depth_ == 0 ? 0 : --this->trace_depth_;
97 ACE_Log_Msg::trace_depth () const
99 return this->trace_depth_;
104 ACE_Log_Msg::trace_depth (int depth)
106 this->trace_depth_ = depth;
111 ACE_Log_Msg::trace_active () const
113 return this->trace_active_;
118 ACE_Log_Msg::trace_active (bool value)
120 this->trace_active_ = value;
124 ACE_Thread_Descriptor *
125 ACE_Log_Msg::thr_desc () const
127 return this->thr_desc_;
130 /// Enable the tracing facility on a per-thread basis.
133 ACE_Log_Msg::start_tracing ()
135 this->tracing_enabled_ = true;
138 /// Disable the tracing facility on a per-thread basis.
141 ACE_Log_Msg::stop_tracing ()
143 this->tracing_enabled_ = false;
148 ACE_Log_Msg::tracing_enabled () const
150 return this->tracing_enabled_;
162 ACE_Log_Msg::file (const char *s)
164 ACE_OS::strsncpy (this->file_, s, sizeof this->file_);
171 return this->msg_ + ACE_Log_Msg::msg_off_;
176 ACE_Log_Msg::msg (const ACE_TCHAR *m)
178 ACE_OS::strsncpy (this->msg_, m,
179 ((ACE_MAXLOGMSGLEN+1) / sizeof (ACE_TCHAR)));
183 ACE_Log_Msg_Callback *
184 ACE_Log_Msg::msg_callback () const
186 return this->msg_callback_;
190 ACE_Log_Msg_Callback *
191 ACE_Log_Msg::msg_callback (ACE_Log_Msg_Callback *c)
193 ACE_Log_Msg_Callback *old = this->msg_callback_;
194 this->msg_callback_ = c;
200 ACE_Log_Msg::msg_ostream () const
202 return this->ostream_;
207 ACE_Log_Msg::msg_ostream (ACE_OSTREAM_TYPE *m)
214 ACE_Log_Msg::local_host () const
216 return ACE_Log_Msg::local_host_;
221 ACE_Log_Msg::getpid () const
223 return ACE_OS::getpid ();
226 ACE_END_VERSIONED_NAMESPACE_DECL