Created
July 27, 2020 18:24
-
-
Save jondkelley/91eba96a4b8c47c5cc5c4100614b5379 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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