Commit 653b6d4
committed
bug #5656 Fix monolog line formatter in logging cookbook example. (vmarquez)
This PR was merged into the 2.3 branch.
Discussion
----------
Fix monolog line formatter in logging cookbook example.
| Q | A
| ------------- | ---
| Doc fix? | yes
| New docs? | no
| Applies to | all
| Fixed tickets |
After [Adding some extra Data in the Log Messages](http://symfony.com/doc/current/cookbook/logging/monolog.html#adding-some-extra-data-in-the-log-messages), logs were missing some detail (like missing translation tokens on translation.WARNING messages).
I've corrected the line formatter adding missing tokens taken from [Monolog/Formatter/LineFormatter.php](https://github.com/Seldaek/monolog/blob/master/src/Monolog/Formatter/LineFormatter.php).
Example, log entries before adding extra data:
```
[2015-08-25 14:24:58] translation.WARNING: Translation not found. {"id":"GeoCountryReg.labels.imageFile1","domain":"messages","locale":"es"} []
```
And after:
```
[2015-08-25 14:27:29] [cutptr3q-f0d64b15] translation.WARNING: Translation not found.
```
Desired effect was:
```
[2015-08-25 14:36:18] [cutptr3q-3b0c7c83] translation.WARNING: Translation not found. {"id":"GeoCountryReg.labels.imageFile1","domain":"messages","locale":"es"} []
```
Commits
-------
6c6ed2a Fix monolog line formatter in logging cookbook example.1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
| 346 | + | |
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
378 | | - | |
| 378 | + | |
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
| 408 | + | |
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
| |||
0 commit comments