Coder Social home page Coder Social logo

console-beautify's Introduction

Beautify-Console

this npm package is designed to help developer have formal looking console logs.

Installation

Installation

  npm install @satvikshukla/beautify-console
  yarn add @satvikshukla/beautify-console

Features

  • Easy to set up for real, you can make it work in less than 10sec!
  • Super easy to customize
  • Professional look ๐Ÿ‘Œ
  • Global initial configuration
  • And much more !

Example

const {SimpleLog} = require("@satvikshukla/beautify-console")
SimpleLog.info("Hi there");

SimpleLog

Simple log is a synchronous log which can use used in place of the traditional console.log() with various customizations.

const {SimpleLog} = require("@satvikshukla/beautify-console")

SimpleLog.info("Info Log");
SimpleLog.warn("Warn log");
SimpleLog.success("Success Log");
SimpleLog.error("Error Log");
SimpleLog.log("Default Log");

Output

simpleLog

Customizations

Color: "Red" | "Green" | "Yellow" | "Blue" | "Magenta" | "Cyan" | "White" | "Reset";
Type: "SUCCESS" | "ERROR" | "INFO" | "WARN" | "COMMON";

Uses

const {SimpleLog} = require("@satvikshukla/beautify-console")

SimpleLog.log("Info Green",{Color:"Green",Type:"INFO"});
SimpleLog.log("Success Red",{Color:"Red",Type:"SUCCESS"});

AsyncLog

Async log is a asynchronous log which can use used to get logs in file with promises.

const {AsyncLog} = require("@satvikshukla/beautify-console")

AsyncLog.log("AsyncLog file")

Customizations

By default the path is taken as root -> Output -> AsyncLog"

path ?: string;
type ?: "SUCCESS" | "ERROR" | "INFO" | "WARN";
delimiter ?: string;

Uses

const {AsyncLog} = require("@satvikshukla/beautify-console")

AsyncLog.log("AsyncLog Log")
AsyncLog.success("AsyncLog Success")
AsyncLog.log("AsyncLog Custom",{delimiter:"="})

Output

Inside txt file.

[ DEFAULT    ] : 2024-03-19T12:58:54.158Z : AsyncLog Log
[ SUCCESS    ] : 2024-03-19T12:58:54.158Z : AsyncLog Success
[ DEFAULT    ] = 2024-03-19T12:58:54.158Z = AsyncLog Custom

console-beautify's People

Contributors

deadland2002 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.