whistle-plugin-log-all
v0.0.1
Published
Whistle plugin that logs proxied requests to the console (minimal example)
Maintainers
Readme
whistle-plugin-log-all
用途:拦截 whistle 代理的所有请求并将请求方法、URL 与请求头打印到控制台,便于调试。
安装与使用:
- 将本目录
plugins/log-all放入 whistle 的plugins/目录(或将包发布/安装至全局 npm)。 - 重启 whistle:
whistle示例:在启动后的环境中通过 whistle 代理发送请求:
curl -x http://127.0.0.1:8899 http://example.local/path在控制台会看到类似输出:
[whistle-plugin-log-all] GET http://example.local/path
[whistle-plugin-log-all] headers: { ... }注意:此插件只是最小示例,生产请补充过滤、采样和日志级别控制,避免在高并发场景频繁输出影响性能。
