DEV Community

Benjamin H
Benjamin H

Posted on

Root level logger middleware should be active

If you're doing the Backend-Dev freeCodeCamp course like myself there's a possibility that you came across the error "Root level logger middleware should be active" on the Basic Node and Express track.

This error got me scratching for hours and I just want to help someone experiencing it only because the hint is missing spaces in the string formatting example.

Make sure to have spaces between the dash and req.path and req.ip in your root-level request logger middleware, like this console.log(req.method + " " + req.path + " " + "-" + " " +req.ip)

I hope this helps.

Top comments (0)