1.7.0 • Published 3 years ago

superlogs v1.7.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

🦄 SuperLogs

Super simple logs.

Super logs uses the builder pattern to not just build logs but also build a relationship tree between runtime code

Install

yarn

yarn add -D superlogs

or for npm

npm i --dev superlogs

Require

For CommonJs

const superlogs = require('superlogs');
const logger = superlogs.logger;

For Babel

import {logger} from 'superlogs';

For Typescript

import {logger} from 'superlogs';

Usage

An example

  logger('PlaybookService')
    .addMethod('list', 'list a playbook')
        .addStep('validate', 'validate the DTO')
          .addData('user', {username: 'mitchell'})
          .addMongo('playbooks', {id: 100, name: 'airbnb'})
        .addStep('if user', 'if no user exists', StepCat.ifBlock)
          .addError('no user found', {message: 'not found'})
          .addThrows('NoUserFoundError', {message: 'not found'})
        .addStep('createdb', 'create the DB')
        .addStep('updatedb', 'update the DB')
    .addMethod('get', 'get a playbook')
        .addStep('validate', 'validate the DTO')
        .addStep('createdb', 'create the DB')
        .addStep('updatedb', 'update the DB')
    .addMethod('create', 'create a playbook')
      .addStep('validate', 'validate the DTO')
      .addStep('createdb', 'create the DB')
      .addStep('updatedb', 'update the DB')
    .addMethod('create', 'create a playbook')
      .addStep('validate', 'validate the DTO')
      .addStep('createdb', 'create the DB')
      .addStep('updatedb', 'update the DB')
    .addMethod('create', 'create a playbook')
    .addMethod('create', 'create a playbook')
    .addMethod('create', 'create a playbook')
    .addMethod('create', 'create a playbook')

API

@todo - write this

Authour/Author

Nick Mitchell - @todo

1.7.0

3 years ago

1.6.3

3 years ago

1.6.2

3 years ago

1.6.1

3 years ago

1.6.0

3 years ago

1.5.14

3 years ago

1.5.13

3 years ago

1.5.12

3 years ago

1.5.11

3 years ago

1.5.10

3 years ago

1.5.9

3 years ago

1.5.8

3 years ago

1.5.7

3 years ago

1.5.6

3 years ago

1.5.5

3 years ago

1.5.4

3 years ago

1.5.3

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.8

3 years ago

1.4.7

3 years ago

1.4.6

3 years ago

1.4.5

3 years ago

1.4.4

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago