Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/runbots/pino-bravo
A beautiful minimalist formatter for pino.
https://github.com/runbots/pino-bravo
Last synced: 10 days ago
JSON representation
A beautiful minimalist formatter for pino.
- Host: GitHub
- URL: https://github.com/runbots/pino-bravo
- Owner: runbots
- License: mit
- Created: 2021-04-19T16:17:48.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-04-19T18:22:08.000Z (over 3 years ago)
- Last Synced: 2024-08-01T12:21:47.193Z (3 months ago)
- Language: TypeScript
- Size: 250 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# pino-bravo 👏
[![npm version][1]][2]
> A beautiful minimalist formatter for pino.
## Install
```sh
$ npm add pino pino-bravo
```## Usage
```ts
import pino from 'pino'
import pinoBravo from 'pino-bravo'const logger = pino({
prettyPrint: true,
prettifier: pinoBravo(/* options */)
})
```## [Options](src/types.ts)
| Option | Type | Default | Description |
| --------------- | ----------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ignoreKeys` | `string` | `'hostname,pid,time'` | A comma-separated list of log keys to ignore. |
| `modules` | `Record` | `{}` | A map of modules _(eg. browser, api, ...)_ and their associated colors _(eg. green, magenta, ...)_. If omitted, colors are picked automatically. |
| `modulePadding` | `number` | `undefined` | Modules padding for alignement. If omitted and `modules` is provided, it will infer the padding automatically. Otherwise it will not pad modules. |[1]: https://img.shields.io/npm/v/pino-bravo.svg?style=flat-square
[2]: https://npmjs.org/package/pino-bravo