void Command::snipForLogging(mutablebson::Document* cmdObj) const {
    StringData sensitiveField = sensitiveFieldName();
    if (!sensitiveField.empty()) {

        for (mutablebson::Element pwdElement =
                 mutablebson::findFirstChildNamed(cmdObj->root(), sensitiveField);
             pwdElement.ok();
             pwdElement =
                 mutablebson::findElementNamed(pwdElement.rightSibling(), sensitiveField)) {
            uassertStatusOK(pwdElement.setValueString("xxx"));
        }
    }
}
void Command::snipForLogging(mutablebson::Document* cmdObj) const {
    StringData sensitiveField = sensitiveFieldName();
    if (!sensitiveField.empty()) {

        for (mutablebson::Element pwdElement =
                 mutablebson::findFirstChildNamed(cmdObj->root(), sensitiveField);
             pwdElement.ok();
             pwdElement =
                 mutablebson::findElementNamed(pwdElement.rightSibling(), sensitiveField)) {
            uassertStatusOK(pwdElement.setValueString("xxx"));
        }
    }
}