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

[DX] [HttpKernel] Use "context" argument when logging route in RouterListener#12594

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.7fromlinaori:dx/controller-log
Jan 3, 2015
Merged

[DX] [HttpKernel] Use "context" argument when logging route in RouterListener#12594

fabpot merged 1 commit intosymfony:2.7fromlinaori:dx/controller-log
Jan 3, 2015

Conversation

@linaori
Copy link
Contributor

QA
Bug fix?no
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
LicenseMIT

When using the "fingers_crossed" option, I only log stuff when a certain level is reached. I found the matched route with parameters to be extremely useful. The only problem was, that it gets dumped in a string, which reduces readability significantly when having multiple parameters.

I've used the context argument to provide the additional information so it becomes easier to read. Especially for formatters that use the context, such as the HtmlFormatter, can really use this.

I've done a quick check and noticed that almost always the information is dumped in the message, while I think it should be in the context. Is this something that should be changed in general?

@Tobion
Copy link
Contributor

👍 I also had this change on my todo list. IMO should be merged into 2.3

@fabpot
Copy link
Member

👍

@iltar I think it was done this way because those messages were created before the PSR. Moving stuff to the context is indeed a good idea. Can you work on another PR for 2.7? Thanks.

@fabpot
Copy link
Member

Thank you@iltar.

@fabpotfabpot merged commit448c03f intosymfony:2.7Jan 3, 2015
fabpot added a commit that referenced this pull requestJan 3, 2015
…route in RouterListener (iltar)This PR was merged into the 2.7 branch.Discussion----------[DX] [HttpKernel] Use "context" argument when logging route in RouterListener| Q             | A| ------------- | ---| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| License       | MITWhen using the "fingers_crossed" option, I only log stuff when a certain level is reached. I found the matched route with parameters to be extremely useful. The only problem was, that it gets dumped in a string, which reduces readability significantly when having multiple parameters.I've used the context argument to provide the additional information so it becomes easier to read. Especially for formatters that use the context, such as the HtmlFormatter, can really use this.*I've done a quick check and noticed that almost always the information is dumped in the message, while I think it should be in the context. Is this something that should be changed in general?*Commits-------448c03f [HttpKernel] RouterListener uses "context" argument when logging route
@linaori
Copy link
ContributorAuthor

@fabpot you mean this one for 2.3? This is merged into 2.7. Or were you pointing at the usages of the context?

@linaorilinaori deleted the dx/controller-log branchJanuary 3, 2015 10:42
@fabpot
Copy link
Member

@iltar Sorry, I meant doing another PR for other places where we could move parameters to the context instead of embedding them into a string.

@linaori
Copy link
ContributorAuthor

I should be able to make some time next week(s), I'll submit a PR when done. Do you want me to base them off the 2.3 branch?

@fabpot
Copy link
Member

@iltar It should be done on 2.7. Thanks.

fabpot added a commit that referenced this pull requestJan 16, 2015
…rs (iltar)This PR was squashed before being merged into the 2.7 branch (closes#13418).Discussion----------[DX] Attempt to improve logging messages with  parameters| Q             | A| ------------- | ---| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#12594 (comment)| License       | MIT| Doc PR        | n/aThis PR is a follow-up of#12594 `[DX] [HttpKernel] Use "context" argument when logging route in RouterListener`.I have attempted to improve the log messages, as well as updating the usage context. I wasn't sure if the log messages should end with a `.` or not, if so I can update all messages to confirm a standard.Commits-------ea80c9b [DX] Attempt to improve logging messages with  parameters
fabpot added a commit to symfony/event-dispatcher that referenced this pull requestJan 16, 2015
…rs (iltar)This PR was squashed before being merged into the 2.7 branch (closes #13418).Discussion----------[DX] Attempt to improve logging messages with  parameters| Q             | A| ------------- | ---| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |symfony/symfony#12594 (comment)| License       | MIT| Doc PR        | n/aThis PR is a follow-up of #12594 `[DX] [HttpKernel] Use "context" argument when logging route in RouterListener`.I have attempted to improve the log messages, as well as updating the usage context. I wasn't sure if the log messages should end with a `.` or not, if so I can update all messages to confirm a standard.Commits-------ea80c9b [DX] Attempt to improve logging messages with  parameters
fabpot added a commit to symfony/http-kernel that referenced this pull requestJan 16, 2015
…rs (iltar)This PR was squashed before being merged into the 2.7 branch (closes #13418).Discussion----------[DX] Attempt to improve logging messages with  parameters| Q             | A| ------------- | ---| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |symfony/symfony#12594 (comment)| License       | MIT| Doc PR        | n/aThis PR is a follow-up of #12594 `[DX] [HttpKernel] Use "context" argument when logging route in RouterListener`.I have attempted to improve the log messages, as well as updating the usage context. I wasn't sure if the log messages should end with a `.` or not, if so I can update all messages to confirm a standard.Commits-------ea80c9b [DX] Attempt to improve logging messages with  parameters
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@linaori@Tobion@fabpot

[8]ページ先頭

©2009-2025 Movatter.jp