Skip to content

Commit

Permalink
condense readme
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmarkclements committed Nov 30, 2016
1 parent 30a2607 commit f7ba84f
Showing 1 changed file with 36 additions and 15 deletions.
51 changes: 36 additions & 15 deletions README.md
Expand Up @@ -76,7 +76,8 @@ This produces:
```

<a name="benchmarks"></a>
## Benchmarks
<details>
<summary><big><strong>Benchmarks</strong><big></summary>

As far as we know, it is one of the fastest loggers in town:

Expand Down Expand Up @@ -137,9 +138,11 @@ In many cases, pino is over 6x faster than alternatives.
For a fair comparison, [LogLevel](http://npm.im/loglevel) was extended
to include a timestamp and [bole](http://npm.im/bole) had
`fastTime` mode switched on.
</details>

<a name="cli"></a>
## CLI
<details>
<summary><big><strong>CLI</strong><big></summary>

To use the command line tool, we can install `pino` globally:

Expand Down Expand Up @@ -190,9 +193,11 @@ Into this:
```sh
INFO [2016-03-09T15:27:09.339Z] (14139 on MacBook-Pro-3.home): hello world
```
</details>

<a name="api"></a>
## API
<details>
<summary><big><strong>API</strong><big></summary>

* <a href="#constructor"><code><b>pino()</b></code></a>
* <a href="#child"><code>logger.<b>child()</b></code></a>
Expand Down Expand Up @@ -596,9 +601,11 @@ var log = pino({
log.child({ widget: 'foo' }).info('hello')
log.child({ widget: 'bar' }).warn('hello 2')
```
</details>

<a name="extreme"></a>
## Extreme mode explained
<details>
<summary><big><strong>Extreme mode explained</strong><big></summary>

In essence, Extreme mode enables extreme performance by buffering log messages and writing them in larger chunks.

Expand All @@ -625,10 +632,11 @@ This has a couple of important caveats:
```

So in summary, only use extreme mode if you're doing an extreme amount of logging, and you're happy in some scenarios to lose the most recent logs.

</details>

<a name="express"></a>
## How to use Pino with Express
<details>
<summary><big><strong>How to use Pino with Express</strong><big></summary>

We've got you covered:

Expand All @@ -651,9 +659,11 @@ app.listen(3000)
```

See the [express-pino-logger readme](http://npm.im/express-pino-logger) for more info.
</details>

<a name="hapi"></a>
## How to use Pino with Hapi
<details>
<summary><big><strong>How to use Pino with Hapi</strong><big></summary>

We've got you covered:

Expand Down Expand Up @@ -697,9 +707,11 @@ server.register(require('hapi-pino'), (err) => {
```

See the [hapi-pino readme](http://npm.im/hapi-pino) for more info.
</details>

<a name="restify"></a>
## How to use Pino with Restify
<details>
<summary><big><strong>How to use Pino with Restify</strong><big></summary>

We've got you covered:

Expand All @@ -722,9 +734,11 @@ server.listen(3000)
```

See the [restify-pino-logger readme](http://npm.im/restify-pino-logger) for more info.
</details>

<a name="koa"></a>
## How to use Pino with koa
<details>
<summary><big><strong>How to use Pino with koa</strong><big></summary>

We've got you covered:

Expand Down Expand Up @@ -772,9 +786,11 @@ app.listen(3000)
```

See the [koa-pino-logger v2 readme](https://github.com/pinojs/koa-pino-logger/tree/v2) for more info.
</details>

<a name="debug"></a>
## How to use Pino with `debug`
<details>
<summary><big><strong>How to use Pino with debug</strong><big></summary>

The popular [`debug`](http://npm.im/debug) which
used in many modules accross the ecosystem.
Expand All @@ -797,10 +813,11 @@ $ DEBUG=* node -r pino-debug app.js
[`pino-debug`](http://github.com/pinojs/pino-debug) also offers fine grain control to map specific `debug`
namespaces to `pino` log levels. See [`pino-debug`](http://github.com/pinojs/pino-debug)
for more.

</details>

<a name="rotate"></a>
## How do I rotate log files?
<details>
<summary><big><strong>How do I rotate log files?</strong><big></summary>

Use a separate tool for log rotation.

Expand Down Expand Up @@ -828,10 +845,11 @@ We would rotate our log files with logrotate, by adding the following to `/etc/l
```



</details>

<a name="redact"></a>
## How do I redact sensitive information??
<details>
<summary><big><strong>How do I redact sensitive information??</strong><big></summary>

Use [pino-noir](http://npm.im/pino-noir), initialize with the key paths you wish to redact and pass the resulting instance in through the `serializers` option

Expand Down Expand Up @@ -863,9 +881,11 @@ var pino = require('pino')({
})
```
</details>
<a name="transports"></a>
## How to use Transports with Pino
<details>
<summary><big><strong>How to use Transports with Pino</strong><big></summary>
Create a separate process and pipe to it.
Expand Down Expand Up @@ -1058,6 +1078,7 @@ This equates to the same log output that Bunyan supplies.
One of Pino's performance tricks is to avoid building objects and stringifying
them, so we're building strings instead. This is why duplicate keys between
parents and children will end up in log output.
</details>
<a name="team"></a>
## The Team
Expand Down

0 comments on commit f7ba84f

Please sign in to comment.