Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pino

Package Overview
Dependencies
Maintainers
4
Versions
311
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pino - npm Package Compare versions

Comparing version 8.19.0 to 8.20.0

test/browser-early-console-freeze.test.js

11

browser.js

@@ -266,5 +266,10 @@ 'use strict'

// override the current log functions with either `noop` or the base log function
self[level] = levelToValue(self.level, rootLogger) > levelToValue(level, rootLogger)
? noop
: rootLogger[baseLogFunctionSymbol][level]
Object.defineProperty(self, level, {
value: (levelToValue(self.level, rootLogger) > levelToValue(level, rootLogger)
? noop
: rootLogger[baseLogFunctionSymbol][level]),
writable: true,
enumerable: true,
configurable: true
})

@@ -271,0 +276,0 @@ if (!opts.transmit && self[level] === noop) {

@@ -16,3 +16,4 @@ # API

* [logger.child()](#child)
* [logger.bindings()](#bindings)
* [logger.bindings()](#logger-bindings)
* [logger.setBindings()](#logger-set-bindings)
* [logger.flush()](#flush)

@@ -892,2 +893,3 @@ * [logger.level](#logger-level)

<a id="logger-child-bindings"></a>
#### `bindings` (Object)

@@ -983,3 +985,3 @@

<a id="bindings"></a>
<a id="logger-bindings"></a>
### `logger.bindings()`

@@ -997,2 +999,12 @@

<a id="logger-set-bindings"></a>
### `logger.setBindings(bindings)`
Adds to the bindings of this logger instance.
**Note:** Does not overwrite bindings. Can potentially result in duplicate keys in
log lines.
* See [`bindings` parameter in `logger.child`](#logger-child-bindings)
<a id="flush"></a>

@@ -999,0 +1011,0 @@ ### `logger.flush([cb])`

@@ -74,3 +74,3 @@ # Child loggers

Notice how there are two keys named `a` in the JSON output. The sub-childs properties
Notice how there are two keys named `a` in the JSON output. The sub-child's properties
appear after the parent child properties.

@@ -87,3 +87,3 @@

Ultimately the conflict is resolved by taking the last value, which aligns with Bunyans child logging
Ultimately the conflict is resolved by taking the last value, which aligns with Bunyan's child logging
behavior.

@@ -90,0 +90,0 @@

@@ -61,3 +61,6 @@ # Pino Ecosystem

the logger for the [Rill framework](https://rill.site/).
+ [`pino-test`](https://github.com/pinojs/pino-test): a set of utilities for
verifying logs generated by the Pino logger.
<a id="community"></a>

@@ -64,0 +67,0 @@ ## Community

@@ -14,4 +14,6 @@ # Help

* [Mapping Pino Log Levels to Google Cloud Logging (Stackdriver) Severity Levels](#stackdriver)
* [Using Grafana Loki to evaluate pino logs in a kubernetes cluster](#grafana-loki)
* [Avoid Message Conflict](#avoid-message-conflict)
* [Best performance for logging to `stdout`](#best-performance-for-stdout)
* [Testing](#testing)

@@ -98,3 +100,3 @@ <a id="rotate"></a>

## Log Filtering
The Pino philosophy advocates common, pre-existing, system utilities.
The Pino philosophy advocates common, preexisting, system utilities.

@@ -158,3 +160,3 @@ Some recommendations in line with this philosophy are:

## Log levels as labels instead of numbers
Pino log lines are meant to be parseable. Thus, Pino's default mode of operation
Pino log lines are meant to be parsable. Thus, Pino's default mode of operation
is to print the level value instead of the string name.

@@ -250,3 +252,2 @@ However, you can use the [`formatters`](/docs/api.md#formatters-object) option

formatters: {
messageKey: 'message',
level(label, number) {

@@ -266,2 +267,11 @@ return {

<a id="grafana-loki"></a>
## Using Grafana Loki to evaluate pino logs in a kubernetes cluster
To get pino logs into Grafana Loki there are two options:
1. **Push:** Use [pino-loki](https://github.com/Julien-R44/pino-loki) to send logs directly to Loki.
1. **Pull:** Configure Grafana Promtail to read and properly parse the logs before sending them to Loki.
Similar to Google Cloud logging, this involves remapping the log levels. See this [article](https://medium.com/@janpaepke/structured-logging-in-the-grafana-monitoring-stack-8aff0a5af2f5) for details.
<a id="avoid-message-conflict"></a>

@@ -310,1 +320,6 @@ ## Avoid Message Conflict

if you have broader logging requirements.
<a id="testing"></a>
## Testing
See [`pino-test`](https://github.com/pinojs/pino-test).

@@ -103,3 +103,3 @@ # Redaction

The syntax for paths supplied to the `redact` option conform to the syntax in path lookups
in standard EcmaScript, with two additions:
in standard ECMAScript, with two additions:

@@ -106,0 +106,0 @@ * paths may start with bracket notation

@@ -329,3 +329,3 @@ # Transports

The `options.destination` property may also be a number to represent a filedescriptor. Typically this would be `1` to write to STDOUT or `2` to write to STDERR. If `options.destination` is not set, it defaults to `1` which means logs will be written to STDOUT. If `options.destination` is a string integer, e.g. `'1'`, it will be coerced to a number and used as a file descriptor. If this is not desired, provide a full path, e.g. `/tmp/1`.
The `options.destination` property may also be a number to represent a file descriptor. Typically this would be `1` to write to STDOUT or `2` to write to STDERR. If `options.destination` is not set, it defaults to `1` which means logs will be written to STDOUT. If `options.destination` is a string integer, e.g. `'1'`, it will be coerced to a number and used as a file descriptor. If this is not desired, provide a full path, e.g. `/tmp/1`.

@@ -426,2 +426,3 @@ The difference between using the `pino/file` transport builtin and using `pino.destination` is that `pino.destination` runs in the main thread, whereas `pino/file` sets up `pino.destination` in a worker thread.

+ [@axiomhq/pino](#@axiomhq/pino)
+ [pino-discord-webhook](#pino-discord-webhook)

@@ -471,3 +472,3 @@ ### Legacy

For full documentation of command line switches read [readme](https://github.com/ovhemert/pino-applicationinsights#readme)
For full documentation of command line switches read [README](https://github.com/ovhemert/pino-applicationinsights#readme)

@@ -484,3 +485,3 @@ <a id="pino-azuretable"></a>

For full documentation of command line switches read [readme](https://github.com/ovhemert/pino-azuretable#readme)
For full documentation of command line switches read [README](https://github.com/ovhemert/pino-azuretable#readme)

@@ -521,3 +522,3 @@ <a id="pino-cloudwatch"></a>

For full documentation of command line switches read [readme](https://github.com/ovhemert/pino-datadog#readme)
For full documentation of command line switches read [README](https://github.com/ovhemert/pino-datadog#readme)

@@ -538,5 +539,5 @@ <a id="pino-elasticsearch"></a>

To connect to an external elasticsearch instance (recommended for production):
To connect to an external Elasticsearch instance (recommended for production):
* Check that `network.host` is defined in the `elasticsearch.yml` configuration file. See [elasticsearch Network Settings documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#common-network-settings) for more details.
* Check that `network.host` is defined in the `elasticsearch.yml` configuration file. See [Elasticsearch Network Settings documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#common-network-settings) for more details.
* Launch:

@@ -603,3 +604,3 @@

Tags and other metadata can be included using the available command line options. See the [pino-logdna readme](https://github.com/logdna/pino-logdna#options) for a full list.
Tags and other metadata can be included using the available command line options. See the [pino-logdna README](https://github.com/logdna/pino-logdna#options) for a full list.

@@ -641,3 +642,3 @@ <a id="pino-logflare"></a>

For full documentation of command line switches and configuration see [the `pino-mq` readme](https://github.com/itavy/pino-mq#readme)
For full documentation of command line switches and configuration see [the `pino-mq` README](https://github.com/itavy/pino-mq#readme)

@@ -664,3 +665,3 @@ <a id="pino-loki"></a>

For full documentation and configuration, see the [readme](https://github.com/Julien-R44/pino-loki).
For full documentation and configuration, see the [README](https://github.com/Julien-R44/pino-loki).

@@ -679,3 +680,3 @@ <a id="pino-papertrail"></a>

for full documentation of command line switches read [readme](https://github.com/ovhemert/pino-papertrail#readme)
for full documentation of command line switches read [README](https://github.com/ovhemert/pino-papertrail#readme)

@@ -685,3 +686,3 @@ <a id="pino-pg"></a>

[pino-pg](https://www.npmjs.com/package/pino-pg) stores logs into PostgreSQL.
Full documentation in the [readme](https://github.com/Xstoudi/pino-pg).
Full documentation in the [README](https://github.com/Xstoudi/pino-pg).

@@ -700,3 +701,3 @@ <a id="pino-mysql"></a>

For full documentation and command line switches read the [readme][pino-mysql].
For full documentation and command line switches read the [README][pino-mysql].

@@ -729,3 +730,3 @@ [pino-mysql]: https://www.npmjs.com/package/pino-mysql

For full documentation of command line switches see the [pino-sentry readme](https://github.com/aandrewww/pino-sentry/blob/master/README.md).
For full documentation of command line switches see the [pino-sentry README](https://github.com/aandrewww/pino-sentry/blob/master/README.md).

@@ -912,3 +913,3 @@ [pino-sentry]: https://www.npmjs.com/package/pino-sentry

For full documentation of command line switches read [readme](https://github.com/ovhemert/pino-stackdriver#readme)
For full documentation of command line switches read [README](https://github.com/ovhemert/pino-stackdriver#readme)

@@ -1045,3 +1046,20 @@ <a id="pino-syslog"></a>

<a id="pino-discord-webhook"></a>
### pino-discord-webhook
[pino-discord-webhook](https://github.com/fabulousgk/pino-discord-webhook) is a Pino v7+ compatible transport to forward log events to a [Discord](http://discord.com) webhook from a dedicated worker.
```js
import pino from 'pino'
const logger = pino({
transport: {
target: 'pino-discord-webhook',
options: {
webhookUrl: 'https://discord.com/api/webhooks/xxxx/xxxx',
}
}
})
```
<a id="communication-between-pino-and-transport"></a>

@@ -1054,3 +1072,2 @@ ## Communication between Pino and Transports

### Error messages

@@ -1057,0 +1074,0 @@ How are error messages propagated from a transport worker to Pino?

@@ -67,3 +67,3 @@ # Web Frameworks

See the [pino-http readme](https://npm.im/pino-http) for more info.
See the [pino-http README](https://npm.im/pino-http) for more info.

@@ -80,4 +80,2 @@ <a id="hapi"></a>

require('make-promises-safe')
const Hapi = require('@hapi/hapi')

@@ -127,3 +125,3 @@ const Pino = require('hapi-pino');

See the [hapi-pino readme](https://npm.im/hapi-pino) for more info.
See the [hapi-pino README](https://npm.im/hapi-pino) for more info.

@@ -151,3 +149,3 @@ <a id="restify"></a>

See the [restify-pino-logger readme](https://npm.im/restify-pino-logger) for more info.
See the [restify-pino-logger README](https://npm.im/restify-pino-logger) for more info.

@@ -176,3 +174,3 @@ <a id="koa"></a>

See the [koa-pino-logger readme](https://github.com/pinojs/koa-pino-logger) for more info.
See the [koa-pino-logger README](https://github.com/pinojs/koa-pino-logger) for more info.

@@ -200,3 +198,3 @@ <a id="http"></a>

See the [pino-http readme](https://npm.im/pino-http) for more info.
See the [pino-http README](https://npm.im/pino-http) for more info.

@@ -240,3 +238,3 @@

See the [nestjs-pino readme](https://npm.im/nestjs-pino) for more info.
See the [nestjs-pino README](https://npm.im/nestjs-pino) for more info.

@@ -268,2 +266,2 @@

See the [pino-http readme](https://npm.im/pino-http) for more info.
See the [pino-http README](https://npm.im/pino-http) for more info.

@@ -22,1 +22,6 @@ * [Readme](/)

* [Pino with `debug`](/docs/help.md#debug)
* [Unicode and Windows terminal](/docs/help.md#windows)
* [Mapping Pino Log Levels to Google Cloud Logging (Stackdriver) Severity Levels](/docs/help.md#stackdriver)
* [Avoid Message Conflict](/docs/help.md#avoid-message-conflict)
* [Best performance for logging to `stdout`](/docs/help.md#best-performance-for-stdout)
* [Testing](/docs/help.md#testing)

@@ -125,3 +125,3 @@ 'use strict'

* @param {SORTING_ORDER} direction comparison direction "ASC" or "DESC"
* @param {number} current current log level number representatiton
* @param {number} current current log level number representation
* @param {number} expected threshold value to compare with

@@ -128,0 +128,0 @@ * @returns {boolean}

'use strict'
module.exports = { version: '8.19.0' }
module.exports = { version: '8.20.0' }
{
"name": "pino",
"version": "8.19.0",
"version": "8.20.0",
"description": "super fast, all natural json logger",

@@ -107,3 +107,3 @@ "main": "pino.js",

"on-exit-leak-free": "^2.1.0",
"pino-abstract-transport": "v1.1.0",
"pino-abstract-transport": "^1.1.0",
"pino-std-serializers": "^6.0.0",

@@ -110,0 +110,0 @@ "process-warning": "^3.0.0",

@@ -359,3 +359,3 @@ // Project: https://github.com/pinojs/pino.git, http://getpino.io

* Use this option to define custom comparison of log levels.
* Usefull to compare custom log levels or non-standard level values.
* Useful to compare custom log levels or non-standard level values.
* Default: "ASC"

@@ -362,0 +362,0 @@ */

@@ -9,3 +9,3 @@ 'use strict'

write (chunk, enc, cb) {
// Bypass console.log() to avoid flakyness
// Bypass console.log() to avoid flakiness
fs.writeSync(1, chunk.toString())

@@ -12,0 +12,0 @@ cb()

@@ -314,3 +314,3 @@ import { IncomingMessage, ServerResponse } from "http";

const clog3 = log3.child({}, { customLevels: { childLevel: 120 } })
// child inherit parant
// child inherit parent
clog3.myLevel('')

@@ -322,3 +322,3 @@ // child itself

cclog3.myLevel('')
// child inherit parant
// child inherit parent
cclog3.childLevel('')

@@ -325,0 +325,0 @@ // child itself

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc