Skip to content

Commit d2e6dc5

Browse files
committed
fix(server): logger url改用相对路径(考虑一些工程相对路径已经很长了...所以不用绝对路径)
1 parent cd2d896 commit d2e6dc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commands/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ exports.run = (options) => {
6969

7070
format = format.replace(/%date/g, "\x1b[90m" + '[' + (moment().format(dateFormat)) + ']' + "\x1b[0m");
7171
format = format.replace(/%method/g, "\x1b[35m" + (req.method.toUpperCase()) + "\x1b[0m");
72-
format = format.replace(/%url/g, "\x1b[90m" + options.cwd + decodeURI(req.originalUrl) + "\x1b[0m");
72+
format = format.replace(/%url/g, "\x1b[90m" + decodeURI(req.originalUrl) + "\x1b[0m");
7373
format = format.replace(/%status/g, "" + status + res.statusCode + "\x1b[0m");
7474
format = format.replace(/%route/g, "\x1b[90m" + (req.route ? req.route.path + ' ' : '\x1b[31m') + "\x1b[0m");
7575
format = format.replace(/%contentLength/g, "\x1b[90m" + contentLength + '\x1b[31m' + "\x1b[0m");

0 commit comments

Comments
 (0)