Enable and disable general openvfs logging via -d switch - #51
Conversation
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__ |
There was a problem hiding this comment.
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
openvfs/src/openvfsfuse/openvfsfuse.cpp
Line 790 in 99c3f78
Maybe we should introduce a separate flag for our own logging?
Please also be aware that the logging in
openvfs/src/openvfsfuse/openvfsfuse.cpp
Line 790 in 99c3f78
In the current state, the overall logging requires some refinement or, to be fair, a rewrite.
There was a problem hiding this comment.
"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.
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.