npm.io
1.0.5 • Published 4 years ago

x-log-client

Licence
ISC
Version
1.0.5
Deps
1
Size
3 kB
Vulns
1
Weekly
0

X-Log

The task of this library is to facilitate the use of the X-Log api with node js. The API key and further information can be found at log.x46.me.

Quickstart

1. Install

npm install x-log-client
2. run
const xlog = require('x-log-client');
var logger = new xlog("api key", "project id");

logger.log("Start");

logger.log("Error", 2, "An error has occurred");

API

new xlog(string, string, boolean);
1 string your api key
2 string the public project id
3 boolean use https for request (optional)

.log(string, number, string);
1 string main text to log
2 number types of messages, the default is 0 (optional)
3 string an additional text (optional)

Types of messages

type meaning
0 default message
1 warning message
2 Error message

Keywords