Improved the logger panel when the log context is very long#17852
Improved the logger panel when the log context is very long#17852javiereguiluz wants to merge 4 commits into
Conversation
|
Nice feature ! Thanks |
|
👍 |
|
Very nice! Just today I fixed a log that put a massive array in the log message but adding it to the context wasn't much better in terms of readability (besides of being lighter of color). |
|
👍 Status: Reviewed |
|
I find it weird to have a JSON representation for the inline log and a pseudo-PHP one for the expanded view. |
|
I think @fabpot is right. I'd like to display the original JSON expanded, formatted and highlighted. Would you agree with including a client-side highlighter in the profiler? (I'm thinking about highlight.js) We could reuse it to highlight SQL queries (removing our custom highlighter), other log files, etc. |
|
I would do the opposite and always display a PHP-like output, that's much easier. |
|
I like the second version. |
|
👍 |
|
Thank you @javiereguiluz. |
… long (javiereguiluz) This PR was squashed before being merged into the 3.1-dev branch (closes #17852). Discussion ---------- Improved the logger panel when the log context is very long | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - ### Problem When the context of a log message is long, it's very hard to read it:  ### Solution Add a toggle which displays the context properly formatted in several lines:  To avoid cluttering the logs, this toggle is only displayed for really long contexts. For example, these three short contexts don't display that link:  Commits ------- 33f0e5e Improved the logger panel when the log context is very long
…is very long (javiereguiluz) This PR was squashed before being merged into the 3.1-dev branch (closes symfony#17852). Discussion ---------- Improved the logger panel when the log context is very long | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - ### Problem When the context of a log message is long, it's very hard to read it:  ### Solution Add a toggle which displays the context properly formatted in several lines:  To avoid cluttering the logs, this toggle is only displayed for really long contexts. For example, these three short contexts don't display that link:  Commits ------- 33f0e5e Improved the logger panel when the log context is very long







Problem
When the context of a log message is long, it's very hard to read it:
Solution
Add a toggle which displays the context properly formatted in several lines:
To avoid cluttering the logs, this toggle is only displayed for really long contexts. For example, these three short contexts don't display that link: