JS implementation for spatie ray.
Import JS file into your DOM.
<script src="ray.js"></script>
There are some values you can configure. Default settings are compatible with ray defaults.
Ray uses host_name
to bundle your messages. This lib will choose a host_name
randomly if you don't.
debug.ray.config(
{
host: '127.0.0.1',
port: 23517,
host_name: 'test-app'
}
);
debug.ray.config({host_name: 'test-app'});
debug.ray.dump('hello there');
debug.ray.json({debug:true});
debug.ray.log('this is a log message');
debug.ray.notify('you should see a notification');
debug.ray.time();
debug.ray.custom(true, 'boolean');
debug.ray.custom({debug:true}, 'json');
You also can apply colors. Supported colors are
- green
- red
- orange
- gray
- blue
- purple
debug.ray.dump('hello there').green();
debug.ray.dump('hello there').red();