🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

krlog

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

krlog

This is made for @mcbe/console module * It receive log * It will keep log to memory * It will fire log to event * It can read keeped log * It can use various log levels * It can replace console.log ## Example

latest
Source
npmnpm
Version
2.0.4
Version published
Maintainers
1
Created
Source

About this

This is made for @mcbe/console module

  • It receive log
  • It will keep log to memory
  • It will fire log to event
  • It can read keeped log
  • It can use various log levels
  • It can replace console.log

Example

import krlog from 'krlog';

krlog.listener.on((level:krlog.Level, message:string)=>{
    // process log
});

// basic functions
krlog.verbose('verbose');
krlog.message('message');
krlog.warning('warning');
krlog.error('error');

// install to console.log
krlog.install();
console.log('message');
console.error('error');


for(const line of krlog.page.current())
{
    // read page
}

krlog.page.next(); // next page
krlog.page.previous(); // previous page
krlog.page.clear(); // clear all pages



FAQs

Package last updated on 23 Dec 2020

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