Skip to content

Instantly share code, notes, and snippets.

@jondkelley
Created July 27, 2020 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jondkelley/91eba96a4b8c47c5cc5c4100614b5379 to your computer and use it in GitHub Desktop.
Save jondkelley/91eba96a4b8c47c5cc5c4100614b5379 to your computer and use it in GitHub Desktop.
var logdna_ingestion_key = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var http = require("http");
var Logger = require('logdna');
var options = {
hostname: 'myHostname',
app: 'testJavascript',
env: 'dev'
};
options.index_meta = true;
var logger = Logger.createLogger(logdna_ingestion_key, options);
var meta = {
foo: 'bar',
nested: {
alpha: 'alpha',
beta: 'beta',
charlie: 'charlie',
delta: 'delta'
}
};
var option = {
level: 'warn',
meta: meta
};
logger.log('Test log line with sample objects', option);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment