Logentries test

by sstur

JavaScript

function log(data) {
    data = Object(data) === data ? JSON.stringify(data) : String(data);
    new Image().src = 'https://js.logentries.com/v1/logs/50aa7ce3-8d27-4e80-b273-ed53afab651d?e=' + encodeURIComponent(btoa(data));
}

setTimeout(function() {
    log({
        hello: 'world',
        cookie: document.cookie,
        location: location.href,
        referrer: location.referrer,
        timestamp: new Date()
    });
}, 2000);