minimal console proxy for the browser and Node.js