Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

datalog-client

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datalog-client

Client for DataLog

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 27 May 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc