pino

🌲 super fast, all natural json logger

MIT License

Downloads
34.8M
Stars
13.2K
Committers
329

Bot releases are hidden (Show)

pino - v6.13.1

Published by jsumners about 3 years ago

  • Reduce verbosity of deprecation warnings #1092
pino - v7.0.0-rc.3

Published by mcollina about 3 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/pinojs/pino/compare/v7.0.0-rc.2...v7.0.0-rc.3

pino - v7.0.0-rc.2

Published by mcollina about 3 years ago

📚 PR:

  • fix: transport async function example (#1071)
  • refactor: update typings (#1073)
  • Make sure that the main thread stays alive to process stdout. (#1075)
pino - v7.0.0-rc.1

Published by mcollina about 3 years ago

v7.0.0-rc.1

  • First release of the v7 Release Candidate series.

All v7.0.0 release notes are included.

v7.0.0 release notes

New Features

pino.transport()

Create a a stream that routes logs to a worker thread that
wraps around a Pino Transport.

const pino = require('pino')
const transport = pino.transport({
  target: 'some-transport',
  options: { some: 'options for', the: 'transport' }
})
pino(transport)

Multiple transports may also be defined, and specific levels can be logged to each transport:

const pino = require('pino')
const transports = pino.transport({
  targets: [{
    level: 'info',
    target: 'some-transport',
    options: { some: 'options for', the: 'transport' }
  }, {
    level: 'trace',
    target: '#pino/file',
    options: { destination: '/path/to/store/logs' }
  }]
})
pino(transports)

For more on transports, how they work, and how to create them see the Transports documentation.

`pino.multistream()``

We have embedded a part of pino-multi-stream into pino itself, so you would be able to write to multiple streams from the same pino instance:

var fs = require('fs')
var pino = require('pino')
var streams = [
  {stream: fs.createWriteStream('/tmp/info.stream.out')},
  {level: 'debug', stream: fs.createWriteStream('/tmp/debug.stream.out')},
  {level: 'fatal', stream: fs.createWriteStream('/tmp/fatal.stream.out')}
]

var log = pino({
  level: 'debug' // this MUST be set at the lowest level of all the destinations
}, pino.multistream(streams))

log.debug('this will be written to /tmp/debug.stream.out')
log.info('this will be written to /tmp/debug.stream.out and /tmp/info.stream.out')
log.fatal('this will be written to /tmp/debug.stream.out, /tmp/info.stream.out and /tmp/fatal.stream.out')

This differs from pino.transport() as all the streams will be executed within the main thread, i.e. the one that created the pino instance.

Added TypeScript types

Types have been added to the the project, so you can now use pino with TypeScript without downloading any additional types: you should remove @types/pino from your project. The following typescript example would now work correctly:

import { pino } from "pino";

const log = pino();

log.info("hello world");
log.error("this is at error level");
log.info("the answer is %d", 42);
log.info({ obj: 42 }, "hello world");
log.info({ obj: 42, b: 2 }, "hello world");
log. info({ obj: { aa: "bbb" } }, "another");

Breaking Changes

Dropped Node.js v10.x

Node.js v10 went out of LTS/Maintenance in April 2021.
We are dropping support.

Apply err serializer everywhere

We will start applying the err serializer also to Error objects passed in as first argument to log methods, e.g. log.info(new Error('kaboom')) will pass through the serializer.

Pull Requests

  • removed all outstanding deprecations (#1057)
  • pino.transport() (#1003)
  • Add pino.multistream (#1004)
  • Add TS types (#913)
  • Apply err serializer everywhere. (#896)
  • Make the nestedKey only take effect in the serialized object and fix error detection and serialization #885
pino - v6.13.0

Published by mcollina about 3 years ago

📚 PR:

  • refactor: deprecate child bindings apply options (#1067)
  • docs: fix an incorrect links in docs/lts.md (#1069)
  • build(deps): bump actions/setup-node from 2.1.5 to 2.2.0 (#1047)
pino - v6.12.0

Published by mcollina over 3 years ago

📚 PR:

  • Update ci.yml
  • [Docs] document that .child() call triggers level-change event. (#1014)
  • ci: add nodejs v16 to test matrix (#1018)
  • build(deps): bump actions/checkout from 2 to 2.3.4 (#1024)
  • ci: remove redundant conditional; ignore doc updates (#1026)
  • build(deps-dev): bump eslint-plugin-promise from 4.3.1 to 5.1.0 (#1029)
  • build(deps): bump fastify/github-action-merge-dependabot (#1030)
  • build(deps): bump actions/upload-artifact from 2.2.3 to 2.2.4 (#1044)
  • build(deps): bump fastify/github-action-merge-dependabot (#1033)
  • Better describe base options in docs (#1046)
  • build(deps): bump coverallsapp/github-action from 1.1.2 to 1.1.3 (#1055)
  • Handle complex object cases (#1061)
  • Improved LTS documentation (#1060)
  • feat: child redact option (#1059)
pino - v6.11.3

Published by mcollina over 3 years ago

📚 PR:

  • quick-format-unescaped@^4.0.3 is fixed (#985)
  • docs: fix reference to pino-websocket (#989)
  • Update to tap v15 (#999)
  • docs: fix Event: levelChange example (#1000)
  • Bump actions/upload-artifact from v2.2.2 to v2.2.3 (#1002)
  • Bump fastify/github-action-merge-dependabot from v1.2.1 to v2.0.0 (#986)
  • docs: use brackets for hyphenated properties (#1005)
  • doc: Add description statement to benchmark results (#1008)
  • fix: prettyPrint options - misleading error message with wrong option value (#1012)
pino - v6.11.2

Published by jsumners over 3 years ago

  • Temporary fix for #983 #984
pino - v6.11.1

Published by mcollina over 3 years ago

📚 PR:

  • Typo
  • Merge pull request #957 from mendeljacks/patch-1
  • clarify options.timestamp usage (#953)
  • docs/transport: add pino-kafka (#954)
  • Make the build pass again (#962)
pino - v6.11.0

Published by jsumners almost 4 years ago

  • Update errors documentation #948 #949
  • Update mixin documentation #951 #952
  • Replace var with let and const #947 #950
pino - v6.10.0

Published by mcollina almost 4 years ago

📚 PR:

  • Bump up pino-std-serializers dependency (#946)
pino - v6.9.0

Published by mcollina almost 4 years ago

📚 PR:

  • docs: upgrade all available http links to https
  • Merge pull request #941 from xom9ikk/upgrate-to-https
  • Add pino-dev as an ecosystem package in the docs
  • Merge pull request #943 from dnjstrom/docs/pino-dev
  • docs: Fix a tiny typo (#939)
  • Fix typos (#940)
  • access log level in hook #909 (#944)
pino - v6.8.0

Published by mcollina almost 4 years ago

📚 PR:

  • #915 Adding path case sensitivity to docs (#916)
  • Fix link on pretty document (#927)
  • pass merging object to mixins (#926)
  • address destructuring mergeObject in docs (#928)
  • doc: fix wrong link to logger.level (#929)
  • docs/transport: add pino-gelf (#934)
  • Support Babel/Typescript "faux modules" as well as native ESM (#936)
pino - v6.7.0

Published by davidmarkclements about 4 years ago

  • integrate fast-redact v3 #917
pino - v6.6.1

Published by jsumners about 4 years ago

  • Fix time quoting in prettification #905 #907
pino - v6.6.0

Published by mcollina about 4 years ago

📚 PR:

  • Add timestamp option to browser env, closes #903 (#904)
pino - v6.5.1

Published by mcollina about 4 years ago

📚 PR:

  • Clear cached parsed chindings when they're changed with .setBindings (fixes #890) (#893)
  • Update deps (#894)
pino - v6.5.0

Published by jsumners about 4 years ago

  • Revert originalMsg feature #882
pino - v6.4.1

Published by jsumners about 4 years ago

  • Remove unused communication channels from README #880
pino - v6.4.0

Published by mcollina over 4 years ago

📚 PR:

  • Issue 855 clarify mixin docks (#857)
  • Docs Map log level to Stackdriver Severity (#726) (#865)
  • order levels, trace maps to DEBUG severity (#868)
  • Wrap prototype in factory and guard against loss of scope. (#875)
  • Avoid data loss with conflictig 'msg' values. (#876)
Package Rankings
Top 0.41% on Npmjs.org
Top 6.74% on Proxy.golang.org