Commit 9a34f1a
committed
bug #47878 [HttpKernel] Remove EOL when using error_log() in HttpKernel Logger (cyve)
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[HttpKernel] Remove EOL when using error_log() in HttpKernel Logger
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | maybe
| Tickets |
| License | MIT
| Doc PR |
Hello there !
Since PR symfony/symfony#36855, when using `Symfony\Component\HttpKernel\Log\Logger` with argument `$output = null`. The logger use the `error_log()` method to log messages. But in the log file, messages are separated by an empty line because the default formatter (`Logger::format()`) adds an extra EOL char at the end of the message.
This fix prevents the logger to add an extra EOL char when it uses `error_log()`.
Possible BC : if someone use the logger with a custom formatter that already add a EOL char at the end of the message, there will be a empty line between messages in the log file. In my opinion, this is minor enough not to worry about it ;-)
Thanks for your review :-)
Commits
-------
69cf83ea1a [HttpKernel] Remove EOL when using error_log() in HttpKernel Logger2 files changed
+32
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
| |||
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
83 | | - | |
| 87 | + | |
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
| |||
105 | 109 | | |
106 | 110 | | |
107 | 111 | | |
108 | | - | |
| 112 | + | |
109 | 113 | | |
110 | 114 | | |
111 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
199 | 219 | | |
200 | 220 | | |
201 | 221 | | |
| |||
0 commit comments