No description, website, or topics provided.
JavaScript CoffeeScript Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
beacon
spec/javascripts
src
.gitignore
Rakefile
readme.md

readme.md

_rex_ is for logging in javascript

(still in early development)

#Usage

basic events

_rex_('something happened');

_rex_('something else happened');

// include emitters/console.js file too
_rex_.emit('console');

… will store these events to a log

wrapping functions

var an_fn = function(){…};

an_fn = _rex_('fn happened',fn);

… will store the start/finish time of 'an_fn'

start/finish times

_rex_('my event','start');

…some other stuff

_rex_('my event','stop');

… will store the start/finish time of 'my event'

Other

Restart the tracker:

_rex_().reset()

View the stored events:

_rex_().events()

Sending events to a server

(Run the the collector node app: node beacon)

// include emitters.beacon file too
_rex_.emit('beacon', {url:'http://192.168.what.ever:4444'})

Testing

To run the tests, install jasmine and rack-asset-compiler gem install jasmine rack-asset-compiler and then run rake jasmine to start the server.