gpt4 book ai didi

sails.js - 在终端中禁用请求日志

转载 作者:行者123 更新时间:2023-12-02 14:52:17 25 4
gpt4 key购买 nike

是否可以关闭 sails 请求日志。就像我不想看到下面粘贴的示例一样。因为当我运行集成测试时,这些日志会妨碍报告。

<- 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)

最佳答案

是 sails 钩。 https://www.npmjs.com/package/sails-hook-apianalytics

阅读文档,你可以编辑日志或禁用其中的一些,或者只是卸载 Hook 。

在项目的根目录上运行 npm uninstall sails-hook-apianalytics 然后升起风 sails 。

关于sails.js - 在终端中禁用请求日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55033395/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com