pino-pg
Version:
A Pino Transport for PostgreSQL databases.
29 lines (22 loc) • 1.02 kB
Markdown
# pino-pg
A Pino Transport for PostgreSQL databases.



## Requirement
This package requires at least Node.js version 10.
## Installation
```
npm install pino-pg
```
## Usage
Store logs to PostgreSQL.
```
node my-app.js | pino-pg --connectionUrl <your connection string> --table <your logs table> --column <your column table>
```
## Options
- The `connectionUrl` (or `u`) must contain the [postgres url string](https://node-postgres.com/features/connecting#Connection%20URI).
- The `table` (or `t`) must contain the table name. Default to `logs`.
- The `column` (or `c`) must contain the name of the JSONB column where you want to store log entries.
## License
Licensed under [MIT](https://github.com/Xstoudi/pino-pg/blob/master/LICENSE.md)