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

@debugr/console

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@debugr/console

Console log handler for Debugr

latest
npmnpm
Version
3.0.0-rc.10
Version published
Weekly downloads
38
18.75%
Maintainers
2
Weekly downloads
 
Created
Source

Console Handler for Debugr

This Handler adds logging to console.

Installation

npm install --save @debugr/console

Usage

import { Logger, LogLevel } from '@debugr/core';
import { ConsoleHandler } from '@debugr/console';

const globalContext = {
  applicationName: 'example',
};

const logger = new Logger(globalContext, [
  new ConsoleHandler(),
]);

logger.info('Application started.');

// will output something like:
// [ii] Application started.

Options

The ConsoleHandler constructor accepts an optional options object with the following keys as the first argument:

OptionTypeDefaultDescription
thresholdLogLevelLogLevel.INFOThe lowest level of entries which will be logged. Any entries below this level will be ignored.
levelMapRecord<number, string>A map of custom log levels to their string representation.
colorMapRecord<number, (v: string) => string>A map of custom log levels to callbacks applying ANSI colors. See ansi-colors.
timestampboolean, (ts: ImmutableDate) => stringfalseWhether to prefix entries with their timestamp. Pass a callback if you need custom formatting.

FAQs

Package last updated on 20 Aug 2023

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