--- "log-js": patch --- Added `attachLogger` helper function to register a function that should be called for each log entry.