abso-winston-mysql-transport

1.0.1 • Public • Published

abso-winston-mysql-transport

Winston transport implementation for using with mysql databases.

Dependencies

Usage

const winston = require('winston');
const MySQLTransport = require('abso-winston-mysql-transport').WinstonMySQLTransport;
const logger = new winston.Logger({
    transports: [
        new MySQLTransport(
            {... options_here ...}
        )
    ]
});

Options structure

{
    level?: string (='info'),
    tableName?: string (='winston_log'),
    label?: string (=''),
    connection: {
        host: string,
        port: integer,
        database: string,
        username: string,
        password: string,
        charset?: string (='utf8'),
        collation?: string (='utf8_polish_ci')
    }
}

Package Sidebar

Install

npm i abso-winston-mysql-transport

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

19.9 kB

Total Files

11

Last publish

Collaborators

  • absoadmin