stoolie
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Stoolie

GitHub package.json version Commitizen friendly code style: prettier GitHub

A person employed or acting as a decoy or informer, especially for the police.

This is a logger package that wraps winston with some easy utility methods.

Import

import stoolie from 'stoolie';

Using Stoolie

import stoolie, { LogLevel } from 'stoolie'; 
const logger = stoolie(LogLevel.INFO);

const entry = logger.withCategory('example').withType('README');
entry.info('Log a message');

Log Levels

  • Error
  • Warn
  • Info
  • Verbose
  • Debug
  • Silly

Testing

For testing a NullLog can be imported by name. This will allow you to pass in a logger without having to mock one out.

Package Sidebar

Install

npm i stoolie

Weekly Downloads

2

Version

1.0.3

License

MIT

Unpacked Size

24.3 kB

Total Files

16

Last publish

Collaborators

  • jteagueii