Postgres transport for Winston
Install
npm install --save winston pg winston-pg
Both pg
and winsotn
are peer dependencies.
Test and example
See index.spec.js for test spec.
Example usage:
const pgLogger = name: 'test-logger' level: 'debug' connString: 'postgres://ubuntu@localhost:5432/circle_test' tableName: 'winston_logs';logger = transports: color: true timestamp: true pgLogger ;pgLogger; // or create the table in database by yourself