New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

api.logger2

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

api.logger2

logger for api

unpublished
latest
Source
npmnpm
Version
0.2.3
Version published
Maintainers
1
Created
Source

api.logger

API Logger in an module to manage log of dethers api

EXAMPLE

const Logger = require('api.logger');

const logger = Logger();
setTimeout(() => {
  logger.debug('debug');
}, 500);

OPTION

const defaultOption = {
  enableConsole: true,
  console: { format: winston.format.simple(), level: 'debug' },
  enableFile: true,
  loggerFile: {
    log: { basePath: './logs/', maxDays: 31, level: 'debug' },
    error: { basePath: './logs/', maxDays: 31 * 6, level: 'error' },
  },
  enableMongo: false,
  mongodb: {
    level: 'error',
    db: null,
    collection: 'logError',
    name: 'logError', //Transport instance identifier. Useful if you need to create multiple MongoDB transports.
    expireAfterSeconds: 1.577e7, // 6 month, Seconds before the entry is removed. Works only if capped is not set.
  },
  enableEmail: false,
  email: {
    to: null,
    from: null,
    host: null,
    username: null,
    password: null,
    ssl: true,
    level: 'error',
    filter: info => {
      const meta = JSON.parse(info.meta);
      return !meta.disableEmail;
    },
  },
};

Keywords

logger

FAQs

Package last updated on 03 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts