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

@thaldea/logger

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thaldea/logger

This is really stupid NodeJS logger that is really not optimized but really good for fast prototyping.

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
1
Created
Source

@thaldea/logger

This is really stupid NodeJS logger that is really not optimized but really good for fast prototyping.

Starting up

npm install @thaldea/logger

Simple log example

import Logger from "@thaldea/logger/index.mjs"

Logger.debug("Debug log outside a function or a class")

class Main {

  run() {
    Logger.log("A simple log message")
    Logger.debug("A debug message")
    Logger.silly("A silly debug message")
    Logger.info("An info message")
    Logger.error("An error message")
    Logger.fatal("A fatal message")
  }
}

const app = new Main();
app.run()

Log and file

import {Logger as LoggerInstance} from '@thaldea/logger/index.mjs';

const Logger = new LoggerInstance("mylogs.log");

class Main {

  run() {
    Logger.log("A simple log message")
    Logger.debug("A debug message")
    Logger.silly("A silly debug message")
    Logger.info("An info message")
    Logger.error("An error message")
    Logger.fatal("A fatal message")
  }
}

const app = new Main();
app.run()

Keywords

logger

FAQs

Package last updated on 28 Mar 2023

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