Skip to content

Instantly share code, notes, and snippets.

@mrkelly
mrkelly / event.builder.js
Created August 6, 2014 19:44
Angular Logstash
angular.module('hf.events.builder', [
'app.resources',
'app.values'
])
.factory('EventBuilder', function ($injector, $window, apiUrl) {
var EventBuilder = function EventBuilder(message) {
this['@timestamp'] = new Date();
this['@message'] = message || '';
return this;
};