@phenomnomnominal/debug
TypeScript icon, indicating that this package has built-in type declarations

0.2.5 • Public • Published

@phenomnomnominal/debug

npm version

debug is a super lazy way to add debug logging!

Usage

import { debug } from '@phenomnomnominal/debug';

debug({ enabled: true });

Options

export type DebugOptions = {
  enabled: boolean; // Enable debug logging
  time: boolean; // Enable function execution time logging
  values: boolean; // Enable argument and return value logging
  logPath: string; // Disable stdout logging and print to file at this path
  header: string; // Header name for the initial debug log
  include: DebugIncludes; // RegExp to match node_modules paths that should be included in the logs
  ignore: DebugIgnores; // RegExp to match local paths that should be ignored from the logs
  logger: DebugLogger; // Custom logger implementation (Maybe you want to send it via HTTP 🤷‍♂️)
};

Readme

Keywords

none

Package Sidebar

Install

npm i @phenomnomnominal/debug

Weekly Downloads

63,784

Version

0.2.5

License

MIT

Unpacked Size

24.2 kB

Total Files

18

Last publish

Collaborators

  • phenomnomnominal