1.0.15 • Published 10 years ago

simple-logger-pkg v1.0.15

Weekly downloads
1
License
ISC
Repository
-
Last release
10 years ago

simple-logger-pkg Simple Logger NPM Package

Usage

install the package by, at console command window type:

npm install simple-logger-pkg --save

You also need to create two variables in the application global scope:

global.DEBUG = true; // to enable or disable logging

Two funcitons:

  1. debug() to produce a log message on the console, The log messages will contain three levels of messages: information, warnings, and errors. you can select level of messages by passing it on the call. ex:
  2. versionUp() to increase a Semantic version based on the input previous version and the version type (Major, Minor, Patch)
// logs type:
// 0 for information (blue)
// 1 for warning (yellow)
// 2 for error (red)

// versions type:
// Major, Minor, Patch

const utility = require("simple-logger-pkg");
utility.debug("your message", 0); 
var newVersion = utility.versionUp("1.0.2", "Major") //will return "2.0.2"
1.0.15

10 years ago

1.0.14

10 years ago

1.0.12

10 years ago

1.0.11

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago