Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

console-log-short

short version of console.log(). just log()

console, Console, log, Log, console.log, log to console

readme

console-log-short

Short version of console.log().

just log()

Installation

$ npm i console-log-short

Usage

log

alias console.log() but short and add current time

const log = require('console-log-short');

let message = "some message";

log(message);

output: |12:12:12| some message
const log = require('console-log-short');

let firstMessage = "1 message";
let secondMessage = "2 message";
let thirdMessage = "3 message";

log(firstMessage, secondMessage, thirdMessage);

output: |12:12:12| 1 message
output: |12:12:12| 2 message
output: |12:12:12| 3 message

error log

alias console.error() but short and prefixes the output with the current time

const log = require('console-log-short');

let message = "red message";

log.e(message);

output: |12:12:12| red message

info log

alias console.info() but short and prefixes the output with the current time

const log = require('console-log-short');

let message = "info message";

log.i(message);

output: |12:12:12| info message