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

@vs-org/logger

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vs-org/logger

Simple console logger with severity.

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

vs-console-logger

Simple logger package to log msg with severity and time.

Usage


# plain logger without method names
import { Logger } from "vs-logger"
const logger = Logger.getInstance("info");
const log = logger.getLogger();
log.info(`some msg`); //[2022-8-20 T14:42:1:740 UTC+02:00] INFO: some msg


# Logger with method names
import { Logger } from "vs-logger"
const logger = Logger.getInstance("info");
const log = logger.getLogger("methodName");
logger.info(`some msg`); //[2022-8-20 T14:42:1:740 UTC+02:00] INFO: methodName: some msg


# Control log level with env variable
// set env variable
process.env.VS_LOGGER_LEVEL = "debug";

// Use logger
import { Logger } from "vs-logger"
const logger = Logger.getInstance();
const log = logger.getLogger("methodName");
logger.debug(`some msg`); //[2022-8-20 T14:42:1:740 UTC+02:00] DEBUG: methodName: some msg

License

MIT (see LICENSE)


Note

This is experimental package and not actively maintained. Please don't raise issues or feature requests. Only use for development and POC's.

Keywords

logger

FAQs

Package last updated on 18 Sep 2022

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