Lightweight logging and reporting for JavaScript