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

colored-logs

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

colored-logs

Print beautiful logs with no effort, just like that!

latest
Source
npmnpm
Version
2.0.1
Version published
Maintainers
1
Created
Source

Colored Logs

Print beautiful logs with no effort, just like that!

Usage

Basic

const {Logger} = require("colored-logs");

Logger.info("This is a info message.");
Logger.debug("Secret stuff hidden from users.");
Logger.warn("This is a test warn message.");
Logger.error(new Error(`Little Error`), "looking on this error");

With Custom Options

const {Logger} = require("colored-logs");
new Logger({
    level: "info",
    filePath: "./path/to/file.log"
});

Logger.info("This is a info message.");
Logger.debug("Secret stuff hidden from users.");
Logger.warn("This is a test warn message.");
Logger.error(new Error(`Little Error`), "looking on this error");

Configuration Options

  • LoggerOptions: Configures logger to fit your needs. Possible values:
    • level - Logging levels conform to the severity ordering specified by "from most important to least important"
    • filePath - Path to a file in which logs will appear
    • timezone - Controls timezone that is used across the Logger
    • timed_logs - If enabled and filePath is not set creates a log file with time of the first log.

Output Example

Output Screenshot

License

MIT License

Author

Krzysztof Saczuk (ZaKKu)

Keywords

logger

FAQs

Package last updated on 16 Oct 2018

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