@@ -4,11 +4,14 @@ title: Logging
44
55Two different things get called logging here, and they solve different problems.
66
7- One is your own output — the ` echo ` and ` var_dump() ` you scatter about — arriving
8- in your editor instead of the response body. The other is the debugger's own log,
9- which is what you reach for when the debugger itself is not behaving.
7+ One is what your request produces as it runs — the ` echo ` and ` var_dump() ` you
8+ scatter about, and the warnings PHP raises along the way — arriving in your editor
9+ instead of the response body. The other is the debugger's own log, which is what
10+ you reach for when the debugger itself is not behaving.
1011
11- ## Your script's output in the editor
12+ ## What your request produces
13+
14+ ### Your script's output
1215
1316Your editor can ask for a copy of everything the script writes to standard output.
1417` echo ` , ` print_r() ` , ` var_dump() ` , whatever a framework writes — all of it appears
@@ -46,20 +49,20 @@ in the PHP error log for it.
4649
4750:::
4851
49- ## Errors reported as they happen
52+ ### Warnings and notices
5053
51- Your editor can also ask to be told about every diagnostic PHP raises — warnings,
52- notices, deprecations and errors — as they occur. Each one arrives with its
53- message, its file and its line, and the script keeps running.
54+ Separately from that output, your editor can ask to be told about every diagnostic
55+ PHP raises — warnings, notices, deprecations and errors — as they occur. Each one
56+ arrives with its message, its file and its line, and the script keeps running.
5457
5558This is the middle ground between the two extremes. Ignoring a warning means
5659finding it later in a log, if at all; breaking on one, with an
5760[ exception breakpoint] ( ./breakpoints.md#exception-breakpoints ) on ` Warning ` , stops
5861you dead every time it fires. A notification just tells you, in order, alongside
5962everything else the request did.
6063
61- Like output capture, this is an editor setting negotiated when the session starts,
62- and it is off unless your editor asks for it. It is worth turning on and leaving
64+ This is a separate editor setting from output capture, negotiated the same way and
65+ likewise off unless your editor asks for it. It is worth turning on and leaving
6366on: a deprecation you would never have gone looking for is exactly the kind of
6467thing that turns up in that panel.
6568
0 commit comments