Skip to content

feat: add childLoggerFactory config#4760

Merged
mcollina merged 16 commits intofastify:mainfrom
brettwillis:child-logger-hook
Jul 11, 2023
Merged

feat: add childLoggerFactory config#4760
mcollina merged 16 commits intofastify:mainfrom
brettwillis:child-logger-hook

Conversation

@brettwillis
Copy link
Contributor

Allow customisation of child logger bindings (or the instance itself) via child logger factory function.

Closes #4751

Checklist

@brettwillis
Copy link
Contributor Author

Referring to #4751 (comment), not sure if we should also do a fastify.setChildLoggerFactory instance method to allow it to be set/encapsulated by a plugin?

If so, not sure if there's anything special I have to do to allow encapsulation etc...

@metcoder95
Copy link
Member

On my side, I think it can be an interesting addition, especially for plugins to have capabilities to also maybe decorate the logger with extra properties (e.g. traceId, custom headers, etc.)

Though, I would like to hear from @fastify/core their thoughts 🙂

fastify.js Outdated
options.disableRequestLogging = disableRequestLogging
options.ajv = ajvOptions
options.clientErrorHandler = options.clientErrorHandler || defaultClientErrorHandler
options.childLoggerFactory = options.childLoggerFactory || defaultChildLoggerFactory
Copy link
Member

Choose a reason for hiding this comment

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

For being correctly encapsulated down the road to child contexts, we will need to tighten it to the Context constructor. This will help to be inherited or altered if e.g. a user wants the child logger factory to be customized on A but not on the root instance.

Copy link
Member

Choose a reason for hiding this comment

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

Can we test it on nested contexts?

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

Could you add a test for the new types?

@mcollina
Copy link
Member

We use tsd for testing the types

@brettwillis
Copy link
Contributor Author

Added the type check in the last commit

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@brettwillis
Copy link
Contributor Author

If we want to add fastify.setChildLoggerFactory() for encapsulation, then I need some guidance. Really not sure where to begin so need some hints. Do I just add the method to the root fastify object returned from the constructor?

@metcoder95
Copy link
Member

metcoder95 commented May 19, 2023

If we want to add fastify.setChildLoggerFactory() for encapsulation, then I need some guidance. Really not sure where to begin so need some hints. Do I just add the method to the root fastify object returned from the constructor?

To achieve this we need to do the following:

  1. We will need to define a default childLoggerFactory fn when instantiating fastify. We need hide the child logger fn behind a symbol.
  2. We need to define it within the Context object. It should use the one attached to fastify at the previous step using the symbol.
  3. The fastify.setChildLoggerFactory should modify the default child logger fn hidden with the symbol, so the context object can reference it within nested encapsulations. e.g. setSerializerCompiler

Let me know if I had something wrong or if any doubt 😄

Update

Sorry, missed the last part 😅
4. On the createChildLogger fn, you'll need to access the context for the child logger fn to create the new logger. Of course, using the symbol from step 1

@Eomm Eomm added the semver-minor Issue or PR that should land as semver minor label May 25, 2023
@brettwillis
Copy link
Contributor Author

Ok I added encapsulation per-plugin and per-route, like errorHandler etc. And it looks like I've done it right because I added tests similar to errorHandler and it seems to be working. Let me know your thoughts.

My only note is: configuration options like errorHandler which have a setErrorHandler() funciton on the fastify instance don't currently also have a constructor option. However for the child logger factory we have both the childLoggerFactory constructor option, and the setChildLoggerFactory option. Do we remove the constructor option now or keep both?

Copy link
Member

@metcoder95 metcoder95 left a comment

Choose a reason for hiding this comment

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

Do we remove the constructor option now or keep both?

You're right. I think that only having the one through the method is enough, but happy to hear other thoughts 🙂

@brettwillis
Copy link
Contributor Author

brettwillis commented Jun 19, 2023

So sorry guys, I posted a whole bunch of comments several weeks ago and didn't realise I had to submit the review for them to appear 🤦🏼

Here is what is pending review

  1. @metcoder95 a need your clarification here (feat: add childLoggerFactory config #4760 (comment))
  2. @metcoder95 I implemented your suggestion (feat: add childLoggerFactory config #4760 (comment)) but it had a couple of implications (feat: add childLoggerFactory config #4760 (comment), feat: add childLoggerFactory config #4760 (comment)) which seem benign but need you to confirm.
  3. Need consensus on whether, now that we have added instance method setChildLoggerFactory, we should remove the childLoggerFactory constructor option or not.

@metcoder95
Copy link
Member

metcoder95 commented Jun 21, 2023

So sorry guys, I posted a whole bunch of comments several weeks ago and didn't realise I had to submit the review for them to appear 🤦🏼

Here is what is pending review

  1. @metcoder95 a need your clarification here (Add childLoggerFactory config #4760 (comment))

Done ✅

  1. @metcoder95 I implemented your suggestion (Add childLoggerFactory config #4760 (comment)) but it had a couple of implications (Add childLoggerFactory config #4760 (comment), Add childLoggerFactory config #4760 (comment)) which seem benign but need you to confirm.

✅ from my side

  1. Need consensus on whether, now that we have added instance method setChildLoggerFactory, we should remove the childLoggerFactory constructor option or not.

I'm +1 on removing the one from the constructor and stick to the method from the instance. In that manner works as we have for setNotFoundHandler and others

@brettwillis
Copy link
Contributor Author

I'm +1 on removing the one from the constructor and stick to the method from the instance. In that manner works as we have for setNotFoundHandler and others

Ok I removed the constructor option.

Copy link
Contributor Author

@brettwillis brettwillis Jun 27, 2023

Choose a reason for hiding this comment

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

Ok so it seems like the changes I made to onBadUrlContext (making it a proper context) has made some (not all?) of the recent #4826 obsolete.

It seems part of that PR was to fix parts of the context being undefined because it wasn't a proper context, now it is a proper context.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it's an issue. Just pointing it out. I needed to remove that test that expects routeConfig to be undefined as it is no longer undefined.

@Fdawgs Fdawgs changed the title Add childLoggerFactory config feat: add childLoggerFactory config Jul 2, 2023
Copy link
Member

@metcoder95 metcoder95 left a comment

Choose a reason for hiding this comment

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

Overall, LGTM 👍
Just about some left over and a conflict to be solved, and ready to go

brettwillis and others added 3 commits July 4, 2023 21:48
Co-authored-by: James Sumners <321201+jsumners@users.noreply.github.com>
@metcoder95
Copy link
Member

Linter seems failing 🙁

@brettwillis
Copy link
Contributor Author

Linter seems failing 🙁

Seems to be on files I didn't touch, but another PR #4879 . Do you want me to fix it here or you do somewhere else?

@metcoder95
Copy link
Member

Seems to be on files I didn't touch, but another PR #4879 . Do you want me to fix it here or you do somewhere else?

Ha, interesting. Didn't know how it passed the checks, let's open a new PR for it and rebase this branch. Opened #4882.

@metcoder95
Copy link
Member

Are we good to merge it?

cc: @mcollina

@mcollina mcollina merged commit 66bad3e into fastify:main Jul 11, 2023
@brettwillis brettwillis deleted the child-logger-hook branch July 11, 2023 08:32
@brettwillis
Copy link
Contributor Author

Thanks team and especially @metcoder95 for your support on this one 🙂

renovate bot referenced this pull request in tomacheese/telcheck Jul 17, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [fastify](https://www.fastify.io/)
([source](https://togithub.com/fastify/fastify)) | [`4.19.2` ->
`4.20.0`](https://renovatebot.com/diffs/npm/fastify/4.19.2/4.20.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/fastify/4.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/fastify/4.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/fastify/4.19.2/4.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/fastify/4.19.2/4.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>fastify/fastify (fastify)</summary>

###
[`v4.20.0`](https://togithub.com/fastify/fastify/releases/tag/v4.20.0)

[Compare
Source](https://togithub.com/fastify/fastify/compare/v4.19.2...v4.20.0)

#### What's Changed

- build(deps-dev): Bump
[@&#8203;sinclair/typebox](https://togithub.com/sinclair/typebox) from
0.28.20 to 0.29.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/fastify/fastify/pull/4877](https://togithub.com/fastify/fastify/pull/4877)
- Update Prototype-Poisoning.md by
[@&#8203;ed-henrique](https://togithub.com/ed-henrique) in
[https://github.com/fastify/fastify/pull/4879](https://togithub.com/fastify/fastify/pull/4879)
- docs: adjust line for linter by
[@&#8203;metcoder95](https://togithub.com/metcoder95) in
[https://github.com/fastify/fastify/pull/4882](https://togithub.com/fastify/fastify/pull/4882)
- Fixed type inference on .code().send() by
[@&#8203;aadito123](https://togithub.com/aadito123) in
[https://github.com/fastify/fastify/pull/4880](https://togithub.com/fastify/fastify/pull/4880)
- chore: refactor Error-typings and tests by
[@&#8203;svrnwnsch](https://togithub.com/svrnwnsch) in
[https://github.com/fastify/fastify/pull/4824](https://togithub.com/fastify/fastify/pull/4824)
- test: add missing assertion for a test by
[@&#8203;kibertoad](https://togithub.com/kibertoad) in
[https://github.com/fastify/fastify/pull/4701](https://togithub.com/fastify/fastify/pull/4701)
- chore: tests for genReqIdFactory and minor changes by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/4783](https://togithub.com/fastify/fastify/pull/4783)
- Added type definition for allowUnsafeRegex by
[@&#8203;xijdk](https://togithub.com/xijdk) in
[https://github.com/fastify/fastify/pull/4792](https://togithub.com/fastify/fastify/pull/4792)
- docs(security): update policy on ci/cd reports by
[@&#8203;jsumners](https://togithub.com/jsumners) in
[https://github.com/fastify/fastify/pull/4890](https://togithub.com/fastify/fastify/pull/4890)
- improve hooks.validate by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/4804](https://togithub.com/fastify/fastify/pull/4804)
- ci: enable caching; split jobs by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/4889](https://togithub.com/fastify/fastify/pull/4889)
- docs(plugins): note side-effect when using `await` in
`fastify.register()` by
[@&#8203;hateablestream](https://togithub.com/hateablestream) in
[https://github.com/fastify/fastify/pull/4846](https://togithub.com/fastify/fastify/pull/4846)
- \[hooks] Refine hook runners by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/4805](https://togithub.com/fastify/fastify/pull/4805)
- docs: fix wrong header size for FST_ERR_ASYNC_CONSTRAINT in Errors.md
by [@&#8203;graphiteisaac](https://togithub.com/graphiteisaac) in
[https://github.com/fastify/fastify/pull/4893](https://togithub.com/fastify/fastify/pull/4893)
- fix: rework FastifyErrors, ensure documentation completeness by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/4892](https://togithub.com/fastify/fastify/pull/4892)
- feat: add childLoggerFactory config by
[@&#8203;brettwillis](https://togithub.com/brettwillis) in
[https://github.com/fastify/fastify/pull/4760](https://togithub.com/fastify/fastify/pull/4760)
- Fix setNotFoundHandler handler type by
[@&#8203;Ethan-Arrowood](https://togithub.com/Ethan-Arrowood) in
[https://github.com/fastify/fastify/pull/4897](https://togithub.com/fastify/fastify/pull/4897)
- restore code coverage by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[https://github.com/fastify/fastify/pull/4841](https://togithub.com/fastify/fastify/pull/4841)
- fix: handle abort signal before server is ready by
[@&#8203;shayff](https://togithub.com/shayff) in
[https://github.com/fastify/fastify/pull/4886](https://togithub.com/fastify/fastify/pull/4886)
- docs(client-aborted): remove deprecated function by
[@&#8203;JekRock](https://togithub.com/JekRock) in
[https://github.com/fastify/fastify/pull/4898](https://togithub.com/fastify/fastify/pull/4898)
- Revert "docs(client-aborted): remove deprecated function
([#&#8203;4898](https://togithub.com/fastify/fastify/issues/4898))" by
[@&#8203;climba03003](https://togithub.com/climba03003) in
[https://github.com/fastify/fastify/pull/4901](https://togithub.com/fastify/fastify/pull/4901)
- docs(logging): fix typo by
[@&#8203;yamanidev](https://togithub.com/yamanidev) in
[https://github.com/fastify/fastify/pull/4905](https://togithub.com/fastify/fastify/pull/4905)
- Support IPv6 ::1 in listeningOrigin by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[https://github.com/fastify/fastify/pull/4902](https://togithub.com/fastify/fastify/pull/4902)
- fix: extend isCustomValidatorCompiler from parent controller by
[@&#8203;tinchoz49](https://togithub.com/tinchoz49) in
[https://github.com/fastify/fastify/pull/4903](https://togithub.com/fastify/fastify/pull/4903)
- fix: allow uppercase requestdHeader by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/4906](https://togithub.com/fastify/fastify/pull/4906)

#### New Contributors

- [@&#8203;ed-henrique](https://togithub.com/ed-henrique) made their
first contribution in
[https://github.com/fastify/fastify/pull/4879](https://togithub.com/fastify/fastify/pull/4879)
- [@&#8203;svrnwnsch](https://togithub.com/svrnwnsch) made their first
contribution in
[https://github.com/fastify/fastify/pull/4824](https://togithub.com/fastify/fastify/pull/4824)
- [@&#8203;xijdk](https://togithub.com/xijdk) made their first
contribution in
[https://github.com/fastify/fastify/pull/4792](https://togithub.com/fastify/fastify/pull/4792)
- [@&#8203;hateablestream](https://togithub.com/hateablestream) made
their first contribution in
[https://github.com/fastify/fastify/pull/4846](https://togithub.com/fastify/fastify/pull/4846)
- [@&#8203;graphiteisaac](https://togithub.com/graphiteisaac) made their
first contribution in
[https://github.com/fastify/fastify/pull/4893](https://togithub.com/fastify/fastify/pull/4893)
- [@&#8203;shayff](https://togithub.com/shayff) made their first
contribution in
[https://github.com/fastify/fastify/pull/4886](https://togithub.com/fastify/fastify/pull/4886)
- [@&#8203;JekRock](https://togithub.com/JekRock) made their first
contribution in
[https://github.com/fastify/fastify/pull/4898](https://togithub.com/fastify/fastify/pull/4898)
- [@&#8203;yamanidev](https://togithub.com/yamanidev) made their first
contribution in
[https://github.com/fastify/fastify/pull/4905](https://togithub.com/fastify/fastify/pull/4905)
- [@&#8203;tinchoz49](https://togithub.com/tinchoz49) made their first
contribution in
[https://github.com/fastify/fastify/pull/4903](https://togithub.com/fastify/fastify/pull/4903)

**Full Changelog**:
fastify/fastify@v4.19.2...v4.20.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/tomacheese/telcheck).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi44LjExIiwidXBkYXRlZEluVmVyIjoiMzYuOC4xMSIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot referenced this pull request in redwoodjs/graphql Jul 18, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [fastify](https://www.fastify.io/)
([source](https://togithub.com/fastify/fastify)) | [`4.19.2` ->
`4.20.0`](https://renovatebot.com/diffs/npm/fastify/4.19.2/4.20.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/fastify/4.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/fastify/4.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/fastify/4.19.2/4.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/fastify/4.19.2/4.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>fastify/fastify (fastify)</summary>

###
[`v4.20.0`](https://togithub.com/fastify/fastify/releases/tag/v4.20.0)

[Compare
Source](https://togithub.com/fastify/fastify/compare/v4.19.2...v4.20.0)

#### What's Changed

- build(deps-dev): Bump
[@&#8203;sinclair/typebox](https://togithub.com/sinclair/typebox) from
0.28.20 to 0.29.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/fastify/fastify/pull/4877](https://togithub.com/fastify/fastify/pull/4877)
- Update Prototype-Poisoning.md by
[@&#8203;ed-henrique](https://togithub.com/ed-henrique) in
[https://github.com/fastify/fastify/pull/4879](https://togithub.com/fastify/fastify/pull/4879)
- docs: adjust line for linter by
[@&#8203;metcoder95](https://togithub.com/metcoder95) in
[https://github.com/fastify/fastify/pull/4882](https://togithub.com/fastify/fastify/pull/4882)
- Fixed type inference on .code().send() by
[@&#8203;aadito123](https://togithub.com/aadito123) in
[https://github.com/fastify/fastify/pull/4880](https://togithub.com/fastify/fastify/pull/4880)
- chore: refactor Error-typings and tests by
[@&#8203;svrnwnsch](https://togithub.com/svrnwnsch) in
[https://github.com/fastify/fastify/pull/4824](https://togithub.com/fastify/fastify/pull/4824)
- test: add missing assertion for a test by
[@&#8203;kibertoad](https://togithub.com/kibertoad) in
[https://github.com/fastify/fastify/pull/4701](https://togithub.com/fastify/fastify/pull/4701)
- chore: tests for genReqIdFactory and minor changes by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/4783](https://togithub.com/fastify/fastify/pull/4783)
- Added type definition for allowUnsafeRegex by
[@&#8203;xijdk](https://togithub.com/xijdk) in
[https://github.com/fastify/fastify/pull/4792](https://togithub.com/fastify/fastify/pull/4792)
- docs(security): update policy on ci/cd reports by
[@&#8203;jsumners](https://togithub.com/jsumners) in
[https://github.com/fastify/fastify/pull/4890](https://togithub.com/fastify/fastify/pull/4890)
- improve hooks.validate by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/4804](https://togithub.com/fastify/fastify/pull/4804)
- ci: enable caching; split jobs by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/4889](https://togithub.com/fastify/fastify/pull/4889)
- docs(plugins): note side-effect when using `await` in
`fastify.register()` by
[@&#8203;hateablestream](https://togithub.com/hateablestream) in
[https://github.com/fastify/fastify/pull/4846](https://togithub.com/fastify/fastify/pull/4846)
- \[hooks] Refine hook runners by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/4805](https://togithub.com/fastify/fastify/pull/4805)
- docs: fix wrong header size for FST_ERR_ASYNC_CONSTRAINT in Errors.md
by [@&#8203;graphiteisaac](https://togithub.com/graphiteisaac) in
[https://github.com/fastify/fastify/pull/4893](https://togithub.com/fastify/fastify/pull/4893)
- fix: rework FastifyErrors, ensure documentation completeness by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/4892](https://togithub.com/fastify/fastify/pull/4892)
- feat: add childLoggerFactory config by
[@&#8203;brettwillis](https://togithub.com/brettwillis) in
[https://github.com/fastify/fastify/pull/4760](https://togithub.com/fastify/fastify/pull/4760)
- Fix setNotFoundHandler handler type by
[@&#8203;Ethan-Arrowood](https://togithub.com/Ethan-Arrowood) in
[https://github.com/fastify/fastify/pull/4897](https://togithub.com/fastify/fastify/pull/4897)
- restore code coverage by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[https://github.com/fastify/fastify/pull/4841](https://togithub.com/fastify/fastify/pull/4841)
- fix: handle abort signal before server is ready by
[@&#8203;shayff](https://togithub.com/shayff) in
[https://github.com/fastify/fastify/pull/4886](https://togithub.com/fastify/fastify/pull/4886)
- docs(client-aborted): remove deprecated function by
[@&#8203;JekRock](https://togithub.com/JekRock) in
[https://github.com/fastify/fastify/pull/4898](https://togithub.com/fastify/fastify/pull/4898)
- Revert "docs(client-aborted): remove deprecated function
([#&#8203;4898](https://togithub.com/fastify/fastify/issues/4898))" by
[@&#8203;climba03003](https://togithub.com/climba03003) in
[https://github.com/fastify/fastify/pull/4901](https://togithub.com/fastify/fastify/pull/4901)
- docs(logging): fix typo by
[@&#8203;yamanidev](https://togithub.com/yamanidev) in
[https://github.com/fastify/fastify/pull/4905](https://togithub.com/fastify/fastify/pull/4905)
- Support IPv6 ::1 in listeningOrigin by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[https://github.com/fastify/fastify/pull/4902](https://togithub.com/fastify/fastify/pull/4902)
- fix: extend isCustomValidatorCompiler from parent controller by
[@&#8203;tinchoz49](https://togithub.com/tinchoz49) in
[https://github.com/fastify/fastify/pull/4903](https://togithub.com/fastify/fastify/pull/4903)
- fix: allow uppercase requestdHeader by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/4906](https://togithub.com/fastify/fastify/pull/4906)

#### New Contributors

- [@&#8203;ed-henrique](https://togithub.com/ed-henrique) made their
first contribution in
[https://github.com/fastify/fastify/pull/4879](https://togithub.com/fastify/fastify/pull/4879)
- [@&#8203;svrnwnsch](https://togithub.com/svrnwnsch) made their first
contribution in
[https://github.com/fastify/fastify/pull/4824](https://togithub.com/fastify/fastify/pull/4824)
- [@&#8203;xijdk](https://togithub.com/xijdk) made their first
contribution in
[https://github.com/fastify/fastify/pull/4792](https://togithub.com/fastify/fastify/pull/4792)
- [@&#8203;hateablestream](https://togithub.com/hateablestream) made
their first contribution in
[https://github.com/fastify/fastify/pull/4846](https://togithub.com/fastify/fastify/pull/4846)
- [@&#8203;graphiteisaac](https://togithub.com/graphiteisaac) made their
first contribution in
[https://github.com/fastify/fastify/pull/4893](https://togithub.com/fastify/fastify/pull/4893)
- [@&#8203;shayff](https://togithub.com/shayff) made their first
contribution in
[https://github.com/fastify/fastify/pull/4886](https://togithub.com/fastify/fastify/pull/4886)
- [@&#8203;JekRock](https://togithub.com/JekRock) made their first
contribution in
[https://github.com/fastify/fastify/pull/4898](https://togithub.com/fastify/fastify/pull/4898)
- [@&#8203;yamanidev](https://togithub.com/yamanidev) made their first
contribution in
[https://github.com/fastify/fastify/pull/4905](https://togithub.com/fastify/fastify/pull/4905)
- [@&#8203;tinchoz49](https://togithub.com/tinchoz49) made their first
contribution in
[https://github.com/fastify/fastify/pull/4903](https://togithub.com/fastify/fastify/pull/4903)

**Full Changelog**:
fastify/fastify@v4.19.2...v4.20.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/redwoodjs/redwood).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi44LjExIiwidXBkYXRlZEluVmVyIjoiMzYuOC4xMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
jtoar referenced this pull request in redwoodjs/graphql Jul 19, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [fastify](https://www.fastify.io/)
([source](https://togithub.com/fastify/fastify)) | [`4.19.2` ->
`4.20.0`](https://renovatebot.com/diffs/npm/fastify/4.19.2/4.20.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/fastify/4.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/fastify/4.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/fastify/4.19.2/4.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/fastify/4.19.2/4.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>fastify/fastify (fastify)</summary>

###
[`v4.20.0`](https://togithub.com/fastify/fastify/releases/tag/v4.20.0)

[Compare
Source](https://togithub.com/fastify/fastify/compare/v4.19.2...v4.20.0)

#### What's Changed

- build(deps-dev): Bump
[@&#8203;sinclair/typebox](https://togithub.com/sinclair/typebox) from
0.28.20 to 0.29.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/fastify/fastify/pull/4877](https://togithub.com/fastify/fastify/pull/4877)
- Update Prototype-Poisoning.md by
[@&#8203;ed-henrique](https://togithub.com/ed-henrique) in
[https://github.com/fastify/fastify/pull/4879](https://togithub.com/fastify/fastify/pull/4879)
- docs: adjust line for linter by
[@&#8203;metcoder95](https://togithub.com/metcoder95) in
[https://github.com/fastify/fastify/pull/4882](https://togithub.com/fastify/fastify/pull/4882)
- Fixed type inference on .code().send() by
[@&#8203;aadito123](https://togithub.com/aadito123) in
[https://github.com/fastify/fastify/pull/4880](https://togithub.com/fastify/fastify/pull/4880)
- chore: refactor Error-typings and tests by
[@&#8203;svrnwnsch](https://togithub.com/svrnwnsch) in
[https://github.com/fastify/fastify/pull/4824](https://togithub.com/fastify/fastify/pull/4824)
- test: add missing assertion for a test by
[@&#8203;kibertoad](https://togithub.com/kibertoad) in
[https://github.com/fastify/fastify/pull/4701](https://togithub.com/fastify/fastify/pull/4701)
- chore: tests for genReqIdFactory and minor changes by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/4783](https://togithub.com/fastify/fastify/pull/4783)
- Added type definition for allowUnsafeRegex by
[@&#8203;xijdk](https://togithub.com/xijdk) in
[https://github.com/fastify/fastify/pull/4792](https://togithub.com/fastify/fastify/pull/4792)
- docs(security): update policy on ci/cd reports by
[@&#8203;jsumners](https://togithub.com/jsumners) in
[https://github.com/fastify/fastify/pull/4890](https://togithub.com/fastify/fastify/pull/4890)
- improve hooks.validate by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/4804](https://togithub.com/fastify/fastify/pull/4804)
- ci: enable caching; split jobs by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/4889](https://togithub.com/fastify/fastify/pull/4889)
- docs(plugins): note side-effect when using `await` in
`fastify.register()` by
[@&#8203;hateablestream](https://togithub.com/hateablestream) in
[https://github.com/fastify/fastify/pull/4846](https://togithub.com/fastify/fastify/pull/4846)
- \[hooks] Refine hook runners by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/4805](https://togithub.com/fastify/fastify/pull/4805)
- docs: fix wrong header size for FST_ERR_ASYNC_CONSTRAINT in Errors.md
by [@&#8203;graphiteisaac](https://togithub.com/graphiteisaac) in
[https://github.com/fastify/fastify/pull/4893](https://togithub.com/fastify/fastify/pull/4893)
- fix: rework FastifyErrors, ensure documentation completeness by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/4892](https://togithub.com/fastify/fastify/pull/4892)
- feat: add childLoggerFactory config by
[@&#8203;brettwillis](https://togithub.com/brettwillis) in
[https://github.com/fastify/fastify/pull/4760](https://togithub.com/fastify/fastify/pull/4760)
- Fix setNotFoundHandler handler type by
[@&#8203;Ethan-Arrowood](https://togithub.com/Ethan-Arrowood) in
[https://github.com/fastify/fastify/pull/4897](https://togithub.com/fastify/fastify/pull/4897)
- restore code coverage by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[https://github.com/fastify/fastify/pull/4841](https://togithub.com/fastify/fastify/pull/4841)
- fix: handle abort signal before server is ready by
[@&#8203;shayff](https://togithub.com/shayff) in
[https://github.com/fastify/fastify/pull/4886](https://togithub.com/fastify/fastify/pull/4886)
- docs(client-aborted): remove deprecated function by
[@&#8203;JekRock](https://togithub.com/JekRock) in
[https://github.com/fastify/fastify/pull/4898](https://togithub.com/fastify/fastify/pull/4898)
- Revert "docs(client-aborted): remove deprecated function
([#&#8203;4898](https://togithub.com/fastify/fastify/issues/4898))" by
[@&#8203;climba03003](https://togithub.com/climba03003) in
[https://github.com/fastify/fastify/pull/4901](https://togithub.com/fastify/fastify/pull/4901)
- docs(logging): fix typo by
[@&#8203;yamanidev](https://togithub.com/yamanidev) in
[https://github.com/fastify/fastify/pull/4905](https://togithub.com/fastify/fastify/pull/4905)
- Support IPv6 ::1 in listeningOrigin by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[https://github.com/fastify/fastify/pull/4902](https://togithub.com/fastify/fastify/pull/4902)
- fix: extend isCustomValidatorCompiler from parent controller by
[@&#8203;tinchoz49](https://togithub.com/tinchoz49) in
[https://github.com/fastify/fastify/pull/4903](https://togithub.com/fastify/fastify/pull/4903)
- fix: allow uppercase requestdHeader by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/4906](https://togithub.com/fastify/fastify/pull/4906)

#### New Contributors

- [@&#8203;ed-henrique](https://togithub.com/ed-henrique) made their
first contribution in
[https://github.com/fastify/fastify/pull/4879](https://togithub.com/fastify/fastify/pull/4879)
- [@&#8203;svrnwnsch](https://togithub.com/svrnwnsch) made their first
contribution in
[https://github.com/fastify/fastify/pull/4824](https://togithub.com/fastify/fastify/pull/4824)
- [@&#8203;xijdk](https://togithub.com/xijdk) made their first
contribution in
[https://github.com/fastify/fastify/pull/4792](https://togithub.com/fastify/fastify/pull/4792)
- [@&#8203;hateablestream](https://togithub.com/hateablestream) made
their first contribution in
[https://github.com/fastify/fastify/pull/4846](https://togithub.com/fastify/fastify/pull/4846)
- [@&#8203;graphiteisaac](https://togithub.com/graphiteisaac) made their
first contribution in
[https://github.com/fastify/fastify/pull/4893](https://togithub.com/fastify/fastify/pull/4893)
- [@&#8203;shayff](https://togithub.com/shayff) made their first
contribution in
[https://github.com/fastify/fastify/pull/4886](https://togithub.com/fastify/fastify/pull/4886)
- [@&#8203;JekRock](https://togithub.com/JekRock) made their first
contribution in
[https://github.com/fastify/fastify/pull/4898](https://togithub.com/fastify/fastify/pull/4898)
- [@&#8203;yamanidev](https://togithub.com/yamanidev) made their first
contribution in
[https://github.com/fastify/fastify/pull/4905](https://togithub.com/fastify/fastify/pull/4905)
- [@&#8203;tinchoz49](https://togithub.com/tinchoz49) made their first
contribution in
[https://github.com/fastify/fastify/pull/4903](https://togithub.com/fastify/fastify/pull/4903)

**Full Changelog**:
fastify/fastify@v4.19.2...v4.20.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/redwoodjs/redwood).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi44LjExIiwidXBkYXRlZEluVmVyIjoiMzYuOC4xMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

semver-minor Issue or PR that should land as semver minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Child logger hook

5 participants