Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benfoxall/_rex_
https://github.com/benfoxall/_rex_
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/benfoxall/_rex_
- Owner: benfoxall
- Created: 2011-11-12T13:50:07.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-07-20T17:47:17.000Z (over 11 years ago)
- Last Synced: 2025-01-19T08:31:25.580Z (23 days ago)
- Language: CoffeeScript
- Homepage:
- Size: 105 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
\_rex\_ is for logging in javascript
(still in early development)
#Usage
### basic events
```js
_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
```js
var an_fn = function(){…};an_fn = _rex_('fn happened',fn);
```… will store the start/finish time of 'an\_fn'
### start/finish times
```js
_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:
```js
_rex_().events()
```## Sending events to a server
(Run the the collector node app: `node beacon`)
```js
// 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.