1.0.1 • Published 6 years ago
abso-winston-mysql-transport v1.0.1
abso-winston-mysql-transport
Winston transport implementation for using with mysql databases.
Dependencies
- winston (^3.5.1) [find it here]
- winston-transport dependency for winston
- sequelize (^5.3.3) [find it here]
- mysql2 (^1.6.5) [find it here]
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')
}
}