Go to file
2023-08-28 10:18:18 +07:00
example Add example 2023-05-27 11:30:19 +07:00
src Replaced a new base url 2023-08-28 10:18:18 +07:00
tests Add vlogs sdk for ts 2023-05-27 11:16:06 +07:00
.gitignore Add vlogs sdk for ts 2023-05-27 11:16:06 +07:00
.npmignore Add example 2023-05-27 11:30:19 +07:00
jest.config.js Add vlogs sdk for ts 2023-05-27 11:16:06 +07:00
package-lock.json Add vlogs sdk for ts 2023-05-27 11:16:06 +07:00
package.json Replaced a new base url 2023-08-28 10:18:18 +07:00
README.md Add vlogs sdk for ts 2023-05-27 11:16:06 +07:00
tsconfig.json Updated package 2023-05-27 11:22:40 +07:00

vLogs SDK for JS/TS

A simple way to collect logs and send to the server via simple SDK.

  • Collect the logs
  • Support local retries

Usages

const APP_ID = 'xxx';
const API_KEY = 'vlogs_xxx';

const sdk = VLogs.create(
    VLogsOptions.builder().appId(APP_ID).apiKey(API_KEY).build()
);

const request = Collector.builder()
    .message('Hello from vlogs-ts-sdk')
    .type(CollectorType.Log)
    .source(CollectorSource.Web)
    .build();

const response = await sdk.collect(request);
console.log('Request: ', request);
console.log('Response: ', response);

Contributors