Check if debug logging is enabled via environment variable Uses a C helper wrapping getenv() to ensure dynamic updates from the current process environment are observed reliably.