• Stars
    star
    13,046
  • Rank 2,274 (Top 0.05 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 8 years ago
  • Updated about 1 month 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.

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,078
star
2

pino-http

๐ŸŒฒ high-speed HTTP logger for Node.js
JavaScript
470
star
3

sonic-boom

Extremely fast utf8 only stream implementation
JavaScript
240
star
4

express-pino-logger

๐ŸŒฒ an express middleware to log with pino
JavaScript
200
star
5

thread-stream

A streaming way to send data to a Node.js Worker Thread
JavaScript
199
star
6

pino-elasticsearch

๐ŸŒฒ load pino logs into Elasticsearch
JavaScript
166
star
7

pino-debug

๐ŸŒฒhigh performance debug logging ๐Ÿž
JavaScript
142
star
8

koa-pino-logger

๐ŸŒฒ pino logging koa middleware
JavaScript
92
star
9

pino-tee

๐ŸŒฒ tee pino logs into a file, with multiple levels
JavaScript
83
star
10

pino-multi-stream

๐ŸŒฒ A wrapper for Pino to provide Bunyan's multiple stream API
JavaScript
68
star
11

pino-noir

๐ŸŒฒ pino log redaction ๐Ÿท
JavaScript
64
star
12

pino-nextjs-example

JavaScript
59
star
13

pino-std-serializers

๐ŸŒฒ A list of standard object serializers for the Pino logger
JavaScript
56
star
14

pino-mongodb

๐ŸŒฒ Insert JSON from stdin into MongoDB
JavaScript
52
star
15

pino-caller

๐ŸŒฒ Include call site of pino log messages
JavaScript
50
star
16

pino-socket

๐ŸŒฒ A transport for sending pino logs to network sockets
JavaScript
41
star
17

pino-abstract-transport

Write Pino transports easily
JavaScript
28
star
18

pino-syslog

๐ŸŒฒ A transport for reformatting pino logs into standard syslog format
JavaScript
27
star
19

pino-arborsculpture

๐ŸŒฒ Change Pino log levels in a running process
JavaScript
22
star
20

pino-webpack-plugin

JavaScript
19
star
21

quick-format-unescaped

Solves a problem with util.format
JavaScript
17
star
22

restify-pino-logger

๐ŸŒฒ pino logging restify middleware
JavaScript
13
star
23

pino-gelf

๐ŸŒฒ Convert Pino logs to GELF format and send to Graylog
JavaScript
13
star
24

pino-inspector

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

pino-http-print

๐ŸŒฒ debug HTTP printer for pino
JavaScript
9
star
26

pino-filter

๐ŸŒฒ A transport to filter log lines in the manner of the `debug` module
JavaScript
9
star
27

real-require

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

pino-clf

๐ŸŒฒ Transport which transforms Pino HTTP logs into Common Log Format
JavaScript
5
star
29

getpino.io

The website for pino
CSS
5
star
30

pino-toke

๐ŸŒฒ Transform Pino HTTP log messages with a format string
JavaScript
5
star
31

pino-sapling

๐ŸŒฒ seed template for creating pino plugins/libraries/transports/utilities/modules
JavaScript
2
star
32

community

๐ŸŒฒ data on the members of the pino community
JavaScript
1
star
33

rill-pino-logger

๐ŸŒฒpino logging rill middleware
JavaScript
1
star