[GH-ISSUE #112] 是否考虑增加日志路径和展示用户ua #53

Closed
opened 2026-04-08 16:50:05 +03:00 by zhus · 4 comments
Owner

Originally created by @qiaoruntao on GitHub (Jul 29, 2022).
Original GitHub issue: https://github.com/sigoden/dufs/issues/112

增加日志主要是为了在开放访问目录的情况下留存访问记录, 便于追溯是谁访问了文件.
例如增加--log="some-path"选项, 将访问日志写入指定的文件.
增加User Agent是为了方便区分不同的访问设备, 现在命令行日志只提供了ip和访问路径, 这个信息量有点少了.

Originally created by @qiaoruntao on GitHub (Jul 29, 2022). Original GitHub issue: https://github.com/sigoden/dufs/issues/112 增加日志主要是为了在开放访问目录的情况下留存访问记录, 便于追溯是谁访问了文件. 例如增加`--log="some-path"`选项, 将访问日志写入指定的文件. 增加User Agent是为了方便区分不同的访问设备, 现在命令行日志只提供了ip和访问路径, 这个信息量有点少了.
zhus closed this issue 2026-04-08 16:50:05 +03:00
Author
Owner

@sigoden commented on GitHub (Jul 29, 2022):

日志文件可以这样实现:dufs > /var/log/dufs.log
展示UA不是很普遍的需求,你可以加一层代理 (如nginx)

<!-- gh-comment-id:1199071692 --> @sigoden commented on GitHub (Jul 29, 2022): 日志文件可以这样实现:dufs > /var/log/dufs.log 展示UA不是很普遍的需求,你可以加一层代理 (如nginx)
Author
Owner

@qiaoruntao commented on GitHub (Jul 29, 2022):

主要之前用习惯了http-server, 默认展示ua很方便. 如果需要套一层nginx就有点缺少灵活性了

<!-- gh-comment-id:1199124126 --> @qiaoruntao commented on GitHub (Jul 29, 2022): 主要之前用习惯了[http-server](https://github.com/http-party/http-server), 默认展示ua很方便. 如果需要套一层nginx就有点缺少灵活性了
Author
Owner

@sigoden commented on GitHub (Jul 30, 2022):

#116 支持自定义日志格式,这个issue就关闭了。

<!-- gh-comment-id:1200059752 --> @sigoden commented on GitHub (Jul 30, 2022): #116 支持自定义日志格式,这个issue就关闭了。
Author
Owner

@qiaoruntao commented on GitHub (Jul 30, 2022):

感谢

<!-- gh-comment-id:1200083721 --> @qiaoruntao commented on GitHub (Jul 30, 2022): 感谢
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#53