ig-logger-lib
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

IG Logger Lib

Libreria per inviare i log al sistema centralizzato IG

Installation

This is a Node.js module available through the npm registry, develop with Typescript 4.

$ npm install ig-logger-lib

Usage

Import module with ES6 syntax

import * as IGLogger from "ig-logger-lib"

or CommonJS

let IGLogger = require("ig-logger-lib");

Set your api key, if you don't have it, you can generate it from Vision Log

IGLogger.init({
  apiKey: "00000000-0000-0000-0000-000000000000"
})

Log type

Info

IGLogger.info({
  userId: "userId",
  method: "method",
  payload: "string or JSON"
})

Error

IGLogger.error({
  userId: "userId",
  method: "method",
  payload: "string or JSON",
  error: "Exception or string"
})

Debug

IGLogger.info({
  userId: "userId",
  method: "method",
  payload: "string or JSON"
})

Warn

IGLogger.warn({
  userId: "userId",
  method: "method",
  payload: "string or JSON"
})

Readme

Keywords

Package Sidebar

Install

npm i ig-logger-lib

Weekly Downloads

1

Version

1.0.6

License

ISC

Unpacked Size

11.2 kB

Total Files

17

Last publish

Collaborators

  • gianlucainnocente