Skip to content

Debug Logs

Thomas Pollet edited this page Mar 8, 2026 · 3 revisions

Debug Logs

Why log detail matters

Verbose logs are useful during development, but they can expose sensitive details in production.

Debug vs production behavior

SAFRS error handling uses log-level driven debug behavior. In debug mode, errors may include more detail. In non-debug mode, client-visible messages are intentionally reduced.

Where to configure it

Use application logging configuration and deployment log levels rather than relying on ad hoc prints.

Practical guidance

  • keep verbose tracebacks for local development
  • avoid exposing internals to clients in production
  • log server-side details that operators need, while returning JSON:API error documents to clients

Clone this wiki locally