Last active
May 25, 2017 07:53
-
-
Save mrister/149d023bc018936b95bae72bc23aec68 to your computer and use it in GitHub Desktop.
Loggly log a shallow object
This file contains hidden or 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
const shallowObject = { | |
fullname: "Matthew Setter", | |
employment: "Freelance Technical Writer", | |
country: "Germany", | |
languages: ['PHP', 'Node.js', 'Bash', 'Ruby', 'Python', 'Go'] | |
} | |
// use previously defined loggly client | |
client.log(shallowObject, function (err, result) { | |
// Do something once you've logged | |
if (result && result.response == 'ok') { | |
console.log('Log message sent successfully') | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment