Skip to content

Instantly share code, notes, and snippets.

@mrister
Created May 11, 2017 07:59
Show Gist options
  • Save mrister/afe2b0dc5b531af833c29ab8ffed1a7c to your computer and use it in GitHub Desktop.
Save mrister/afe2b0dc5b531af833c29ab8ffed1a7c to your computer and use it in GitHub Desktop.
Loggly log a complex object
// 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