1.0.1 • Published 5 years ago

abso-winston-mysql-transport v1.0.1

Weekly downloads
7
License
ISC
Repository
github
Last release
5 years ago

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')
    }
}