Skip to content
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

Fix logger scope for worker #424

Merged
merged 1 commit into from
Jan 16, 2024
Merged

Fix logger scope for worker #424

merged 1 commit into from
Jan 16, 2024

Conversation

jcapcik
Copy link
Contributor

@jcapcik jcapcik commented Jan 15, 2024

Description

This change fixes #418, which was a simple bug introduced where the workerId was no longer being set on the logger scope (it was being set on a nested scope property), which resulted in the default logger not outputting as expected, and the logFactory function not being passed the values as defined in the documentation.

When using the default logger, the output before would be something like this:

[job] INFO: Starting task

After:

[job(worker-2c04dcd6ba5728c822: someTask{1})] INFO: Starting task

Performance impact

None

Security impact

None

Checklist

  • My code matches the project's code style and yarn lint:fix passes.
  • I've added tests for the new feature, and yarn test passes.
  • I have detailed the new feature in the relevant documentation.
  • I have added this feature to 'Pending' in the RELEASE_NOTES.md file (if one exists).
  • If this is a breaking change I've explained why.

Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

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

Great catch; thanks!

@benjie benjie merged commit 4b75a94 into graphile:main Jan 16, 2024
7 checks passed
@jcapcik jcapcik deleted the patch-1 branch January 16, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logger scope not set correctly for worker
2 participants