Skip to content

Prefer line formatter on missing cli dumper #24598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

greg0ire
Copy link
Contributor

@greg0ire greg0ire commented Oct 17, 2017

Q A
Branch? 3.3
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets none, but closes symfony/recipes#145
License MIT
Doc PR n/a

The console formatter does a better job, unless the VarDumper component
is missing, in which case the LineFormatter should be preferred.

The console formatter does a better job, unless the VarDumper component
is missing, in which case you will not see the "context" or "extra" keys
and the LineFormatter should be preferred.
@@ -162,6 +164,9 @@ protected function write(array $record)
*/
protected function getDefaultFormatter()
{
if (!class_exists(CliDumper::class)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not find a way to test this (other than change the namespace of the test to match the one of the class but I'm don't think that would be ok with you).

@greg0ire
Copy link
Contributor Author

Can anyone fix the labels?

@nicolas-grekas
Copy link
Member

Thank you @greg0ire.

@nicolas-grekas nicolas-grekas merged commit 574f9f5 into symfony:3.3 Oct 24, 2017
nicolas-grekas added a commit that referenced this pull request Oct 24, 2017
This PR was merged into the 3.3 branch.

Discussion
----------

Prefer line formatter on missing cli dumper

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none, but closes symfony/recipes#145
| License       | MIT
| Doc PR        | n/a

The console formatter does a better job, unless the VarDumper component
is missing, in which case the LineFormatter should be preferred.

Commits
-------

574f9f5 Prefer line formatter on missing cli dumper
@greg0ire greg0ire deleted the better_logging_without_var_dumper branch October 24, 2017 12:59
This was referenced Oct 30, 2017
@fabpot fabpot mentioned this pull request Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants