Improve log messages

This commit is contained in:
benrubson
2017-01-23 16:03:22 +01:00
parent 515196638a
commit 8a6317eaaf

View File

@ -729,9 +729,8 @@ static void *idleMonitor(void *_arg) {
break; break;
} }
} else { } else {
RLOG(WARNING) << "Filesystem " << arg->opts->mountPoint RLOG(WARNING) << "Filesystem inactive, but " << openCount
<< " inactive, but still " << openCount << " files opened: " << arg->opts->mountPoint;
<< " opened files";
} }
} }
@ -769,13 +768,11 @@ static bool unmountFS(EncFS_Context *ctx) {
else else
rc = system(("/sbin/umount "+std::string(arg->opts->mountPoint)).c_str()); rc = system(("/sbin/umount "+std::string(arg->opts->mountPoint)).c_str());
if (!rc) { if (!rc) {
RLOG(WARNING) << "Filesystem " << arg->opts->mountPoint RLOG(WARNING) << "Filesystem inactive, unmounted: " << arg->opts->mountPoint;
<< " inactive, unmounted";
return true; return true;
} }
else { else {
RLOG(ERROR) << "Filesystem " << arg->opts->mountPoint RLOG(ERROR) << "Filesystem inactive, but unmount failed: " << arg->opts->mountPoint;
<< " inactive, but unmount failed";
return false; return false;
} }
} }