Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use stderr by default when a specific output is not injected#15728

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:2.7fromSeldaek:patch-3
Sep 14, 2015

Conversation

@Seldaek
Copy link
Member

QA
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets
LicenseMIT
Doc PR

stderr is really the best place to put logs by default, so unless someone explicitly passes something else we should use it, and especially not depend on the log level to decide where to output.

@jakzal
Copy link
Contributor

This change broke some monolog bridge tests.

@Seldaek
Copy link
MemberAuthor

Sorry, fixed the tests.

@Tobion
Copy link
Contributor

Related#13730

@Seldaek
Copy link
MemberAuthor

@Tobion in retrospect, I think that other one you linked was misguided, it should be given the right output by the user instead of doing automagic. But in this case there is no easy way for the user to do it right, so I think defaulting to the right behavior when setup with the listener is good, and if people want to do it wrong they can always reconfigure the hard way.

Copy link
Contributor

Choose a reason for hiding this comment

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

For convenience, you could use a temporary variable:

$output =$event->getOutput();if ($outputinstanceof ConsoleOutputInterface) {$output =$output->getErrorOutput();}$this->setOutput($output);

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I guess that's a bit nicer yes, fixed.

@fabpot
Copy link
Member

👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you change that? It should only be callec once.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Ah that was trying to achieve something else and then I gave up and forgot to change it back. Let me change it back quickly.

@Tobion
Copy link
Contributor

👍

@fabpot
Copy link
Member

Thank you@Seldaek.

@fabpotfabpot merged commitc28796e intosymfony:2.7Sep 14, 2015
fabpot added a commit that referenced this pull requestSep 14, 2015
…ed (Seldaek)This PR was merged into the 2.7 branch.Discussion----------Use stderr by default when a specific output is not injected| Q             | A| ------------- | ---| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets || License       | MIT| Doc PR        |stderr is really the best place to put logs by default, so unless someone explicitly passes something else we should use it, and especially not depend on the log level to decide where to output.Commits-------c28796e Use stderr by default when a specific output is not injected
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@Seldaek@jakzal@Tobion@fabpot@hhamon@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp