Lightweight logging for JavaScript