logger-sequelize
v1.7.0
Published
biblioteca para ter controle de logs em seu projeto
Downloads
8
Readme
Logger Sequelize
biblioteca para ter controle de logs em seu projeto
Installation
Use the package manager [npm] to install foobar.
npm install
Como criar tabela de log
const LogsModel = require("logger-sequelize/src/models/LogsModel");
await LogsModel.sync();
Criando logs
const {Logger} = require("logger-sequelize/src/app");
const {EnumLogs} = require("logger-sequelize/src/app");
await Logger.createLog("MusicsController.createMusic", "Música criado com sucesso!", EnumLogs.CREATED);
EnumLogs
const LogTypeEnum = {
INFO: 'INFO',
ERROR: 'ERROR',
WARNING: 'WARNING',
DEBUG: 'DEBUG',
CREATED: 'CREATED',
UPDATE: 'UPDATE',
DELETE: 'DELETE'
};