[PR #692] [MERGED] feat: enhence log format #4088

Closed
opened 2026-05-26 23:07:48 +03:00 by zhus · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/sigoden/dufs/pull/692
Author: @sigoden
Created: 4/25/2026
Status: Merged
Merged: 4/25/2026
Merged by: @sigoden

Base: mainHead: feat


📝 Commits (1)

📊 Changes

2 files changed (+68 additions, -19 deletions)

View changed files

📝 src/http_logger.rs (+67 -16)
📝 src/logger.rs (+1 -3)

📄 Description

support json log-format

$ dufs --log-format '{"time":"$time_local","addr":"$remote_addr","uri":"$request_uri", "method":"$request_method","status":$status}'

{"time":"2026-04-25T20:28:03+08:00","addr":"192.168.8.8","uri":"/", "method":"GET","status":200}

default text log-format

- $remote_addr "$request" $status
+ $time_iso8601 $log_level - $remote_addr "$request" $status

close #671


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/sigoden/dufs/pull/692 **Author:** [@sigoden](https://github.com/sigoden) **Created:** 4/25/2026 **Status:** ✅ Merged **Merged:** 4/25/2026 **Merged by:** [@sigoden](https://github.com/sigoden) **Base:** `main` ← **Head:** `feat` --- ### 📝 Commits (1) - [`e266b6a`](https://github.com/sigoden/dufs/commit/e266b6a505da03cb5d9856fef121110d057632da) feat: enhence log format ### 📊 Changes **2 files changed** (+68 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `src/http_logger.rs` (+67 -16) 📝 `src/logger.rs` (+1 -3) </details> ### 📄 Description ### support json log-format ``` $ dufs --log-format '{"time":"$time_local","addr":"$remote_addr","uri":"$request_uri", "method":"$request_method","status":$status}' {"time":"2026-04-25T20:28:03+08:00","addr":"192.168.8.8","uri":"/", "method":"GET","status":200} ``` ### default text log-format ```diff - $remote_addr "$request" $status + $time_iso8601 $log_level - $remote_addr "$request" $status ``` close #671 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
zhus added the pull-request label 2026-05-26 23:07:48 +03:00
zhus closed this issue 2026-05-26 23:07:48 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#4088