1.0.5 • Published 2 years ago
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 |