[GH-ISSUE #671] Support Logformat like json or logfmt #407

Closed
opened 2026-04-08 16:52:40 +03:00 by zhus · 1 comment
Owner

Originally created by @wrenix on GitHub (Feb 10, 2026).
Original GitHub issue: https://github.com/sigoden/dufs/issues/671

Specific Demand

if i have to parse the logs i have to write an regex.
i would prefer json or logfmt which are well formated and parse able logs

Implement Suggestion

use just the default tracing_subscriber library for such formats:

  • json part of tracing-subscriber
  • logfmt

more inforamation e.g.: https://oneuptime.com/blog/post/2026-01-25-structured-json-logs-tracing-rust/view

to configure in dufs, maybe just set --log-format=json or --log-format=logfmt

Originally created by @wrenix on GitHub (Feb 10, 2026). Original GitHub issue: https://github.com/sigoden/dufs/issues/671 ## Specific Demand if i have to parse the logs i have to write an regex. i would prefer json or [logfmt](https://brandur.org/logfmt) which are well formated and parse able logs ## Implement Suggestion use just the default [tracing_subscriber](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/) library for such formats: - **json** part of tracing-subscriber - [logfmt](https://docs.rs/tracing-logfmt/latest/tracing_logfmt/) more inforamation e.g.: https://oneuptime.com/blog/post/2026-01-25-structured-json-logs-tracing-rust/view to configure in dufs, maybe just set `--log-format=json` or `--log-format=logfmt`
zhus closed this issue 2026-04-08 16:52:40 +03:00
Author
Owner

@sigoden commented on GitHub (Mar 6, 2026):

We will not support this feature.

  1. Dufs is a lightweight server, and this feature is complicate.
  2. It conflicts with --log-format.
  3. If you need to parse logs, you can try using Fluentd or Logstash.
<!-- gh-comment-id:4008676082 --> @sigoden commented on GitHub (Mar 6, 2026): We will not support this feature. 1. Dufs is a lightweight server, and this feature is complicate. 2. It conflicts with --log-format. 3. If you need to parse logs, you can try using Fluentd or Logstash.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#407