Socket
Socket
Sign inDemoInstall

@dexare/logger

Package Overview
Dependencies
40
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @dexare/logger

A Dexare module that provides colorful logging


Version published
Weekly downloads
4
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

[1.0.2] - 2022-04-06

Fixed:

  • Fixed fetching random colors in the color pool

Readme

Source

A Dexare module for colorful logging with winston and chalk.

npm install @dexare/logger
const { DexareClient } = require('dexare');
const LoggerModule = require('@dexare/logger');

const config = {
  // All props in this config are optional, defaults are shown unless told otherwise
  logger: {
    // The level to log at, defaults to 'info' if process.env.NODE_ENV is 'production'
    level: 'debug',
    // The options object for util.inspect
    inspectOptions: {}
  }
}

const client = new DexareClient(config);
client.loadModules(LoggerModule);
// ...

// You can set the color of a module or level by defining it
// in `module.moduleColors` and `module.levelColors` respectively
const chalk = require('chalk');
const logger = client.modules.get('logger');
logger.moduleColors.info = chalk.black.bgCyan;

// Loggers are also created per module in `winston.loggers`.

Keywords

FAQs

Last updated on 06 Apr 2022

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc