ig-logger-lib
v1.0.6
Published
Monitoring platform logs
Downloads
4
Readme
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"
})