🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@john-yuan/dev-simple-logger

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@john-yuan/dev-simple-logger

A simple logger that write log to the console with time and colors.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Simple Logger

A simple logger that write log to the console with time and colors.

Install

This module is published to NPM, you can install it with the following command:

npm i @john-yuan/dev-simple-logger

API

/**
 * Like console.log(), no color and time will be applied
 *
 * @param {string} [message]
 * @returns {this}
 */
logger.log(message);

/**
 * Print the info message with the current time in green color
 *
 * @param {string} [message]
 * @returns {this}
 */
logger.info(message);

/**
 * Print the warning message with the current time in yellow color
 *
 * @param {string} [message]
 * @returns {this}
 */
logger.warn(message);

/**
 * Print the error message in red color. Empty lines will be prepended and appended.
 *
 * @param {string} [message]
 * @returns {this}
 */
logger.error(message);

Keywords

logger

FAQs

Package last updated on 02 Feb 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