0.0.7 • Published 6 years ago

@st-up/stars-debug v0.0.7

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

Logger ( Stars_modules )

####by Start-to-generate

Import

  1. Change properties in config "see below"
  2. Use method
  const { Debug, DebugInit } = require('@st-up/stars-debug');

  await DebugInit({ use: true, rootDirectory: 'name_of_folder' })

  Debug.debug('some return function', [function1, function2])

Methods

  • showColor
  Debug.showColor()

Show an example of each color use by looger with that method associates

  • debug
  Debug.debug(message, [ variables ])

Display all variables with message

  • success
  Debug.success(message, variable)

Display message and one variable

  • error
  Debug.error(message, error)

Display message and error

  • crash
  Debug.crash(message, error)

Display message and error

  • init
  Debug.init(message, config)

Display message and object of config

  • remove
  Debug.remove(message, value)

Display message and object of value

  • create
  Debug.create(message, value)

Display message and value

  • update
Debug.update(message, value)

Display message and value

  • save
Debug.save(message, value)

Display message and value

  • request
  Debug.request(message, body, error, response)

Display message and body, error, response

  • info
  Debug.info(message)

Display message

  • controller
  Debug.controller(message)

Display message

  • handler
  Debug.handler(message)

Display message

  • methods
  Debug.methods(message)

Display message

  • statics
  Debug.statics(message)

Display message

  • hookMongo
  Debug.hookMongo(message)

Display message

  • func
  Debug.func(message)

Display message

Config properties

  config = {
    rootDirectory: 'api',
    debug: false,
    success: true,
    successValue: true,
    crash: true,
    crashValue: true,
    error: true,
    errorValue: true,
    remove: true,
    removeValue: true,
    create: true,
    createValue: true,
    update: true,
    updateValue: true,
    info: true,
    debug: true,
    debugValue: true,
    handler: true,
    methods: true,
    statics: true,
    controller: true,
    hookMongo: true,
    func: true,
    init: true,
    initValue: true,
    color: {
      default: '#F6F6F6',
      debug: '#FFA500',
      crash: '#AF00E1',
      error: '#FF0000',
      success: '#00FF00',
      remove: '#FF0000',
      create: '#0066FF',
      info: '#B4F8DF',
      name: '#FF49EA'
    }
  }
0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago