4.0.0 • Published 6 years ago

lvlog v4.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

Introduction

There are 2 ways to use this package:

  1. Use it like normal Logger like Log4js.
const logger = require("lvlog").getLogger("mylog");

logger.setLevel("INFO");
logger.info("Hello");
  1. Extends the Logger class
const { Logger } = require("lvlog");

class MyObj extends Logger {
  constructor() {
    super("mylog");
  }

  blah() {
    this.info("hi");
    this.disableLog();
  }
}