@smallprod/yukky-log-node-sdk
Yukky Log NodeJS SDK
Last updated 9 months ago by polo_yukky .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @smallprod/yukky-log-node-sdk 
SYNC missed versions from official npm registry.

Yukky Log NodeJS SDk

Easy to use SDK to send log to Yukky Log !

For more informations visit https://log.yukkyapp.com/doc

Installation

yarn add @smallprod/yukky-log-node-sdk
or
npm i @smallprod/yukky-log-node-sdk

Initialisation

Somewhere in your code you should add this :

const yukkylog = require('@smallprod/yukky-log-node-sdk');
yukkylog.init('<appkey>', '<appsecret>');

This will initialize the SDK.

You can add a third parameter to specify if you want the debug mode.

Send some logs

Error

To send an error log simply add this line :

await yukkylog.error({
  name: 'Error 404',
  tags: ['web', 'request'],
  desc: 'Not found',
  infos: err,
});

Warning

To send a warning log simply add this line :

await yukkylog.warning({
  name: 'Error 404',
  tags: ['web', 'request'],
  desc: 'Not found',
  infos: err,
});

Info

To send an info log simply add this line :

await yukkylog.info({
  name: 'Error 404',
  tags: ['web', 'request'],
  desc: 'Not found',
  infos: err,
});

Custom

To send a custom log simply add this line :

await yukkylog.custom({
  type: 'page access',
  name: 'Error 404',
  tags: ['web', 'request'],
  desc: 'Not found',
  infos: err,
});

Current Tags

  • 0.0.5                                ...           latest (9 months ago)

5 Versions

  • 0.0.5                                ...           9 months ago
  • 0.0.4                                ...           9 months ago
  • 0.0.3                                ...           9 months ago
  • 0.0.2                                ...           9 months ago
  • 0.0.1                                ...           9 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 6
Dependencies (0)
None
Dev Dependencies (10)

Copyright 2014 - 2016 © taobao.org |