Create logger.js

Adding logger code