Update logger.js

bug fixed