Morgan outputs requests directly to the console.
How can I redirect them to npm debug so that it follows the same format as the other stuff which is being logged?
My debug.js
config looks like the following:
import debug from 'debug';
const LOG_PREFIX = 'api';
const info = debug(`${LOG_PREFIX}:info`);
const dev = debug(`${LOG_PREFIX}:dev`);
const error = debug(`${LOG_PREFIX}:error`);
export {
info,
dev,
error,
};
And I currently log other stuff like:
import { info } from './debug';
info('App is up and running!');
My current morgan call is:
app.use(morgan('combined'));