新手问题:
我想在控制台上禁用静态资源的日志记录,我只想看到普通的http请求(但不是静态文件的请求)。
我总是在控制台上看到所有静态文件加载的信息,比如:
[24/Sep/2014 22:18:55] "GET / HTTP/1.1" 200 39816 [24/Sep/2014 22:18:55] "GET /static/2.5.11/socialschools/css/molengo/molengo-regular-webfont.css HTTP/1.1" 200 509 [24/Sep/2014 22:18:55] "GET /static/2.5.11/socialschools/js/less.1.7.0.min.js HTTP/1.1" 200 101854 [24/Sep/2014 22:18:55] "GET /static/2.5.11/socialschools/js/html5shiv.3.7.0.js HTTP/1.1" 200 2428 [24/Sep/2014 22:18:55] "GET /static/2.5.11/socialschools/js/jquery.1.9.1.min.js HTTP/1.1" 200 92629 [24/Sep/2014 22:18:55] "GET /static/2.5.11/socialschools/js/respond.1.4.2.min.js HTTP/1.1" 200 4377 [24/Sep/2014 22:18:55] "GET /static...
有没有办法禁用这个?
例如在express(nodejs)中,如果我把日志中间件放在静态资源的中间件之前,它就不会记录静态文件。非常感谢您的帮助!
"
开头return not record.getMessage().startswith('"GET /static')
- undefined