0.0.4 • Published 3 years ago

mizala-logger v0.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

mizala-logger

This is a logger package that exposes all the log level of the logging service as functions

Features

  • Expose all the log levels of the logging-service
  • Easy Installation and Use

Installation

"dependencies": {
    "mizala-logger": "^0.0.4"
}

npm install mizala-logger

Initialization

const logger = require("mizala-logger");
//You can set a custom url to the logging service setting in the env LOGGING_SERVICE_URL
//When there is no LOGGING_SERVICE_URL in the env, it uses the default internal network url `http://logging-service`

Basic functionality

  • Set A Value
logger.error("This is an error from the package", {foo: "bar"}, new Error().stack);
logger.warn("This is an warning message from the package", {foo: "bar"}, new Error().stack);
logger.debug("This is an debug message from the package", {foo: "bar"}, new Error().stack);
logger.critical("This is a critical message from the package", {foo: "bar"}, new Error().stack);
logger.info("This is a info message from the package", {foo: "bar"}, new Error().stack);
logger.exception(new Error("Custom Error"), {foo: "bar"}, new Error().stack);

Tests

Cli

npm install
npm test

Contributors

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago