Skip to content

aldis-ameriks/pino-postgres

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to pino-postgres 👋

Version

Pino transport for Postgres

Install

$ npm install pino-postgres
# or
$ yarn add pino-postgres

Usage

Usage: pino-postgres [options]

Options:
  -V, --version               output the version number
  --connection <connection>   postgres connection string
  --table <name>              table name (default: "logs")
  --schema <name>             schema name (default: "public")
  --column <name>             column name (default: "content")
  --flush-interval <number>   interval at which logs are flushed in ms (default: 5000)
  --buffer-size <number>      max number of log entries in buffer (default: 1000)
  --max-connections <number>  max number of connections (default: 3)
  --ssl                       use ssl (default: false)
  --debug                     debug postgres client (default: false)
  --pass-through              pass logs through (default: false)
  --wrap-non-json             wrap non-json messages as json (default: false)
  -h, --help                  display help for command
node app.js | pino-postgres --connection postgres://username:password@localhost:5432/database

pino-postgres does not create the necessary database table, make sure the table with jsonb column exists.

Contributing

Contributions, issues and feature requests are welcome!

License

Copyright © 2020 Aldis Ameriks.
This project is MIT licensed.