Lightweight JavaScript message logger/debug helper