kaldr
v0.1.0
Published
Simple logger for client-side errors
Downloads
2
Readme
Kaldr
Simple logger for client-side errors
Server
kaldr --port 3000 > client.log &
Client
Load kaldr
<iframe id="#logger" src="http://localhost:3000/kaldr.frame#" style="display:none"></iframe>
Send message to kaldr
var logger = document.getElementById('logger'),
src = logger.getAttribute('src').split('#')[0];
window.onerror = function (mesage, file, line) {
logger.setAttribute('src', src + '#' + message + ' in ' + file + ' at line ' + line);
};