1.0.0-alpha64 • Published 5 years ago

vision-log-test v1.0.0-alpha64

Weekly downloads
11
License
ISC
Repository
-
Last release
5 years ago

Vision Log

Monitor the logs of all your projects from a dashboard

Installation

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

$ npm install vision-log

Usage

Import module with ES6 syntax

import VisionLog from "vision-log"

or CommonJS

let VisionLog = require("vision-log");

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

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

Log type

Info

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

Error

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

Debug

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

Warn

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

Personalization

Vision Log share data with the dashboard each 15 seconds, but can be personalized with key 'interval' and values into IntervalTime class

VisionLog.init({
  apiKey: "00000000-0000-0000-0000-000000000000",
  interval: IntervalTime class
})