Socket
Socket
Sign inDemoInstall

datalog-client

Package Overview
Dependencies
47
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    datalog-client

Client for DataLog


Version published
Maintainers
1
Install size
3.69 MB
Created

Readme

Source

DataLog Client

Requires DataLog.

The DataLog Client is designed to be a fire and forget logger. Optionally, you can include a callback that will be called when the log request is finished.

Usage

DataLog makes use of three basic data points:

  • metric - the system metric to log this under
  • tags - single or array of tags used for searching
  • data - JSON object of the data to store
var DataLog = require('datalog-client');

var logger = new DataLog('https://datalog.example.com/', 'myappid', 'mykey');

logger.log('system.loadavg', ['load'], { '1min' : 2.5 });
logger.log('log', 'server', { 'type': 'notice', 'message': 'This is a notice!' });
logger.log('log', [ ], { 'temperature': 20.6, time: new Date() }, function (err, response) {
  console.log(response);
});

If time is not included, it will be added automatically in the client.

FAQs

Last updated on 27 May 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc