Console Log

Convention for console logging levels across the monorepo.

ledgerhq 4245eca 541 B Updated

File contents

Console Logging Convention

console.error is intercepted by monitoring tools (Datadog RUM, Sentry) and forwarded as an error event.

  • Use console.warn for expected or recoverable errors (network failures, optional feature unavailable, etc.)
  • Use console.error only for illegal/unexpected program states that should never occur in production
  • Prefer dropping the log entirely when the error is neither actionable nor surprising

ledgerhq/ledger-live/tree/main/.agents/skills/console-log commit 4245eca8a2

Frequently asked questions

npx skillmds@latest add ledgerhq/console-log