JosiahWI commented on code in PR #13262:
URL: https://github.com/apache/trafficserver/pull/13262#discussion_r3403540372


##########
include/tscore/DiagsTypes.h:
##########
@@ -48,39 +48,60 @@
 #define DIAGS_MAGIC 0x12345678
 #define BYTES_IN_MB 1000000
 
+/// Selects whether a tag applies to debug output or action-control output.
+/// Values are used as array indices; do not renumber.
 enum DiagsTagType {
   DiagsTagType_Debug  = 0, // do not renumber --- used as array index
   DiagsTagType_Action = 1
 };
 
+/// Per-level output routing: controls which sinks receive messages at a given
+/// diagnostic level.
 struct DiagsModeOutput {
   bool to_stdout;
   bool to_stderr;
   bool to_syslog;
   bool to_diagslog;
 };
 
+/// Identifies which standard stream is the target of a redirect operation.
 enum StdStream { STDOUT = 0, STDERR };
 
+/// Controls when the Diags subsystem automatically rolls (renames and reopens)
+/// a log file.
 enum RollingEnabledValues { NO_ROLLING = 0, ROLL_ON_TIME, ROLL_ON_SIZE, 
ROLL_ON_TIME_OR_SIZE, INVALID_ROLLING_VALUE };
 
 #define DiagsLevel_Count DL_Undefined
 
 #define DiagsLevel_IsTerminal(_l) (((_l) >= DL_Fatal) && ((_l) < DL_Undefined))
 
-// Cleanup Function Prototype - Called before ink_fatal to
-//   cleanup process state
+/// Prototype for an optional cleanup callback invoked before process exit
+/// when a terminal-level diagnostic (DL_Fatal, DL_Alert, DL_Emergency) is 
emitted.
 using DiagsCleanupFunc = void (*)();
 
 class DiagsConfigState
 {
 public:
+  /// @brief Returns the enabled state for the given tag type.
+  ///
+  /// @param dtt DiagsTagType_Debug or DiagsTagType_Action.
+  /// @return 0 if disabled, 1 if globally enabled, 2 if IP-override enabled.
+  /// @note Intended as a fast-path check. Thread-safe for reads; writes use
+  ///       the setter overload.

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]

Reply via email to