From e67b7d0825a9fed81891144be6d0afc9aedb65f9 Mon Sep 17 00:00:00 2001 From: "Antonio S. Musumeci" Date: Sat, 18 Apr 2026 00:59:08 -0400 Subject: [PATCH] log: default debug log path to empty; skip set when empty libfuse previously initialized its debug log filepath to "/dev/stderr", forcing the config layer to reopen stderr on every load whether or not the user asked for it. Default the libfuse log path to "" and have the mergerfs config layer only forward the request to libfuse when the user supplied an explicit path. --- src/config_log_file.cpp | 3 ++- vendored/libfuse/lib/debug.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/config_log_file.cpp b/src/config_log_file.cpp index 65271990..f37c1f6d 100644 --- a/src/config_log_file.cpp +++ b/src/config_log_file.cpp @@ -26,7 +26,8 @@ LogFile::LogFile(const std::string &s_) { - fuse_debug_set_output(s_); + if(!s_.empty()) + fuse_debug_set_output(s_); } std::string diff --git a/vendored/libfuse/lib/debug.cpp b/vendored/libfuse/lib/debug.cpp index 57a48c2c..7dfd9027 100644 --- a/vendored/libfuse/lib/debug.cpp +++ b/vendored/libfuse/lib/debug.cpp @@ -63,7 +63,7 @@ _debug_set_output_stderr() auto new_log_file = std::shared_ptr(stderr,[](FILE*){}); fuse_cfg.log_file(new_log_file); - fuse_cfg.log_filepath("/dev/stderr"); + fuse_cfg.log_filepath(""); return 0; }