From 5863d29e49babdada9788c71a9087b0694ea92e0 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Fri, 12 May 2017 10:12:48 +0200 Subject: [PATCH] debug function --- src/internfile/mh_execm.cpp | 1 + src/internfile/mimehandler.cpp | 10 ++++++++++ src/internfile/mimehandler.h | 1 + 3 files changed, 12 insertions(+) diff --git a/src/internfile/mh_execm.cpp b/src/internfile/mh_execm.cpp index 7066e53a..8ac1f150 100644 --- a/src/internfile/mh_execm.cpp +++ b/src/internfile/mh_execm.cpp @@ -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; } diff --git a/src/internfile/mimehandler.cpp b/src/internfile/mimehandler.cpp index 0e726abb..e6b6c1f4 100644 --- a/src/internfile/mimehandler.cpp +++ b/src/internfile/mimehandler.cpp @@ -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; +} diff --git a/src/internfile/mimehandler.h b/src/internfile/mimehandler.h index f0ee0731..ccba1e52 100644 --- a/src/internfile/mimehandler.h +++ b/src/internfile/mimehandler.h @@ -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