Skip to content

write the logging guide page - #18

Merged
carlos-granados merged 1 commit into
mainfrom
logging
Sep 6, 2026
Merged

write the logging guide page#18
carlos-granados merged 1 commit into
mainfrom
logging

Conversation

@carlos-granados

@carlos-granados carlos-granados commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Replaces the logging placeholder. Split into the two distinct things the word covers: your script's own output reaching the editor console, and the debugger's own log.

Verified against handler_dbgp.c and lib/log.c:

  • the stderr DBGp command is unimplemented and always answers success="0", so standard error is never captured — error_log(), fwrite(STDERR, ...) and startup errors do not reach the console. Called out in a note, since it is the likely cause of "I printed it and it is not there".
  • stdout modes are copy (editor and response) and redirect (editor only, stripped from the response)
  • the log file is opened "a" and flushed per line, and is shared by every process, hence the leading PID
  • php_debugger.log_level is a threshold — higher is more verbose. Level 5 is the raw protocol XML in both directions; level 10 adds trigger checks and path-mapping decisions.
  • with no log file set, the logger falls through to the PHP error log path, which writes Critical and Error only. So hard failures leave a trace with no configuration, and anything gentler is dropped.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-06 07:20 UTC

@carlos-granados
carlos-granados merged commit 69eb5a3 into main Sep 6, 2026
1 check passed
@carlos-granados
carlos-granados deleted the logging branch September 6, 2026 07:20
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