An open API service indexing awesome lists of open source software.

https://github.com/franky47/douze-prettify-logs

NDJSON prettifier for Pino logs generated by Douze
https://github.com/franky47/douze-prettify-logs

douze logs ndjson prettify

Last synced: 26 days ago
JSON representation

NDJSON prettifier for Pino logs generated by Douze

Awesome Lists containing this project

README

        

# πŸ“œβœ¨ `douze-prettify-logs`

## ⚰️ End-of-life disclaimer

This project was a test and will disappear soon. You may fork it or do whatever you want with it.

---

[![MIT License](https://img.shields.io/github/license/franky47/douze-prettify-logs.svg?color=blue)](https://github.com/franky47/douze-prettify-logs/blob/master/LICENSE)
[![Travis CI Build](https://img.shields.io/travis/com/franky47/douze-prettify-logs.svg)](https://travis-ci.com/franky47/douze-prettify-logs)
[![Average issue resolution time](https://isitmaintained.com/badge/resolution/franky47/douze-prettify-logs.svg)](https://isitmaintained.com/project/franky47/douze-prettify-logs)
[![Number of open issues](https://isitmaintained.com/badge/open/franky47/douze-prettify-logs.svg)](https://isitmaintained.com/project/franky47/douze-prettify-logs)

NDJSON prettifier for [Pino](https://getpino.io) logs generated by [Douze](https://github.com/franky47/douze)

## Features

- πŸ•ΈοΈ HTTP logger
- 🌐 Timezone-aware display of times
- 🏷️ Categories
- 🚦 Filtering (level, categories)

## Installation

```shell
$ yarn add -D douze-prettify-logs
# or
$ npm i -D douze-prettify-logs
```

## Usage

```shell
$ ts-node your-douze-app.ts | douze-prettify-logs
```

## CLI Options

```
$ douze-prettify-logs --help
Usage: douze-prettify-logs [options]

NDJSON prettifier for Pino logs generated by Douze.

Options:
-V, --version output the version number
-l, --level Log level (default: "info")
-c, --category Filter by category
-u, --utc Show dates as UTC rather than localized
-i, --inline Display extra data inline
-q, --quiet Don't display extra data at all
-n, --no-color Disable coloring of the output
-h, --help output usage information

Examples:

β€’ Category filter:
- Only show API logs: $ douze-prettify-logs -c api
- Only show HTTP & API logs: $ douze-prettify-logs -c http,api
- Ignore the DB category: $ douze-prettify-logs -c !db
```