Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Messenger] Add worker metadata inside logs #43355

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
merged 1 commit into from
Oct 7, 2021

Conversation

94noni
Copy link
Contributor

@94noni 94noni commented Oct 7, 2021

Q A
Branch? 5.4
Bug fix? no
New feature? .
Deprecations? no
Tickets Improve #42723
License MIT
Doc PR .

Small PR related to one of my comment #42723 (comment) on the ticket PR: having this contextual info is valuable imho
cc @ruudk @okwinza @fabpot

Copy link
Contributor

@ruudk ruudk left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Contributor

@okwinza okwinza left a comment

Choose a reason for hiding this comment

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

👍

@@ -31,7 +31,7 @@ public function onWorkerStarted(WorkerStartedEvent $event): void
{
pcntl_signal(\SIGTERM, function () use ($event) {
if (null !== $this->logger) {
$this->logger->info('Received SIGTERM signal.');
$this->logger->info('Received SIGTERM signal.', ['transportNames' => $event->getWorker()->getMetadata()->getTransportNames()]);
Copy link
Member

Choose a reason for hiding this comment

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

I think we are using underscore names in such a situation, so transport_names.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@fabpot in fact, I've found both cases camelCase|snake_case in the codebase
I'll rework this but maybe it is needed a consensus here :)

@94noni 94noni force-pushed the ft-messenger-worker-log branch from 6d6eca4 to 649cb10 Compare October 7, 2021 14:39
@fabpot
Copy link
Member

fabpot commented Oct 7, 2021

Thank you @94noni.

@fabpot fabpot merged commit 626d9aa into symfony:5.4 Oct 7, 2021
@94noni 94noni deleted the ft-messenger-worker-log branch October 7, 2021 16:55
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.

8 participants