Skip to content

Enable and disable general openvfs logging via -d switch - #51

Merged
dragotin merged 1 commit into
mainfrom
fixDebugSwitch
Jul 22, 2026
Merged

Enable and disable general openvfs logging via -d switch#51
dragotin merged 1 commit into
mainfrom
fixDebugSwitch

Conversation

@dragotin

Copy link
Copy Markdown
Member

So far the switch was passed to the fuse library but did not influence the logging behaviour of openvfs in general.

Now there is a check if debugging is enabled in the logging function.

So far the switch was passed to the fuse library but did
not influence the logging behaviour of openvfs in general.

Now there is a check if debugging is enabled in the logging
function.
? std::format("[ pid = {} {} uuid = {}] {} {} {} {}", context->pid, getcallername(context), context->uid, action, buf, path, successCode)
: std::format("[ openvfsfuse ] {} {} {} {}", action, buf, path, successCode);
std::cout << message << std::endl;
#ifndef __APPLE__

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still log to syslog to increase the chance for a postmortem log.
Until now the -d flag only influenced the logging behavior of fuse itself. (The content of the messages in

const auto message = std::format("fuse: {} {}", context ? getcallername(context) : "", buf);
)
Maybe we should introduce a separate flag for our own logging?

Please also be aware that the logging in

const auto message = std::format("fuse: {} {}", context ? getcallername(context) : "", buf);
will be unafacted by your change.

In the current state, the overall logging requires some refinement or, to be fair, a rewrite.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Our" logging is disabled by my patch, see the early return in openvfsfuse_log.

The fuse logging function is still ok I think because it might log severe things on stdout which is routed to the clients log. The huge amount of debug-log flood is not happening if debug is not enabled in fuse.

@dragotin
dragotin merged commit 525d8c6 into main Jul 22, 2026
1 check passed
@dragotin
dragotin deleted the fixDebugSwitch branch July 22, 2026 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants