// Low-level extent search debugging
shared_ptr<ostringstream> debug_oss;
+ const bool debug_oss_only_exceptions = true;
#if 0
// Enable a _lot_ of debugging output
debug_oss = make_shared<ostringstream>();
);
}
if (debug_oss) {
- BEESLOGDEBUG("debug oss trace:\n" << debug_oss->str());
+ if (!debug_oss_only_exceptions || exception_check()) {
+ BEESLOGDEBUG("debug oss trace:\n" << debug_oss->str());
+ }
}
}
BtrfsIoctlSearchKey::s_debug_ostream.reset();
// There is a lot of debug output. Dump it if it gets too long
if (!debug_oss->str().empty()) {
if (crawl_time.age() > 1) {
- BEESLOGDEBUG("debug oss trace (so far):\n" << debug_oss->str());
+ if (!debug_oss_only_exceptions) {
+ BEESLOGDEBUG("debug oss trace (so far):\n" << debug_oss->str());
+ }
debug_oss->str("");
}
}