javascript logger with filter