Skip to content

Fix logger scope for worker#424

Merged
benjie merged 1 commit into
graphile:mainfrom
jcapcik:patch-1
Jan 16, 2024
Merged

Fix logger scope for worker#424
benjie merged 1 commit into
graphile:mainfrom
jcapcik:patch-1

Conversation

@jcapcik

@jcapcik jcapcik commented Jan 15, 2024

Copy link
Copy Markdown
Contributor

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.

@benjie benjie left a comment

Copy link
Copy Markdown
Member

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
@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