New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

sexylog

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sexylog

node.js very simple logging implementation

latest
Source
npmnpm
Version
1.1.1
Version published
Maintainers
2
Created
Source

sexylog

node js colourful logging framework

getting started

require sexylog in your nodejs app entry file (usually app.js) like so:

require('sexylog');

This makes the logger object available (yes, globally) anywhere in your code, like so:

(1) logger.trace("running logging test");
(2) logger.debug("running logging test");
(3) logger.info("running logging test");
(4) logger.warn("running logging test");
(5) logger.error("running logging test");

alt text

Setting log level

currently sexylog is set via an environment variable named LEVEL at the command line.

NOTE: Logging levels are show in order of priority. If you set the variable to TRACE all log levels above this level will print out. If you set the log level to WARN, only WARN and ERROR message will be printed, but nothing below these levels will print out.

Example:

export LOG_LEVEL=info

or

LOG_LEVEL=trace node app.js

running tests

mocha test/logging-test.js

Keywords

logging

FAQs

Package last updated on 19 Aug 2019

Did you know?

Socket

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