Skip to content

Commit cea2715

Browse files
authored
Include pino-roll in Pino transports list​ (#2159)
* docs(transports): add pino-roll transport * order as alphabetical
1 parent 22df063 commit cea2715

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

docs/transports.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ PRs to this document are welcome for any new transports!
437437
+ [pino-loki](#pino-loki)
438438
+ [pino-opentelemetry-transport](#pino-opentelemetry-transport)
439439
+ [pino-pretty](#pino-pretty)
440+
+ [pino-roll](#pino-roll)
440441
+ [pino-seq-transport](#pino-seq-transport)
441442
+ [pino-sentry-transport](#pino-sentry-transport)
442443
+ [pino-slack-webhook](#pino-slack-webhook)
@@ -977,6 +978,30 @@ node yourapp.js | pino-papertrail --host bar.papertrailapp.com --port 12345 --ap
977978
978979
for full documentation of command line switches read [README](https://github.com/ovhemert/pino-papertrail#readme)
979980
981+
<a id="pino-roll"></a>
982+
### pino-roll
983+
984+
`pino-roll` is a Pino transport that automatically rolls your log files based on size or time frequency.
985+
986+
```js
987+
import { join } from 'path';
988+
import pino from 'pino';
989+
990+
const transport = pino.transport({
991+
target: 'pino-roll',
992+
options: { file: join('logs', 'log'), frequency: 'daily', mkdir: true }
993+
});
994+
995+
const logger = pino(transport);
996+
```
997+
998+
then you can use the logger as usual:
999+
1000+
```js
1001+
logger.info('Hello from pino-roll!');
1002+
```
1003+
For full documentation check the [README](https://github.com/mcollina/pino-roll?tab=readme-ov-file#pino-roll).
1004+
9801005
<a id="pino-pg"></a>
9811006
### pino-pg
9821007
[pino-pg](https://www.npmjs.com/package/pino-pg) stores logs into PostgreSQL.

0 commit comments

Comments
 (0)