Update logger.js

fix "this" scope