Created
May 11, 2017 07:59
-
-
Save mrister/afe2b0dc5b531af833c29ab8ffed1a7c to your computer and use it in GitHub Desktop.
Loggly log a complex 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
// Complex object definition | |
const complexObject = { | |
name: { | |
first: 'Matthew', | |
last: 'Setter' | |
}, | |
employment: 'Freelance Technical Writer', | |
country: 'Germany', | |
languages: [ | |
'PHP', | |
'Node.js', | |
'Bash', | |
'Ruby', | |
'Python', | |
'Go' | |
] | |
}; | |
client.log(complexObject, 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