nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: pinojs/pino
Pull request #476 (2018-08-08 14:39:41)

Do not crash on prettyPrint: { translateTime: true }.
Fixes https://github.com/pinojs/pino-pretty/issues/14


Patch:
diff --git a/lib/tools.js b/lib/tools.js
index 5a90fa7..fc89287 100644
--- a/lib/tools.js
+++ b/lib/tools.js
@@ -179,10 +179,16 @@ function prettifierMetaWrapper (pretty, dest) {
         this.lastLogger[parsedChindingsSym] = chindings
       }
 
+      var time = this.lastTime
+
+      if (time.match(/^\d+/)) {
+        time = parseInt(time)
+      }
+
       const obj = Object.assign({
         level: this.lastLevel,
         msg: this.lastMsg,
-        time: this.lastTime
+        time
       }, chindings, this.lastObj)
 
       const serializers = this.lastLogger[serializersSym]


Test patch:
diff --git a/test/fixtures/pretty/dateformat.js b/test/fixtures/pretty/dateformat.js
new file mode 100644
index 0000000..6697fc3
--- /dev/null
+++ b/test/fixtures/pretty/dateformat.js
@@ -0,0 +1,10 @@
+global.process = { __proto__: process, pid: 123456 }
+Date.now = function () { return 1459875739796 }
+require('os').hostname = function () { return 'abcdefghijklmnopqr' }
+var pino = require(require.resolve('./../../../'))
+var log = pino({
+  prettyPrint: {
+    translateTime: true
+  }
+})
+log.info('h')
diff --git a/test/pretty.test.js b/test/pretty.test.js
index 5efa776..1d6df30 100644
--- a/test/pretty.test.js
+++ b/test/pretty.test.js
@@ -76,7 +76,8 @@ test('can send pretty print to custom stream', async ({is}) => {
   const log = pino({
     prettifier: require('pino-pretty'),
     prettyPrint: {
-      levelFirst: true
+      levelFirst: true,
+      colorize: false
     }
   }, dest)
   log.info('foo')
@@ -135,3 +136,15 @@ test('applies redaction rules', async ({is, isNot}) => {
   isNot(actual.match(/\[Redacted\]/), null)
   is(actual.match(/object/), null)
 })
+
+test('dateformat', async ({isNot}) => {
+  var actual = ''
+  const child = fork(join(__dirname, 'fixtures', 'pretty', 'dateformat.js'), {silent: true})
+
+  child.stdout.pipe(writer((s, enc, cb) => {
+    actual += s
+    cb()
+  }))
+  await once(child, 'close')
+  isNot(actual.match(/\(123456 on abcdefghijklmnopqr\): h/), null)
+})
Repository: pinojs/pino
Pull request #485 (2018-08-13 10:15:29)

Fix prettyPrint child data
Fixes https://github.com/pinojs/pino/issues/484

mcollina: cc @ronag

Patch:
diff --git a/lib/tools.js b/lib/tools.js
index fc89287..c571891 100644
--- a/lib/tools.js
+++ b/lib/tools.js
@@ -172,9 +172,12 @@ function prettifierMetaWrapper (pretty, dest) {
     lastObj: null,
     lastLogger: null,
     write (chunk) {
-      var chindings = this.lastLogger[parsedChindingsSym]
+      const lastLogger = this.lastLogger
+      var chindings = null
 
-      if (!chindings) {
+      if (lastLogger.hasOwnProperty(parsedChindingsSym)) {
+        chindings = this.lastLogger[parsedChindingsSym]
+      } else {
         chindings = JSON.parse('{"v":1' + this.lastLogger[chindingsSym] + '}')
         this.lastLogger[parsedChindingsSym] = chindings
       }


Test patch:
diff --git a/test/fixtures/pretty/child.js b/test/fixtures/pretty/child.js
index cc1f289..0af3a1e 100644
--- a/test/fixtures/pretty/child.js
+++ b/test/fixtures/pretty/child.js
@@ -4,4 +4,5 @@ require('os').hostname = function () { return 'abcdefghijklmnopqr' }
 var pino = require(require.resolve('./../../../'))
 var log = pino({prettyPrint: true}).child({a: 1})
 log.info('h')
+log.child({b: 2}).info('h3')
 setTimeout(() => log.info('h2'), 200)
diff --git a/test/pretty.test.js b/test/pretty.test.js
index 28506dd..6926863 100644
--- a/test/pretty.test.js
+++ b/test/pretty.test.js
@@ -107,7 +107,8 @@ test('parses and outputs chindings', async ({is, isNot}) => {
   isNot(actual.match(/\(123456 on abcdefghijklmnopqr\): h/), null)
   isNot(actual.match(/\(123456 on abcdefghijklmnopqr\): h2/), null)
   isNot(actual.match(/a: 1/), null)
-  is(actual.match(/a: 1/g).length, 2)
+  isNot(actual.match(/b: 2/), null)
+  is(actual.match(/a: 1/g).length, 3)
 })
 
 test('applies serializers', async ({is, isNot}) => {
Repository: pinojs/pino
Pull request #486 (2018-08-14 08:56:22)

Forward to pretty an error object passed as first arg
Fixes https://github.com/pinojs/pino-pretty/issues/23
Fixes https://github.com/pinojs/pino-pretty/issues/24

mcollina: Landing as I don't have much time later today to land this, and I think this is fairly urgent to land.

Patch:
diff --git a/example.js b/example.js
index 95ae511..19228f2 100644
--- a/example.js
+++ b/example.js
@@ -29,3 +29,5 @@ pino.child({ another: 'property' }).debug('this is a debug statement via child')
 pino.trace('this is a trace statement')
 
 pino.debug('this is a "debug" statement with "')
+
+pino.info(new Error('kaboom'))
diff --git a/lib/tools.js b/lib/tools.js
index c571891..01e0839 100644
--- a/lib/tools.js
+++ b/lib/tools.js
@@ -188,11 +188,22 @@ function prettifierMetaWrapper (pretty, dest) {
         time = parseInt(time)
       }
 
+      var lastObj = this.lastObj
+      var msg = this.lastMsg
+
+      if (lastObj instanceof Error) {
+        msg = lastObj.message
+        lastObj = {
+          type: 'Error',
+          stack: lastObj.stack
+        }
+      }
+
       const obj = Object.assign({
         level: this.lastLevel,
-        msg: this.lastMsg,
+        msg,
         time
-      }, chindings, this.lastObj)
+      }, chindings, lastObj)
 
       const serializers = this.lastLogger[serializersSym]
       const keys = Object.keys(serializers)


Test patch:
diff --git a/test/fixtures/pretty/error.js b/test/fixtures/pretty/error.js
new file mode 100644
index 0000000..12be861
--- /dev/null
+++ b/test/fixtures/pretty/error.js
@@ -0,0 +1,6 @@
+global.process = { __proto__: process, pid: 123456 }
+Date.now = function () { return 1459875739796 }
+require('os').hostname = function () { return 'abcdefghijklmnopqr' }
+var pino = require(require.resolve('./../../../'))
+var log = pino({prettyPrint: true})
+log.error(new Error('kaboom'))
diff --git a/test/pretty.test.js b/test/pretty.test.js
index 6926863..6c9f8b9 100644
--- a/test/pretty.test.js
+++ b/test/pretty.test.js
@@ -173,3 +173,16 @@ test('with custom timestamp', async ({is}) => {
   await once(child, 'close')
   is(actual.slice(0, 8), '["test"]')
 })
+
+test('errors', async ({isNot}) => {
+  var actual = ''
+  const child = fork(join(__dirname, 'fixtures', 'pretty', 'error.js'), {silent: true})
+
+  child.stdout.pipe(writer((s, enc, cb) => {
+    actual += s
+    cb()
+  }))
+  await once(child, 'close')
+  isNot(actual.match(/\(123456 on abcdefghijklmnopqr\): kaboom/), null)
+  isNot(actual.match(/.*error\.js.*/), null)
+})
Repository: pinojs/pino
Pull request #487 (2018-08-14 20:45:42)

Symbol.for('pino.serializers') is part of the public API
Fixes https://github.com/pinojs/hapi-pino/issues/62


Patch:
diff --git a/docs/api.md b/docs/api.md
index d76efd7..a69ec82 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -15,6 +15,7 @@
   * [logger.level](#level)
   * [logger.isLevelEnabled()](#islevelenabled)
   * [logger.levels](#levels)
+  * [logger\[Symbol.for('pino.serializers')\]](#serializers)
   * [Event: 'level-change'](#level-change)
   * [logger.version](#version)
   * [logger.LOG_VERSION](#log_version)
@@ -543,6 +544,12 @@ $ node -p "require('pino')().levels"
 
 * See [`logger.level`](#level)
 
+<a id="serializers"></a>
+### logger\[Symbol.for('pino.serializers')\]
+
+Returns the serializers as applied to the current logger instance. If a child logger did not
+register it's own serializer upon instantiation the serializers of the parent will be returned.
+
 <a id="level-change"></a>
 ### Event: 'level-change'
 
diff --git a/lib/symbols.js b/lib/symbols.js
index b704c70..e56adaf 100644
--- a/lib/symbols.js
+++ b/lib/symbols.js
@@ -10,7 +10,6 @@ const parsedChindingsSym = Symbol('pino.parsedChindings')
 
 const asJsonSym = Symbol('pino.asJson')
 const writeSym = Symbol('pino.write')
-const serializersSym = Symbol('pino.serializers')
 const redactFmtSym = Symbol('pino.redactFmt')
 
 const timeSym = Symbol('pino.time')
@@ -21,6 +20,9 @@ const endSym = Symbol('pino.end')
 const formatOptsSym = Symbol('pino.formatOpts')
 const messageKeyStringSym = Symbol('pino.messageKeyString')
 
+// public symbols, no need to use the same pino
+// version for these
+const serializersSym = Symbol.for('pino.serializers')
 const wildcardGsym = Symbol.for('pino.*')
 const needsMetadataGsym = Symbol.for('pino.metadata')
 


Test patch:
diff --git a/test/serializers.test.js b/test/serializers.test.js
index 424d262..d38e81e 100644
--- a/test/serializers.test.js
+++ b/test/serializers.test.js
@@ -91,6 +91,29 @@ test('child does not overwrite parent serializers', async ({is}) => {
   is((await o2).test, 'child')
 })
 
+test('Symbol.for(\'pino.serializers\')', async ({is, isNot}) => {
+  const stream = sink()
+  const parent = pino({ serializers: parentSerializers }, stream)
+  const child = parent.child({a: 'property'})
+
+  is(parent[Symbol.for('pino.serializers')], parentSerializers)
+  is(child[Symbol.for('pino.serializers')], parentSerializers)
+
+  const child2 = parent.child({
+    serializers: {
+      a
+    }
+  })
+
+  function a () {
+    return 'hello'
+  }
+
+  isNot(child2[Symbol.for('pino.serializers')], parentSerializers)
+  is(child2[Symbol.for('pino.serializers')].a, a)
+  is(child2[Symbol.for('pino.serializers')].test, parentSerializers.test)
+})
+
 test('children inherit parent serializers', async ({is}) => {
   const stream = sink()
   const parent = pino({ serializers: parentSerializers }, stream)
Repository: pinojs/pino
Pull request #514 (2018-09-05 16:21:52)

Do not error "primitives cannot be redacted"


Patch:
diff --git a/lib/redaction.js b/lib/redaction.js
index 4ae1a7b..ec2d05d 100644
--- a/lib/redaction.js
+++ b/lib/redaction.js
@@ -11,6 +11,7 @@ const validate = validator({
 })
 
 const CENSOR = '[Redacted]'
+const strict = false // TODO should this be configurable?
 
 function redaction (opts, serialize) {
   const { paths, censor } = handle(opts)
@@ -37,14 +38,14 @@ function redaction (opts, serialize) {
   // provides top level redaction for instances where
   // an object is interpolated into the msg string
   const result = {
-    [redactFmtSym]: fastRedact({ paths, censor, serialize })
+    [redactFmtSym]: fastRedact({ paths, censor, serialize, strict })
   }
   const serializedCensor = serialize(censor)
   const topCensor = () => serializedCensor
   return Object.keys(shape).reduce((o, k) => {
     // top level key:
     if (shape[k] === null) o[k] = topCensor
-    else o[k] = fastRedact({ paths: shape[k], censor, serialize })
+    else o[k] = fastRedact({ paths: shape[k], censor, serialize, strict })
     return o
   }, result)
 }
diff --git a/package.json b/package.json
index 0c2b091..14e16c3 100644
--- a/package.json
+++ b/package.json
@@ -67,27 +67,27 @@
     "fresh-require": "^1.0.3",
     "log": "^1.4.0",
     "loglevel": "^1.6.1",
-    "pino-pretty": "^2.0.1",
+    "pino-pretty": "^2.1.0",
     "pre-commit": "^1.2.2",
-    "proxyquire": "^2.0.1",
+    "proxyquire": "^2.1.0",
     "qodaa": "^1.0.1",
     "snazzy": "^8.0.0",
     "split2": "^3.0.0",
-    "standard": "^12.0.0",
+    "standard": "^12.0.1",
     "steed": "^1.1.3",
     "tap": "^12.0.1",
     "tape": "^4.9.0",
     "through2": "^2.0.3",
-    "winston": "^3.0.0"
+    "winston": "^3.1.0"
   },
   "dependencies": {
     "fast-json-parse": "^1.0.3",
-    "fast-redact": "^1.1.14",
-    "fast-safe-stringify": "^2.0.4",
+    "fast-redact": "^1.2.0",
+    "fast-safe-stringify": "^2.0.6",
     "flatstr": "^1.0.5",
-    "pino-std-serializers": "^2.2.0",
+    "pino-std-serializers": "^2.2.1",
     "pump": "^3.0.0",
     "quick-format-unescaped": "^3.0.0",
-    "sonic-boom": "^0.6.0"
+    "sonic-boom": "^0.6.1"
   }
 }


Test patch:
diff --git a/test/redact.test.js b/test/redact.test.js
index 90d9171..2644131 100644
--- a/test/redact.test.js
+++ b/test/redact.test.js
@@ -405,6 +405,17 @@ test('redacts strings at the top level', async ({ is }) => {
   is(o.s, '[Redacted]')
 })
 
+test('does not redact primitives if not objects', async ({ is }) => {
+  const stream = sink()
+  const instance = pino({ redact: ['a.b'] }, stream)
+  const obj = {
+    a: 42
+  }
+  instance.info(obj)
+  const o = await once(stream, 'data')
+  is(o.a, 42)
+})
+
 test('redacts null at the top level', async ({ is }) => {
   const stream = sink()
   const instance = pino({ redact: ['n'] }, stream)
Repository: pinojs/pino
Pull request #517 (2018-09-17 13:32:19)

Fix for issue 516
The problem was described in https://github.com/pinojs/pino/issues/516

mcollina: Can you add a unit test?
husticdf: Added a test that fails without the code modification and succeeds after.

Patch:
diff --git a/lib/levels.js b/lib/levels.js
index 1b4bacd..7eb66c4 100644
--- a/lib/levels.js
+++ b/lib/levels.js
@@ -117,7 +117,7 @@ function assertDefaultLevelFound (defaultLevel, customLevels, useOnlyCustomLevel
   if (typeof defaultLevel === 'number') {
     const values = [].concat(
       Object.keys(customLevels || {}).map(key => customLevels[key]),
-      useOnlyCustomLevels ? [] : Object.keys(nums),
+      useOnlyCustomLevels ? [] : Object.keys(nums).map(level => +level),
       Infinity
     )
     if (!values.includes(defaultLevel)) {


Test patch:
diff --git a/test/levels.test.js b/test/levels.test.js
index 064be32..f8ee7ae 100644
--- a/test/levels.test.js
+++ b/test/levels.test.js
@@ -381,3 +381,9 @@ test('throws when creating a default value that does not exist in logger levels'
     is(message, `default level:info must be included in custom levels`)
   }
 })
+
+test('passes when creating a default value that exists in logger levels', async ({ is, throws }) => {
+  pino({
+    level: 30
+  })
+})
Repository: pinojs/pino
Pull request #519 (2018-09-24 07:12:24)

Convert NaN and Infinity to null.
As noted in https://github.com/pinojs/pino-pretty/issues/36 by @nwoltman, we are not logging `Infinity` and `NaN`  correctly. This PR makes them log as `null`.


Patch:
diff --git a/lib/tools.js b/lib/tools.js
index 4a03e4a..6fa081a 100644
--- a/lib/tools.js
+++ b/lib/tools.js
@@ -110,6 +110,11 @@ function asJson (obj, msg, num, time) {
         switch (typeof value) {
           case 'undefined': continue
           case 'number':
+            /* eslint no-fallthrough: "off" */
+            if (value === Infinity || isNaN(value)) {
+              value = null
+            }
+            // this case explicity falls through to the next one
           case 'boolean':
             if (stringifiers[key]) value = stringifiers[key](value)
             data += ',"' + key + '":' + value


Test patch:
diff --git a/test/basic.test.js b/test/basic.test.js
index 2165006..9b355d1 100644
--- a/test/basic.test.js
+++ b/test/basic.test.js
@@ -530,3 +530,25 @@ test('throws when setting useOnlyCustomLevels without customLevels', async ({ is
     is(message, 'customLevels is required if useOnlyCustomLevels is set true')
   }
 })
+
+test('correctly log Infinity', async (t) => {
+  const stream = sink()
+  const instance = pino(stream)
+
+  const o = { num: Infinity }
+  instance.info(o)
+
+  const { num } = await once(stream, 'data')
+  t.is(num, null)
+})
+
+test('correctly log NaN', async (t) => {
+  const stream = sink()
+  const instance = pino(stream)
+
+  const o = { num: NaN }
+  instance.info(o)
+
+  const { num } = await once(stream, 'data')
+  t.is(num, null)
+})
Repository: pinojs/pino
Pull request #520 (2018-09-24 19:41:16)

Convert -Infinity to null
Building on top of #519, this adds support for converting all invalid number values to `null` (really the only value left to handle was `-Infinity`, but this change does it all with one function call).


Patch:
diff --git a/lib/tools.js b/lib/tools.js
index 6fa081a..536a0dc 100644
--- a/lib/tools.js
+++ b/lib/tools.js
@@ -111,7 +111,7 @@ function asJson (obj, msg, num, time) {
           case 'undefined': continue
           case 'number':
             /* eslint no-fallthrough: "off" */
-            if (value === Infinity || isNaN(value)) {
+            if (Number.isFinite(value) === false) {
               value = null
             }
             // this case explicity falls through to the next one


Test patch:
diff --git a/test/basic.test.js b/test/basic.test.js
index 9b355d1..e00f3f8 100644
--- a/test/basic.test.js
+++ b/test/basic.test.js
@@ -542,6 +542,17 @@ test('correctly log Infinity', async (t) => {
   t.is(num, null)
 })
 
+test('correctly log -Infinity', async (t) => {
+  const stream = sink()
+  const instance = pino(stream)
+
+  const o = { num: -Infinity }
+  instance.info(o)
+
+  const { num } = await once(stream, 'data')
+  t.is(num, null)
+})
+
 test('correctly log NaN', async (t) => {
   const stream = sink()
   const instance = pino(stream)
Repository: pinojs/pino
Pull request #570 (2018-12-21 09:47:07)

 fix invalid JSON when `redact.remove` acts on chindings
This PR contains 2 commits.

The first holds the failing test case.
This second fixes the issue, passing the test.

The issue was that using `redact.remove` on a key that was
subsequently used in a child binding, was cause logging on
the child logger to produce JSON with `"key":undefined` in it.

While this doesn't crash the logger, the JSON is invalid and therefore
will break many receiving systems, at best causing logs to be missed.

In the test suite, the output is `JSON.parse`d which throws due to the
invalid output.


Patch:
diff --git a/lib/tools.js b/lib/tools.js
index c297f10..f2c75bb 100644
--- a/lib/tools.js
+++ b/lib/tools.js
@@ -152,7 +152,9 @@ function asChindings (instance, bindings) {
       value !== undefined
     if (valid === true) {
       value = serializers[key] ? serializers[key](value) : value
-      data += ',"' + key + '":' + (stringifiers[key] || stringify)(value)
+      value = (stringifiers[key] || stringify)(value)
+      if (value === undefined) continue
+      data += ',"' + key + '":' + value
     }
   }
   return data


Test patch:
diff --git a/test/redact.test.js b/test/redact.test.js
index 155056b..65ffaae 100644
--- a/test/redact.test.js
+++ b/test/redact.test.js
@@ -230,6 +230,15 @@ test('redact.remove – top level key', async ({ is }) => {
   is('key' in o, false)
 })
 
+test('redact.remove – top level key in child logger', async ({ is }) => {
+  const stream = sink()
+  const opts = { redact: { paths: ['key'], remove: true } }
+  const instance = pino(opts, stream).child({ key: { redact: 'me' } })
+  instance.info('test')
+  const o = await once(stream, 'data')
+  is('key' in o, false)
+})
+
 test('redact.paths preserves original object values after the log write', async ({ is }) => {
   const stream = sink()
   const instance = pino({ redact: ['req.headers.cookie'] }, stream)
Repository: pinojs/pino
Pull request #617 (2019-03-24 11:59:02)

Fix wildcard redacting with a custom censor function
Fixes https://github.com/pinojs/pino/issues/613

runk: @mcollina what's the process of getting this pr into master?

Patch:
diff --git a/lib/redaction.js b/lib/redaction.js
index 6c075e8..5e7fd92 100644
--- a/lib/redaction.js
+++ b/lib/redaction.js
@@ -72,8 +72,10 @@ function redaction (opts, serialize) {
   const result = {
     [redactFmtSym]: fastRedact({ paths, censor, serialize, strict })
   }
-  const serializedCensor = serialize(censor)
-  const topCensor = () => serializedCensor
+
+  const topCensor = (...args) =>
+    typeof censor === 'function' ? serialize(censor(...args)) : serialize(censor)
+
   return [...Object.keys(shape), ...Object.getOwnPropertySymbols(shape)].reduce((o, k) => {
     // top level key:
     if (shape[k] === null) o[k] = topCensor


Test patch:
diff --git a/test/redact.test.js b/test/redact.test.js
index 8856dcf..26db3ac 100644
--- a/test/redact.test.js
+++ b/test/redact.test.js
@@ -481,6 +481,32 @@ test('redact – supports top level wildcard', async ({ is }) => {
   is(req, '[Redacted]')
 })
 
+test('redact – supports top level wildcard with a censor function', async ({ is }) => {
+  const stream = sink()
+  const instance = pino({
+    redact: {
+      paths: ['*'],
+      censor: () => '[Redacted]'
+    }
+  }, stream)
+  instance.info({
+    req: {
+      id: 7915,
+      method: 'GET',
+      url: '/',
+      headers: {
+        host: 'localhost:3000',
+        connection: 'keep-alive',
+        cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;'
+      },
+      remoteAddress: '::ffff:127.0.0.1',
+      remotePort: 58022
+    }
+  })
+  const { req } = await once(stream, 'data')
+  is(req, '[Redacted]')
+})
+
 test('redact – supports top level wildcard and leading wildcard', async ({ is }) => {
   const stream = sink()
   const instance = pino({ redact: ['*', '*.req'] }, stream)
Repository: pinojs/pino
Pull request #700 (2019-08-22 19:00:31)

docs(api): fix binding example


Patch:
diff --git a/docs/api.md b/docs/api.md
index 400eb3a..a6b389e 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -508,7 +508,7 @@ const child = logger.child({ foo: 'bar' })
 console.log(child.bindings())
 // { foo: 'bar' }
 const anotherChild = child.child({ MIX: { IN: 'always' } })
-console.log(child.bindings())
+console.log(anotherChild.bindings())
 // { foo: 'bar', MIX: { IN: 'always' } }
 ```
 
diff --git a/lib/proto.js b/lib/proto.js
index 1ec71cf..8dca09c 100644
--- a/lib/proto.js
+++ b/lib/proto.js
@@ -72,12 +72,24 @@ function child (bindings) {
   const instance = Object.create(this)
   if (bindings.hasOwnProperty('serializers') === true) {
     instance[serializersSym] = Object.create(null)
+
     for (var k in serializers) {
       instance[serializersSym][k] = serializers[k]
     }
+    const parentSymbols = Object.getOwnPropertySymbols(serializers)
+    for (var i = 0; i < parentSymbols.length; i++) {
+      const ks = parentSymbols[i]
+      instance[serializersSym][ks] = serializers[ks]
+    }
+
     for (var bk in bindings.serializers) {
       instance[serializersSym][bk] = bindings.serializers[bk]
     }
+    const bindingsSymbols = Object.getOwnPropertySymbols(bindings.serializers)
+    for (var bi = 0; bi < bindingsSymbols.length; bi++) {
+      const bks = bindingsSymbols[bi]
+      instance[serializersSym][bks] = bindings.serializers[bks]
+    }
   } else instance[serializersSym] = serializers
   if (bindings.hasOwnProperty('customLevels') === true) {
     assertNoLevelCollisions(this.levels, bindings.customLevels)


Test patch:
diff --git a/test/serializers.test.js b/test/serializers.test.js
index c6a7079..70e8a6a 100644
--- a/test/serializers.test.js
+++ b/test/serializers.test.js
@@ -124,6 +124,32 @@ test('children inherit parent serializers', async ({ is }) => {
   is(o.test, 'parent')
 })
 
+test('children inherit parent Symbol serializers', async ({ is, isNot }) => {
+  const stream = sink()
+  const symbolSerializers = {
+    [Symbol.for('pino.*')]: parentSerializers.test
+  }
+  const parent = pino({ serializers: symbolSerializers }, stream)
+
+  is(parent[Symbol.for('pino.serializers')], symbolSerializers)
+
+  const child = parent.child({
+    serializers: {
+      [Symbol.for('a')]: a,
+      a
+    }
+  })
+
+  function a () {
+    return 'hello'
+  }
+
+  isNot(child[Symbol.for('pino.serializers')], symbolSerializers)
+  is(child[Symbol.for('pino.serializers')].a, a)
+  is(child[Symbol.for('pino.serializers')][Symbol.for('a')], a)
+  is(child[Symbol.for('pino.serializers')][Symbol.for('pino.*')], parentSerializers.test)
+})
+
 test('children serializers get called', async ({ is }) => {
   const stream = sink()
   const parent = pino({