added logger middleware for the console