Libreria per inviare i log al sistema centralizzato IG
This is a Node.js module available through the npm registry, develop with Typescript 4.
$ npm install ig-logger-lib
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"
})
IGLogger.info({
userId: "userId",
method: "method",
payload: "string or JSON"
})
IGLogger.error({
userId: "userId",
method: "method",
payload: "string or JSON",
error: "Exception or string"
})
IGLogger.info({
userId: "userId",
method: "method",
payload: "string or JSON"
})
IGLogger.warn({
userId: "userId",
method: "method",
payload: "string or JSON"
})