2 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
4 ACE_INLINE unsigned int
5 ACE_Log_Category::id() const
10 ACE_INLINE const char*
11 ACE_Log_Category::name () const
16 ACE_INLINE unsigned int
17 ACE_Log_Category_TSS::id() const
19 return category_->id_;
22 ACE_INLINE const char*
23 ACE_Log_Category_TSS::name () const
25 return category_->name_;
28 ACE_INLINE ACE_Log_Msg*
29 ACE_Log_Category_TSS::logger ()
34 /// Get the current ACE_Log_Priority mask.
36 ACE_Log_Category_TSS::priority_mask () const
38 return priority_mask_;
41 /// Set the ACE_Log_Priority mask, returns original mask.
43 ACE_Log_Category_TSS::priority_mask (u_long n_mask)
45 u_long o_mask = this->priority_mask_;
46 this->priority_mask_ = n_mask;
49 /// Return true if the requested priority is enabled.
51 ACE_Log_Category_TSS::log_priority_enabled (ACE_Log_Priority log_priority)
53 return ACE_BIT_ENABLED (this->priority_mask_ |
54 category_->priority_mask(),
59 ACE_Log_Category_TSS::set (const char *file,
64 logger_->set(file, line, op_status, errnum, logger_->restart (), logger_->msg_ostream (), logger_->msg_callback ());
67 /// These values are only actually set if the requested priority is
70 void ACE_Log_Category_TSS::conditional_set (const char *file,
75 logger_->conditional_set(file, line, op_status, errnum);
78 #if !defined (ACE_LACKS_VA_FUNCTIONS)
80 ACE_Log_Category_TSS::log (ACE_Log_Priority priority, const ACE_TCHAR *format_str, ...)
82 // Start of variable args section.
85 va_start (argp, format_str);
87 ssize_t const result = this->log (format_str,
95 #if defined (ACE_HAS_WCHAR)
97 ACE_Log_Category_TSS::log (ACE_Log_Priority priority, const ACE_ANTI_TCHAR *format_str, ...)
99 // Start of variable args section.
102 va_start (argp, format_str);
104 ssize_t const result = this->log (ACE_TEXT_ANTI_TO_TCHAR (format_str),
111 #endif /* ACE_HAS_WCHAR */
112 #else /* ACE_LACKS_VA_FUNCTIONS */
115 ACE_Log_Category_TSS::log (const ACE_Log_Formatter &formatter)
117 if (this->log_priority_enabled (formatter.priority ()))
118 return logger_->log (formatter);
123 #endif /* ACE_LACKS_VA_FUNCTIONS */
126 * An alternative logging mechanism that makes it possible to
127 * integrate variable argument lists from other logging mechanisms
128 * into the ACE mechanism.
132 ACE_Log_Category_TSS::log (const ACE_TCHAR *format,
133 ACE_Log_Priority priority,
136 if (this->log_priority_enabled (priority) == 0)
138 return logger_->log(format, priority, argp, this);
142 ACE_Log_Category_TSS::log (ACE_Log_Record &log_record,
145 return logger_->log(log_record, suppress_stderr);
149 ACE_Log_Category_TSS::log_hexdump (ACE_Log_Priority priority,
152 const ACE_TCHAR *text)
154 if (this->log_priority_enabled (priority) == 0)
156 return logger_->log_hexdump(priority, buffer, size, text, this);
159 /// Get the current ACE_Log_Priority mask.
161 ACE_Log_Category::priority_mask () const
163 return priority_mask_;
166 /// Set the ACE_Log_Priority mask, returns original mask.
168 ACE_Log_Category::priority_mask (u_long n_mask)
170 u_long o_mask = this->priority_mask_;
171 this->priority_mask_ = n_mask;
175 ACE_END_VERSIONED_NAMESPACE_DECL