console.re.log('message'|obj|arr|bool|elem|'%s',str|'%d',num);
Sends [LOG]level message to the remote console. Usage example.
var str = 'Test', num = 43;
console.re.log('This is a string %s and number %d', str, num);
console.re.info('message'|obj|arr|bool|elem|'%s',str|'%d',num);
Sends [INFO]level message to the remote console. Usage example.
var obj = {key1:1,key2:2,key3:3}, arr = [1,2,3];
console.re.log('This is an object %s and array %s', obj, arr);
console.re.warn('message');
Sends [WARN]level message to the remote console. Same usage and accept the same arguments as [LOG]or [INFO]level.
console.re.debug('message');
Sends [DEBUG]level message to the remote console. Same usage and accept the same arguments as [LOG]or [INFO]level.
console.re.error('message');
Sends [ERROR]level message to the remote console. Same usage and accept the same arguments as [LOG]or [INFO]level.
console.re.trace();
Displays stack trace of JavaScript execution at the point where it was called.
console.re.count('label');
Displays the number of times count call with given 'label' was executed.
console.re.time('label');
Creates a new timer under the given 'label'. To stop timer and display time result, call console.re.timeEnd('label');
console.re.timeEnd('label');
Stops timer and displays time result started before with given 'label'.
console.re.size([selector],[,selector,...]);
Displays size of DOM element(s), width and height for given selector(s) or displays current Window size if called with no arguments. Browser only API. Usage example.
// get Window size
console.re.size();
// get size of all P elements
console.re.size('all P %s', document.getElementsByTagName('p'));
// get size of DIV elements with class 'test' using jQuery
console.re.size($('div.test')[0]);
console.re.css(selector,['property','property2', ...'propertyN']);
Displays value of specified CSS properties in array for given selector(s). Browser only API. Usage example.
// get CSS property 'background-color' of BODY
console.re.css(document.body, 'background-color');
// get CSS properties 'border' and 'color' for all P elements
console.re.css(document.getElementsByTagName('p'), ['border','color']);
// get CSS property 'margin' and 'padding' using jQuery
console.re.css($('div.test'), ['margin','padding']);
console.re.media();
Displays value of CSS Media Queries for current Window size. An optional 'watch' argument sets listener to display Media Queries on browser's resize events. Browser only API. Usage example.
// get applied Media Query rulers for current Window size
console.re.media();
// get Media Query and send updates on Window resize
console.re.media('watch');
// get all types of Media Query applied (print and screen)
console.re.media('all');
console.re.test('expression|selector|string|array|object|number');
Displays result of test for given expression or valid selector, object, string, array, number. Usage example.
console.re.test("1!==1","'this string'","[1,2,3,4,5,6]","document.body");
console.re.assert(expression,['message']);
Tests if a given expression is TRUE. Only if FALSE, it will display an error message. Usage example.
console.re.assert(1!==1, 'It is not true');
console.re.clear();
Clears remote console logs.
Console.Re version: 2.1.17
<script src="///connector.js" data-channel="" id="consolerescript"></script>
var consolere = {
channel:'',
api:'///connector.js',
ready: function(c) {var d=document,s=d.createElement('script'),l;s.src=this.api;s.id='consolerescript';s.onreadystatechange=s.onload=function(){if(!l){c();}l=true;};d.getElementsByTagName('head')[0].appendChild(s);}};
consolere.ready({
console.re.log('remote log test');
});
$ npm install console-remote-client
const consolere = require('console-remote-client').connect({ server: ', channel: '' });