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

lambda-lite-logger

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lambda-lite-logger

📝 Yet another logger

latest
Source
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source

Lambda lite logger

NPM Version NPM Downloads License

📝 Yet another logger for Lambda

Why

I just want to pretty print any nest object param from log with some color..., nothing fancy.

Installation

npm i lambda-lite-logger

Usage

Basic

import { Logger } from "lambda--lite-logger";

const logger = new Logger();

// Pretty print nest object with 2 space by default
// 2021-1-6 19:31:6 [INFO] some data {
//   a: [
//     {
//       b: 1,
//       c: {
//         d: 2
//       }
//     }
//   ]
// }
logger.info("some data", { a: [{ b: 1, c: { d: 2 } }] });

More

const logger = new Logger({
  prettyPrint: false, // turn off prettyPrint, defaults to true
});

logger.debug("Only log process.env.NODE_ENV is not production"); // [DEBUG] ...
logger.warn("Warning"); // [WARN] warning
logger.error("Oh no"); // [ERROR] Oh no

logger.log("info", "low level API, just equal logger.info"); // [INFO] ...

Keywords

lambda

FAQs

Package last updated on 06 Jan 2021

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