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

logikit

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logikit

A customizable logging library for enhanced console output.

latest
Source
npmnpm
Version
1.0.3
Version published
Weekly downloads
0
-100%
Maintainers
0
Weekly downloads
 
Created
Source
LogiKit-Banner

A customizable logging library for enhanced console output.

version downloads

Getting Started

Installation

Using NPM:

npm install logikit

Using YARN:

yarn add logikit

Usage

Logger options

View all of the available options.
  • INFO

  • DEBUG

  • WARN

  • ERROR

  • READY

  • DATABASE

  • HEARTBEAT

  • SHARD

  • CLUSTER

  • COMMAND

  • EVENT

  • NOTICE

  • CRITICAL

  • TRACE

Text Colors options

View all of the available methods.
  • Reset

  • Black

  • Red

  • Green

  • White

  • Cyan

  • Magenta

  • Blue

  • Yellow

Background Colors options

View all of the available methods.
  • BgBlack

  • BgGreen

  • BgRed

  • BgYellow

  • BgBlue

  • BgMagenta

  • BgCyan

  • BgWhite

Text Style options

View all of the available methods.
  • Bright

  • Dim

  • Underscore

  • Blink

  • Reverse

  • Hidden

  • Reset


Import and usage example

const { Logger, Colors, Styles } = require("logikit");

function runApp() {
  Logger.info("Application started");                
  Logger.debug("Debugging application flow");         
  Logger.warn("Warning! Potential issue detected");      
  
  try {
    // Simulating an error
    throw new Error("Something went wrong!");
  } catch (error) {
    Logger.error("An error occurred", error);            
  }
  
  Logger.ready("Application is ready to accept requests"); 
  Logger.database("Database connection established");      
  Logger.heartbeat("Heartbeat signal sent");               
  Logger.shard("Shard initialized");                       
  Logger.cluster("Cluster started successfully");          
  Logger.command("Command executed");                      
  Logger.event("Event triggered");                         
  Logger.notice("Notice: This is a general notice");      
  Logger.critical("Critical error: System is shutting down"); 
  Logger.trace("Tracing application execution flow");    
  
  Logger.log('INFO', 'This is a custom log with specific styling!', Colors.Green, Styles.Bright);
  Logger.log('DEBUG', 'This log has a blue background!', Colors.White, Styles.BgBlue);
}

runApp();

Output example

[9:21:16] => INFO - Application started
[9:21:16] => DEBUG - Debugging application flow
[9:21:16] => WARN - Warning! Potential issue detected
[9:21:16] => ERROR - An error occurred: Something went wrong!
Stack Trace: ... (the stack trace of the error)
[9:21:16] => READY - Application is ready to accept requests
[9:21:16] => DATABASE - Database connection established
[9:21:16] => HEARTBEAT - Heartbeat signal sent
[9:21:16] => SHARD - Shard initialized
[9:21:16] => CLUSTER - Cluster started successfully
[9:21:16] => COMMAND - Command executed
[9:21:16] => EVENT - Event triggered
[9:21:16] => NOTICE - Notice: This is a general notice
[9:21:16] => CRITICAL - Critical error: System is shutting down
[9:21:16] => TRACE - Tracing application execution flow
[9:21:16] => INFO - This is a custom log with specific styling!
[9:21:16] => DEBUG - This log has a blue background!

Do you have any issues?

If you have any issues don't hesitate to report it via GitHub Issues.

This package was made by @lazyfenix.

Keywords

logikit

FAQs

Package last updated on 25 Oct 2024

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