@ductuan15/wa-logger

0.0.2 • Public • Published

Table of content

  • Quick start
  • Usage
  • Logging levels

Quick start

import WALogger from "@ductuan15/wa-logger";

//Create new WALogger instance
const logger = new WALogger();

// Set logger level 
// logger level :  "info" | "debug" | scopes_only, default is 'info
logger.setLoggerLevel("info");

// Set email for logger 
logger.setUserEmail("example@gmail.com");

// Log line if logger level is info or debug
logger.log("This is a message")

// Log line if logger level is debug
logger.debug("This is a message")

// Sends log message to console.error
logger.error("This is a message")

[example@gmail.com - 06/07/2021, 16:12:46]:This is message

Usage

Readme

Keywords

none

Package Sidebar

Install

npm i @ductuan15/wa-logger

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

9.64 kB

Total Files

22

Last publish

Collaborators

  • ductuan15