MCPcopy
hub / github.com/fastify/fastify / customGlobalChildLogger

Function customGlobalChildLogger

test/route.5.test.js:55–61  ·  view source on GitHub ↗
(logger, bindings, opts, req)

Source from the content-addressed store, hash-verified

53 const fastify = Fastify()
54
55 const customGlobalChildLogger = (logger, bindings, opts, req) => {
56 const child = logger.child(bindings, opts)
57 child.globalLog = function (message) {
58 t.assert.strictEqual(message, 'global')
59 }
60 return child
61 }
62 const customRouteChildLogger = (logger, bindings, opts, req) => {
63 const child = logger.child(bindings, opts)
64 child.customLog = function (message) {

Callers

nothing calls this directly

Calls 1

childMethod · 0.65

Tested by

no test coverage detected