Flexible JavaScript logging facility