JosiahWI commented on code in PR #13262:
URL: https://github.com/apache/trafficserver/pull/13262#discussion_r3403620318
##########
include/tscore/DiagsTypes.h:
##########
@@ -189,9 +304,32 @@ class Diags : public DebugInterface
va_end(ap);
}
+ /// @brief Core variadic implementation for diagnostic output.
+ ///
+ /// Formats and writes the message to all outputs configured for level.
+ /// Syslog writes occur after the internal lock is released.
+ ///
+ /// @param tag Optional tag label. May be nullptr.
+ /// @param level Diagnostic severity level. Must be < DiagsLevel_Count.
+ /// @param loc Optional source location. May be nullptr.
+ /// @param fmt printf-style format string. Must not be nullptr.
+ /// @param ap Argument list for fmt.
+ /// @pre level < DiagsLevel_Count.
+ /// @post Message is written to all enabled outputs for level. Syslog, if
+ /// configured, is written outside the internal lock.
+ /// @note Thread-safe. Acquires the internal lock for file writes.
void print_va(const char *tag, DiagsLevel level, const SourceLocation *loc,
const char *fmt, va_list ap) const override;
- /// Print the log message only if tag is enabled.
+ /// @brief Conditionally outputs a diagnostic message if tag is enabled.
+ ///
+ /// Equivalent to: if (on(tag, DiagsTagType_Debug)) print(tag, level, loc,
fmt, ...)
+ ///
+ /// @param tag Tag to check. Must not be nullptr.
Review Comment:
Correct. 👍
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]