debug function

This commit is contained in:
Jean-Francois Dockes 2017-05-12 10:12:48 +02:00
parent 3277ae4ef5
commit 5863d29e49
3 changed files with 12 additions and 0 deletions

View File

@ -336,6 +336,7 @@ bool MimeHandlerExecMultiple::next_document()
m_metaData[cstr_dj_keycontent].size() <<
" bytes of content, mtype [" << m_metaData[cstr_dj_keymt] <<
"] charset [" << m_metaData[cstr_dj_keycharset] << "]\n");
LOGDEB2("MHExecMultiple: metadata: \n" << metadataAsString());
return true;
}

View File

@ -376,3 +376,13 @@ bool canIntern(const std::string mtype, RclConfig *cfg)
return true;
}
string RecollFilter::metadataAsString()
{
string s;
for (const auto& ent : m_metaData) {
if (ent.first == "content")
continue;
s += ent.first + "->" + ent.second + "\n";
}
return s;
}

View File

@ -128,6 +128,7 @@ public:
// It converts from keyorigcharset to UTF-8 and sets keycharset.
bool txtdcode(const std::string& who);
std::string metadataAsString();
protected:
// We provide default implementation as not all handlers need both methods