sails.js - 在终端中禁用请求日志
问题描述
是否可以关闭帆请求日志。就像我试图看不到下面粘贴的示例一样。因为当我运行集成测试时,这些日志会妨碍报告。
<- PUT /api/v1/entrance/login (361ms 200)
| The requesting user agent has been successfully logged in.
|
| Under the covers, this stores the id of the logged-in user in the session as the `userId` key. The next time this user agent sends a request, assuming it includes a cookie (like a web browser), Sails will automatically make this user id available as req.session.userId in the corresponding action. (Also note that, thanks to the included "custom" hook, when a relevant request is received from a logged-in user, that user's entire record from the database will be fetched and exposed as `req.me`.)
|
°
<- GET /api/v1/user/me/overview/subscribe (26ms 200)
解决方案
是帆钩。 https://www.npmjs.com/package/sails-hook-apianalytics
阅读文档,你可以编辑日志或禁用其中的一些,或者只是卸载钩子。
在项目的根目录上运行npm uninstall sails-hook-apianalytics
,然后升起风帆。
推荐阅读
- java - 检查Java版本是否大于Java中的某个迭代?
- vba - End(xlDown) 单行
- angular - TrackBy reuse across nested ngFors (nested or 2d arrays)
- reactjs - G-WAN servlet 可以将 ReactJS 单页应用程序部署到浏览器吗?
- jquery - datetime picker and input hidden type
- graphql - Authorization for subscriptions Graphql (Absinthe) with token
- javascript - Vue JS 2 表格查看完整对象而不是值
- c++ - gRPC:RPC 处理程序如何正确检测`Server` 是否已经`Shutdown()`
- sql - 选择最后一个完整的行块
- r - R:data.frame() 元素类的错误消息