Skip to content

Document the debug buffer limits, console logging and the app type - #145

Merged
armanist merged 4 commits into
stagingfrom
docs/3.1-debug-buffers
Oct 23, 2026
Merged

armanist merged 4 commits into
stagingfrom
docs/3.1-debug-buffers

Conversation

@armanist

Copy link
Copy Markdown
Collaborator

Documents bounding the debug data kept in memory, logging to files from the console and recording the app type, as in quantum-php/framework#594 (#593).

What changed

  • packages/logger/*: in debug mode only the web app logs to the in-memory message adapter; a console command keeps the requested or configured adapter and writes to the log file. Explained in architecture.md, with one-sentence links elsewhere. adapters.md documents logging.message.limit (default 1000, 0 keeps every message).
  • packages/mailer/*: the transport log is cut to its last mailer.transport_log_limit lines at the start of each send (contracts.md); mail_trap is read as a boolean, so MAIL_TRAP=false from .env sends mail (usage.md).
  • packages/app/*: AppContext carries the app type (getType()), a required third constructor argument, and the runtime contexts copy it (contracts.md, architecture.md); new is_web_app() and is_console_app() helpers (helpers.md).
  • packages/tracer/architecture.md: the console or web error output follows the app that was booted, not PHP_SAPI.
  • packages/database/adapters.md, advanced-features/database.md: Idiorm's logging follows is_debug_mode(), so lastQuery() and queryLog() return queries only in debug mode, and the log has no limit in a long-running debug command.

Changed paths

  • v3.0/packages/logger/overview.md
  • v3.0/packages/logger/usage.md
  • v3.0/packages/logger/contracts.md
  • v3.0/packages/logger/architecture.md
  • v3.0/packages/logger/adapters.md
  • v3.0/packages/logger/helpers.md
  • v3.0/packages/mailer/usage.md
  • v3.0/packages/mailer/contracts.md
  • v3.0/packages/mailer/architecture.md
  • v3.0/packages/app/contracts.md
  • v3.0/packages/app/architecture.md
  • v3.0/packages/app/helpers.md
  • v3.0/packages/tracer/architecture.md
  • v3.0/packages/database/adapters.md
  • v3.0/advanced-features/database.md

SUMMARY.md: no change.

@armanist
armanist merged commit 1a3ad77 into staging Oct 23, 2026
1 check was pending
@armanist
armanist deleted the docs/3.1-debug-buffers branch October 23, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant