Skip to content

Commit 15c9653

Browse files
punkishDABH
authored andcommitted
Updated transports.md (#1652)
added a SQLite3 transport for winston
1 parent daeefbf commit 15c9653

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/transports.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ there are additional transports written by
5151
* [Pusher](#pusher-transport)
5252
* [SimpleDB](#simpledb-transport)
5353
* [Slack](#slack-transport)
54+
* [SQLite3](#sqlite3-transport)
5455
* [SSE with KOA 2](#sse-transport-with-koa-2)
5556
* [Sumo Logic](#sumo-logic-transport)
5657
* [Winlog2 Transport](#winlog2-transport)
@@ -693,6 +694,22 @@ This transport takes the following options:
693694
* __unfurlMedia__ - Enables or disables [media unfurling.](https://api.slack.com/docs/message-link-unfurling) (Default: false)
694695
* __mrkdwn__ - Enables or disables [`mrkdwn` formatting](https://api.slack.com/messaging/composing/formatting#basics) within attachments or layout blocks (Default: false)
695696
697+
### SQLite3 Transport
698+
699+
The [winston-better-sqlite3][40] transport uses [better-sqlite3](https://github.com/JoshuaWise/better-sqlite3).
700+
701+
```js
702+
const wbs = require('winston-better-sqlite3');
703+
logger.add(new wbs({
704+
705+
// path to the sqlite3 database file on the disk
706+
db: '<name of sqlite3 database file>',
707+
708+
// A list of params to log
709+
params: ['level', 'message']
710+
});
711+
```
712+
696713
### Sumo Logic Transport
697714
[winston-sumologic-transport][32] is a transport for Sumo Logic
698715
@@ -864,3 +881,4 @@ That's why we say it's a logger for just about everything
864881
[37]: https://github.com/logdna/logdna-winston
865882
[38]: https://github.com/itsfadnis/datadog-winston
866883
[39]: https://github.com/TheAppleFreak/winston-slack-webhook-transport
884+
[40]: https://github.com/punkish/winston-better-sqlite3

0 commit comments

Comments
 (0)