🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

logi

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logi

A minimalist console logger for node.

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

Logi

I wrote this logger to be simple to use and not feature rich. I needed something straightforward that doesn't require much thought when logging in node. Besides having a simple api, it colors the console output for readability.

Logging levels

There are four levels of logging that can be input, 'info', 'warn', 'error', and 'fatal' with corresponding levels of severity. 'fatal' will cause your program to exit.

Example

var log = require('logi');

log('some text');
log('info', 'info fo yo friends');
log('warn', 'word of warning to your mother');
log('error', 'some error text as an ERROR, wont kill your program');
log({hello: 'world'});
log([0,1,2,3,4]);
log(123);
log({hello: 'world'}, 'hey everyone, come checkout my object as INFO!');

You can throw pretty much anything at logi and it will log it. The first argument can optionally be one of the logging levels.

Tests

Make sure you npm install, then run npm test.

FAQs

Package last updated on 14 Jan 2015

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