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.
This commit is contained in:
Antonio S. Musumeci
2026-04-18 13:47:23 -05:00
committed by trapexit
parent 981d5473ee
commit e67b7d0825
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -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
+1 -1
View File
@@ -63,7 +63,7 @@ _debug_set_output_stderr()
auto new_log_file = std::shared_ptr<FILE>(stderr,[](FILE*){});
fuse_cfg.log_file(new_log_file);
fuse_cfg.log_filepath("/dev/stderr");
fuse_cfg.log_filepath("");
return 0;
}