sequelize-pretty-logger

1.0.3 • Public • Published

sequelize-pretty-logger

A Logger for the Sequelize ORM that reindents and syntax highlights the SQL

This relies on prismjs, prism-console and pretty-data modules to work it's magic.

It changes the default hard to read sequelize logging from this:

Sequelize Default Logging

To this:

Sequelize Pretty Logging

Usage

First install the package

npm install sequelize-pretty-logger

Then require it in and call it to initialize your log function.

Then feed it to sequelize's logging option.

const log = require('sequelize-pretty-logger`)();

const db = new Sequelize(process.env.DATABASE_URL, {
  logging: log
});

/sequelize-pretty-logger/

    Package Sidebar

    Install

    npm i sequelize-pretty-logger

    Weekly Downloads

    44

    Version

    1.0.3

    License

    ISC

    Unpacked Size

    38.7 kB

    Total Files

    8

    Last publish

    Collaborators

    • bartdorsey