node.jsmorgan

morgan deprecated default format: use combined format


I am using morgan package in my application in nodejs to log HTTP request but I am getting this warning. How can it be resolved?

morgan deprecated default format: use combined format app.js:10:9


Solution

  • const morgan = require("morgan");
      app.use(morgan("dev"));
    

    Make sure you're not calling app.use(morgan) anywhere else in your code.