digitalbazaar/bedrock-event-log

Name: bedrock-event-log

Owner: Digital Bazaar, Inc.

Description: Bedrock Event Log

Created: 2015-12-08 15:55:16.0

Updated: 2017-11-30 21:41:21.0

Pushed: 2017-11-30 21:42:21.0

Homepage:

Size: 12

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

bedrock-event-log

A bedrock module that can be used to record events of defined types into a MongoDB collection.

Requirements
Quick Examples
config = require('bedrock').config;
eventLog = require('bedrock-event-log').log;

n eventType property MUST be added for each type of event to be recorded
ig['event-log'].eventTypes.MyEvent = {
dex: 'itemCategory', // (optional) specify an event property name to use as an index
sureWriteSuccess: true  // when false, database operations are performed without waiting for a callback


tLog.add({
pe: 'MyEvent', // MUST correspond to a defined event type
te: new Date().toJSON(),
emCategory: 'itemCategory1234',
source: 'https://example.com/item/12345',
tor: 'user1234'
allback);
API
add(event, callback)

event properties:


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.