• Stars
    star
    14,160
  • Rank 2,138 (Top 0.05 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 9 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🌲 super fast, all natural json logger

banner

pino

npm version Build Status js-standard-style

Very low overhead Node.js logger.

Documentation

Install

Using NPM:

$ npm install pino

Using YARN:

$ yarn add pino

If you would like to install pino v6, refer to https://github.com/pinojs/pino/tree/v6.x.

Usage

const logger = require('pino')()

logger.info('hello world')

const child = logger.child({ a: 'property' })
child.info('hello child!')

This produces:

{"level":30,"time":1531171074631,"msg":"hello world","pid":657,"hostname":"Davids-MBP-3.fritz.box"}
{"level":30,"time":1531171082399,"msg":"hello child!","pid":657,"hostname":"Davids-MBP-3.fritz.box","a":"property"}

For using Pino with a web framework see:

Essentials

Development Formatting

The pino-pretty module can be used to format logs during development:

pretty demo

Transports & Log Processing

Due to Node's single-threaded event-loop, it's highly recommended that sending, alert triggering, reformatting, and all forms of log processing are conducted in a separate process or thread.

In Pino terminology, we call all log processors "transports" and recommend that the transports be run in a worker thread using our pino.transport API.

For more details see our Transports⇗ document.

Low overhead

Using minimum resources for logging is very important. Log messages tend to get added over time and this can lead to a throttling effect on applications – such as reduced requests per second.

In many cases, Pino is over 5x faster than alternatives.

See the Benchmarks document for comparisons.

Bundling support

Pino supports being bundled using tools like webpack or esbuild.

See Bundling document for more information.

The Team

Matteo Collina

https://github.com/mcollina

https://www.npmjs.com/~matteo.collina

https://twitter.com/matteocollina

David Mark Clements

https://github.com/davidmarkclements

https://www.npmjs.com/~davidmarkclements

https://twitter.com/davidmarkclem

James Sumners

https://github.com/jsumners

https://www.npmjs.com/~jsumners

https://twitter.com/jsumners79

Thomas Watson Steen

https://github.com/watson

https://www.npmjs.com/~watson

https://twitter.com/wa7son

Contributing

Pino is an OPEN Open Source Project. This means that:

Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.

See the CONTRIBUTING.md file for more details.

Acknowledgments

This project was kindly sponsored by nearForm. This project is kindly sponsored by Platformatic.

Logo and identity designed by Cosmic Fox Design: https://www.behance.net/cosmicfox.

License

Licensed under MIT.

More Repositories

1

pino-pretty

🌲Basic prettifier for Pino log lines
JavaScript
1,212
star
2

pino-http

🌲 high-speed HTTP logger for Node.js
JavaScript
535
star
3

sonic-boom

Extremely fast utf8 only stream implementation
JavaScript
266
star
4

thread-stream

A streaming way to send data to a Node.js Worker Thread
JavaScript
229
star
5

express-pino-logger

🌲 an express middleware to log with pino
JavaScript
199
star
6

pino-elasticsearch

🌲 load pino logs into Elasticsearch
JavaScript
176
star
7

pino-debug

🌲high performance debug logging 🐞
JavaScript
147
star
8

koa-pino-logger

🌲 pino logging koa middleware
JavaScript
91
star
9

pino-tee

🌲 tee pino logs into a file, with multiple levels
JavaScript
89
star
10

pino-multi-stream

🌲 A wrapper for Pino to provide Bunyan's multiple stream API
JavaScript
69
star
11

pino-nextjs-example

JavaScript
66
star
12

pino-noir

🌲 pino log redaction 🍷
JavaScript
66
star
13

pino-std-serializers

🌲 A list of standard object serializers for the Pino logger
JavaScript
58
star
14

pino-caller

🌲 Include call site of pino log messages
JavaScript
56
star
15

pino-mongodb

🌲 Insert JSON from stdin into MongoDB
JavaScript
54
star
16

pino-socket

🌲 A transport for sending pino logs to network sockets
JavaScript
42
star
17

pino-abstract-transport

Write Pino transports easily
JavaScript
34
star
18

pino-syslog

🌲 A transport for reformatting pino logs into standard syslog format
JavaScript
29
star
19

pino-arborsculpture

🌲 Change Pino log levels in a running process
JavaScript
24
star
20

pino-opentelemetry-transport

OpenTelemetry transport for Pino
JavaScript
21
star
21

pino-webpack-plugin

JavaScript
19
star
22

quick-format-unescaped

Solves a problem with util.format
JavaScript
17
star
23

pino-gelf

🌲 Convert Pino logs to GELF format and send to Graylog
JavaScript
13
star
24

restify-pino-logger

🌲 pino logging restify middleware
JavaScript
12
star
25

pino-inspector

Send your pino logs to the node inspector!
JavaScript
12
star
26

pino-http-print

🌲 debug HTTP printer for pino
JavaScript
9
star
27

pino-filter

🌲 A transport to filter log lines in the manner of the `debug` module
JavaScript
9
star
28

real-require

Keep require and import consistent after bundling or transpiling.
JavaScript
8
star
29

pino-clf

🌲 Transport which transforms Pino HTTP logs into Common Log Format
JavaScript
5
star
30

getpino.io

The website for pino
CSS
5
star
31

pino-toke

🌲 Transform Pino HTTP log messages with a format string
JavaScript
5
star
32

pino-test

JavaScript
2
star
33

pino-sapling

🌲 seed template for creating pino plugins/libraries/transports/utilities/modules
JavaScript
2
star
34

community

🌲 data on the members of the pino community
JavaScript
1
star
35

rill-pino-logger

🌲pino logging rill middleware
JavaScript
1
star