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

[Console] Update the doc for automatic console logging#7373

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
xabbuh merged 1 commit intosymfony:masterfromchalasr:3.3/console-logging
Feb 3, 2017

Conversation

@chalasr
Copy link
Member

Insymfony/symfony#21003 we are going to provide automatic error/exception logging for the console, similar to what is done in an HTTP context.

In the docs, there is a whole chapter dedicated to this topic. Right now I just removed it, maybe it should be done differently or mentioned somewhere that error/exceptions are automatically logged on theconsole channel?

Thanks

@javiereguiluz
Copy link
Member

Yes, we should remove the contents of this article ... but maybe it's too son to remove the article itself. Otherwise, all the.../current/console/logging.html links will break. What if we just add the following content to the article:

In Symfony versions prior to 3.3, the Console component didn't provide anylogging capabilities out of the box and you had to implement your own exceptionlister for the console.Starting from Symfony 3.3, the Console component provides automatic error andexception logging. <Here a link to read more details about enabling/configuring this>
chalasr reacted with thumbs up emoji

@chalasr
Copy link
MemberAuthor

@javiereguiluz Let's do it like that 👍
However, I have no idea of where should lead the "read more" link you mentioned (nor what it should contain) :/
It is not planed to make this feature opt-in (AFAIK it is not for exception logging in HTTP context), exceptions will be logged as any other.
Maybe could we add it this link at first, and see for a more detailed reading if the feature becomes configurable?

@javiereguiluz
Copy link
Member

@chalasr then we can remove the link entirely and add it later if needed:

In Symfony versions prior to 3.3, the Console component didn't provide anylogging capabilities out of the box and you had to implement your own exceptionlister for the console.Starting from Symfony 3.3, the Console component provides automatic error andexception logging.

@chalasr
Copy link
MemberAuthor

chalasr commentedJan 17, 2017
edited
Loading

Oops, that's what I meant, but forgot "without" in my last sentence :) I made the change

Copy link
Member

@javiereguiluzjaviereguiluz left a comment

Choose a reason for hiding this comment

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

👍

@chalasr
Copy link
MemberAuthor

I re-added the page title so that other pages can have links to, the travis build was failing if missing.

symfony-splitter pushed a commit to symfony/console that referenced this pull requestJan 23, 2017
…eshalsall, chalasr)This PR was merged into the 3.3-dev branch.Discussion----------[Console][FrameworkBundle] Log console exceptions| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | #10895| License       | MIT| Doc PR        |symfony/symfony-docs#7373Continues #19382, fixing some issues including:- ability to display the input string for any `InputInterface` implementation (cast to string if possible, use the command name otherwise)- if the input can be casted as string, cleanup the result (from `command "'command:name' --foo=bar" ` to `command "command:name --foo=bar"`)- made `ExceptionLister::$logger` private instead of protected-  changed methods name from `onKernel*` to `onConsole*` (e.g. `onConsoleException`) and removed unnecessary doc blocks- Added more testsLog for an exception:> [2016-12-22 00:34:42] app.ERROR: Exception thrown while running command: "cache:clear -vvv". Message: "An error occured!" {"exception":"[object] (RuntimeException(code: 0): An error occured! at /Volumes/HD/Sites/tests/sf-demo-3.2/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php:61)","command":"cache:clear -vvv","message":"An error occured!"} []Commits-------919041c1ad Add Console ExceptionListener9896547a4d Add basic support for automatic console exception logging
fabpot added a commit to symfony/symfony that referenced this pull requestJan 23, 2017
…eshalsall, chalasr)This PR was merged into the 3.3-dev branch.Discussion----------[Console][FrameworkBundle] Log console exceptions| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#10895| License       | MIT| Doc PR        |symfony/symfony-docs#7373Continues#19382, fixing some issues including:- ability to display the input string for any `InputInterface` implementation (cast to string if possible, use the command name otherwise)- if the input can be casted as string, cleanup the result (from `command "'command:name' --foo=bar" ` to `command "command:name --foo=bar"`)- made `ExceptionLister::$logger` private instead of protected-  changed methods name from `onKernel*` to `onConsole*` (e.g. `onConsoleException`) and removed unnecessary doc blocks- Added more testsLog for an exception:> [2016-12-22 00:34:42] app.ERROR: Exception thrown while running command: "cache:clear -vvv". Message: "An error occured!" {"exception":"[object] (RuntimeException(code: 0): An error occured! at /Volumes/HD/Sites/tests/sf-demo-3.2/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php:61)","command":"cache:clear -vvv","message":"An error occured!"} []Commits-------919041c Add Console ExceptionListener9896547 Add basic support for automatic console exception logging
symfony-splitter pushed a commit to symfony/framework-bundle that referenced this pull requestJan 23, 2017
…eshalsall, chalasr)This PR was merged into the 3.3-dev branch.Discussion----------[Console][FrameworkBundle] Log console exceptions| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | #10895| License       | MIT| Doc PR        |symfony/symfony-docs#7373Continues #19382, fixing some issues including:- ability to display the input string for any `InputInterface` implementation (cast to string if possible, use the command name otherwise)- if the input can be casted as string, cleanup the result (from `command "'command:name' --foo=bar" ` to `command "command:name --foo=bar"`)- made `ExceptionLister::$logger` private instead of protected-  changed methods name from `onKernel*` to `onConsole*` (e.g. `onConsoleException`) and removed unnecessary doc blocks- Added more testsLog for an exception:> [2016-12-22 00:34:42] app.ERROR: Exception thrown while running command: "cache:clear -vvv". Message: "An error occured!" {"exception":"[object] (RuntimeException(code: 0): An error occured! at /Volumes/HD/Sites/tests/sf-demo-3.2/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php:61)","command":"cache:clear -vvv","message":"An error occured!"} []Commits-------919041c1ad Add Console ExceptionListener9896547a4d Add basic support for automatic console exception logging
@chalasrchalasr changed the title[WCM][Console] Update the doc for automatic console logging[Console] Update the doc for automatic console loggingJan 24, 2017
@chalasr
Copy link
MemberAuthor

symfony/symfony#21003 has been merged, this is no longer on hold.

@xabbuh
Copy link
Member

Thank you@chalasr.

@xabbuhxabbuh merged commit76d2c91 intosymfony:masterFeb 3, 2017
xabbuh added a commit that referenced this pull requestFeb 3, 2017
…(chalasr)This PR was merged into the master branch.Discussion----------[Console] Update the doc for automatic console loggingInsymfony/symfony#21003 we are going to provide automatic error/exception logging for the console, similar to what is done in an HTTP context.In the docs, there is a whole chapter dedicated to this topic. Right now I just removed it, maybe it should be done differently or mentioned somewhere that error/exceptions are automatically logged on the `console` channel?ThanksCommits-------76d2c91 Update the doc for automatic console logging
xabbuh added a commit that referenced this pull requestFeb 3, 2017
@chalasrchalasr deleted the 3.3/console-logging branchFebruary 3, 2017 08:33
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@chalasr@javiereguiluz@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp