()
| 5 | * - IMPACT_ADVOCATE_DEBUG_LOGGING=true|1|yes (legacy flag still honored) |
| 6 | */ |
| 7 | export 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 | |
| 14 | export function logImpactReferralDebug(message: string, fields?: Record<string, unknown>): void { |
| 15 | if (!isImpactDebugLoggingEnabled()) return; |
no outgoing calls
no test coverage detected