Skip to content

Commit

Permalink
rename needsMetadata symbol to pino.metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmarkclements committed Jul 10, 2018
1 parent e007bf8 commit 66d7789
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/symbols.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const onTerminatedSym = Symbol('pino.onTerminated')
const messageKeyStringSym = Symbol('pino.messageKeyString')

const wildcardGsym = Symbol.for('pino.*')
const needsMetadataGsym = Symbol.for('needsMetadata')
const needsMetadataGsym = Symbol.for('pino.metadata')

module.exports = {
setLevelSym,
Expand Down
8 changes: 4 additions & 4 deletions test/metadata.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const hostname = os.hostname()
test('metadata works', async ({ok, same, is}) => {
const now = Date.now()
const instance = pino({}, {
[Symbol.for('needsMetadata')]: true,
[Symbol.for('pino.metadata')]: true,
write (chunk) {
is(instance, this.lastLogger)
is(30, this.lastLevel)
Expand All @@ -36,7 +36,7 @@ test('metadata works', async ({ok, same, is}) => {

test('child loggers works', async ({ok, same, is}) => {
const instance = pino({}, {
[Symbol.for('needsMetadata')]: true,
[Symbol.for('pino.metadata')]: true,
write (chunk) {
is(child, this.lastLogger)
is(30, this.lastLevel)
Expand All @@ -63,7 +63,7 @@ test('child loggers works', async ({ok, same, is}) => {

test('without object', async ({ok, same, is}) => {
const instance = pino({}, {
[Symbol.for('needsMetadata')]: true,
[Symbol.for('pino.metadata')]: true,
write (chunk) {
is(instance, this.lastLogger)
is(30, this.lastLevel)
Expand All @@ -87,7 +87,7 @@ test('without object', async ({ok, same, is}) => {

test('without msg', async ({ok, same, is}) => {
const instance = pino({}, {
[Symbol.for('needsMetadata')]: true,
[Symbol.for('pino.metadata')]: true,
write (chunk) {
is(instance, this.lastLogger)
is(30, this.lastLevel)
Expand Down

0 comments on commit 66d7789

Please sign in to comment.