Logger middleware for the browser