Debugging
The SDK logs with the debug package. Nothing is printed unless you enable it.
DEBUG=scenid:* node index.mjs
| Namespace | Logs |
|---|---|
scenid:sdk | Every request: method, URL, request body (200 characters), status, latency, response (truncated) |
scenid:sdk:verbose | Full request and response bodies |
scenid:sdk:auth | Auth flows (only the first 8 characters of an authorization code) |
Access tokens are never logged.
Illustrative output
scenid:sdk POST https://crm-service.scenid.cloud/api/v2/entities/list {"entityTypes":["ou"]} +0ms
scenid:sdk 200 84ms [{"entityType":"ou","id":"…"}] +85ms
Tips
- Use
DEBUG=scenid:sdkin production incidents. It is safe for logs, bodies are truncated. - Use
scenid:sdk:verboseonly locally, it can contain personal data. - Local stack:
cloud_stackandssl: falsein the service key.