Skip to content

Commit

Permalink
Editorial updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtevenan-splunk committed Nov 19, 2015
1 parent 93853fd commit 2411218
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/custom_format.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Logger.error = function(err, context) {
/**
* Override the default eventFormatter() function,
* which takes a message and severity, returning
* any type - string or object are recommended.
* any type; string or object are recommended.
*
* The message parameter can be any type. It will
* be whatever was passed to Logger.send().
Expand All @@ -50,6 +50,7 @@ Logger.error = function(err, context) {
* of key=value pairs if message is an object,
* otherwise the message value is as value for
* the message key.
*
* This string is prefixed with the event
* severity in square brackets.
*/
Expand All @@ -68,7 +69,7 @@ Logger.eventFormatter = function(message, severity) {
return event;
};

// Define the payload to send to Splunk's Event Collector
// Define the payload to send to HTTP Event Collector
var payload = {
// Message can be anything, it doesn't have to be an object
message: {
Expand Down Expand Up @@ -110,4 +111,4 @@ console.log("Sending payload", payload);
Logger.send(payload, function(err, resp, body) {
// If successful, body will be { text: 'Success', code: 0 }
console.log("Response from Splunk", body);
});
});

0 comments on commit 2411218

Please sign in to comment.