MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / isImpactDebugLoggingEnabled

Function isImpactDebugLoggingEnabled

apps/web/src/lib/impact/debug.ts:7–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5 * - IMPACT_ADVOCATE_DEBUG_LOGGING=true|1|yes (legacy flag still honored)
6 */
7export function isImpactDebugLoggingEnabled(): boolean {
8 if (process.env.NODE_ENV === 'development') return true;
9 if (process.env.IMPACT_REFERRAL_DEBUG === 'true') return true;
10 const advocate = process.env.IMPACT_ADVOCATE_DEBUG_LOGGING?.trim().toLowerCase();
11 return advocate === 'true' || advocate === '1' || advocate === 'yes';
12}
13
14export function logImpactReferralDebug(message: string, fields?: Record<string, unknown>): void {
15 if (!isImpactDebugLoggingEnabled()) return;

Callers 1

logImpactReferralDebugFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected