Socket
Socket
Sign inDemoInstall

loug

Package Overview
Dependencies
34
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    loug

Console for debugging messages, errors and warnings in projects that are in development.


Version published
Maintainers
1
Created

Readme

Source

Loug

Console for debugging messages, errors and warnings in projects that are in development.

Installation

$ npm install --save loug

Add the production key in your package.json.

{
  "name": "testing",
  "version": "3.2.1",
  "description": "description testing",
  "main": "index.js",
  "scripts": {
  },
  "keywords": [
  ],
  "dependencies": {
  },
  "production": false    //=> This key
}

The key production is boolean type, true is production.

When the key is set to true the messages are not displayed. The opposite happens when it is false.

Usage

"production": false

var loug = require('loug');

loug("Hello")
//=> Hello
loug.warn("an advert")
//=> an advert
loug.ignore("Any argument or message")
//=> Any argument or message

"production": true

var loug = require('loug');

loug("Hello")
loug.warn("an advert")
loug.ignore("Any argument or message")
//=> Any argument or message

API

log(msg...)

Logs the message as if you called console.log

error(msg...)

Logs the message as if you called console.error

warn(msg...)

Logs the message as if you called console.warn

info(msg...)

Logs the message as if you called console.info

dir(msg...)

Logs the message as if you called console.dir

ignore(msg...)

Logs the message as if you called console.log. Logs the message in production and development.

Ignore all

Ignore the 'production' key and enable log, error, warn, dir and info. Only applies to the current document.

var loug = require('loug');

loug.set(true);

LICENCE

MIT

Keywords

FAQs

Last updated on 19 Mar 2017

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc