Last active
May 25, 2017 07:53
-
-
Save mrister/a6922255bd24506bbd508802b7df0e87 to your computer and use it in GitHub Desktop.
Perform action after logging a message to loggly
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
client.log('127.0.0.1 - There is no place like home', function(err, result) { | |
// Do something once you've logged | |
if (result && result.response && result.response.toLowerCase() === 'ok') { | |
console.log('Log message sent successfully') | |
} else if (err) { | |
console.log(err) | |
} else { | |
console.log('Log message not sent because response is not ok') | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment