Monolog Colored Line Formatter

Over a year ago I quickly whipped up a Colored Line Formatter for use with Monolog. As I’m building colorised output into Mixed Content Scan I – finally – took the time to actually put the darn thing out in the open. bramus/monolog-colored-line-formatter is a formatter for use with Monolog. It augments the Monolog LineFormatter …

Bunyan

$ cat hi.js var bunyan = require(‘bunyan’); var log = bunyan.createLogger({name: ‘myapp’}); log.info(‘hi’); log.warn({lang: ‘fr’}, ‘au revoir’); $ node hi.js {“name”:”myapp”,”hostname”:”banana.local”,”pid”:40161,”level”:30,”msg”:”hi”,”time”:”2013-01-04T18:46:23.851Z”,”v”:0} {“name”:”myapp”,”hostname”:”banana.local”,”pid”:40161,”level”:40,”lang”:”fr”,”msg”:”au revoir”,”time”:”2013-01-04T18:46:23.853Z”,”v”:0} Bunyan is a simple and fast JSON logging library for node.js services The true power comes when it’s combined with the bundled bunyan binary, which pretty-prints bunyan logs: Like so: $ node …

Logging client-side errors

function logError(details) { $.ajax({ type: ‘POST’, url: ‘http://mydomain.com/api/1/errors’, data: JSON.stringify({context: navigator.userAgent, details: details}), contentType: ‘application/json; charset=utf-8’ }); } window.onerror = function(message, file, line) { logError(file + ‘:’ + line + ‘\n\n’ + message); }; Let’s keep this short. Too few websites log JavaScript errors. Let’s build a simple system to track client-side errors. Makes clever …

I Know What You Downloaded on BitTorrent …

Imagine you’d write a crawler that connects to many torrent trackers for many torrents and then log all IP addresses that are also connected. Now, that’s exactly what You Have Downloaded does: it aggregates all public data and then exposes it. We came up with the idea of building a crawler like this and keeping …