📅  最后修改于: 2022-03-11 15:01:35.940000             🧑  作者: Mango
var chalk = require('chalk')
var morgan = require('morgan')
app.use(morgan(function (tokens, req, res) {
return chalk.blue(tokens.method(req, res))
+ ' ' + chalk.green(tokens.url(req, res))
+ ' ' + chalk.red(tokens['response-time'](req, res))
}))