A Bunyan stream that writes logs to SQL databases (PostgreSQL, MySQL, MSSQL, MariaDB, SQLite3, Oracle). Version 0.0.4 (latest) is stable but no longer updated. It wraps Knex.js for SQL queries, so tables are created manually. Unlike alternative per-database packages, this single module supports multiple dialects. Requires separate database client packages (e.g., pg, mysql).
npm install bunyan-sql-streamNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a Bunyan logger that writes to a PostgreSQL database using bunyan-sql-stream. Requires a pre-existing 'logs' table with specific columns.
Switch to a dedicated stream package for your database.
Use 'streams' array with { stream: bunyanSqlStream(...), type: 'raw' }.Run the CREATE TABLE statement from the README manually.
Lock knex to version 0.x or pin bunyan-sql-stream to 0.0.4.
Test on Oracle before using in production.
Run 'npm install knex' alongside bunyan-sql-stream.
Execute the CREATE TABLE statement from the README before logging.
Use 'const bunyanSqlStream = require('bunyan-sql-stream');' (not .default).Ensure client and connection fields are properly set in the options object.