diff --git a/src/backends/file/FileSyncSource.cpp b/src/backends/file/FileSyncSource.cpp index 8610c880..2c9514f9 100644 --- a/src/backends/file/FileSyncSource.cpp +++ b/src/backends/file/FileSyncSource.cpp @@ -57,6 +57,23 @@ FileSyncSource::FileSyncSource(const SyncSourceParams ¶ms, if (dataformat.empty()) { throwError(SE_HERE, "a database format must be specified"); } + std::list fields; + std::string separator; + if (m_mimeType == "text/vcard" || + m_mimeType == "text/x-vcard") { + fields.push_back("N_FIRST"); + fields.push_back("N_MIDDLE"); + fields.push_back("N_LAST"); + separator = " "; + } else if (m_mimeType == "text/calendar" || + m_mimeType == "text/x-vcalendar") { + fields.push_back("SUMMARY"); + fields.push_back("LOCATION"); + separator = ", "; + } + if (!fields.empty()) { + SyncSourceLogging::init(fields, separator, m_operations); + } } std::string FileSyncSource::getMimeType() const diff --git a/src/backends/file/FileSyncSource.h b/src/backends/file/FileSyncSource.h index a997d41a..fa5647c8 100644 --- a/src/backends/file/FileSyncSource.h +++ b/src/backends/file/FileSyncSource.h @@ -54,7 +54,7 @@ SE_BEGIN_CXX * - type=file:text/vcard:3.0 * - type=file:text/plain:1.0 */ -class FileSyncSource : public TrackingSyncSource, private boost::noncopyable +class FileSyncSource : public TrackingSyncSource, public SyncSourceLogging, private boost::noncopyable { public: FileSyncSource(const SyncSourceParams ¶ms, diff --git a/test/test-dbus.py b/test/test-dbus.py index 0341d676..db5feaac 100755 --- a/test/test-dbus.py +++ b/test/test-dbus.py @@ -8444,6 +8444,7 @@ Comparison was impossible. [INFO] @default/addressbook: started [INFO] @default/addressbook: sent 1 [INFO remote@client] @client/addressbook: started +[INFO remote@client] @client/addressbook: adding "John Doe" [INFO remote@client] @client/addressbook: received 1/1 [INFO] @default/addressbook: first time sync done successfully [INFO remote@client] @client/addressbook: first time sync done successfully @@ -8772,6 +8773,7 @@ END:VCARD END:VCARD [INFO] @default/addressbook: started [INFO] @default/addressbook: sent 1 [INFO remote@client] @client/addressbook: started +[INFO remote@client] @client/addressbook: updating "Joan Doe" [INFO remote@client] @client/addressbook: received 1/1 [INFO] @default/addressbook: normal sync done successfully [INFO remote@client] @client/addressbook: normal sync done successfully @@ -8869,6 +8871,7 @@ END:VCARD < [INFO] @default/addressbook: started [INFO] @default/addressbook: sent 1 [INFO remote@client] @client/addressbook: started +[INFO remote@client] @client/addressbook: deleting <0> [INFO remote@client] @client/addressbook: received 1/1 [INFO] @default/addressbook: normal sync done successfully [INFO remote@client] @client/addressbook: normal sync done successfully @@ -8982,6 +8985,7 @@ Comparison was impossible. [INFO] @default/calendar: started [INFO] @default/addressbook: sent 1 [INFO remote@client] @client/addressbook: started +[INFO remote@client] @client/addressbook: adding "John Doe" [INFO remote@client] @client/addressbook: received 1/1 [INFO remote@client] @client/calendar: started [INFO] @default/addressbook: first time sync done successfully @@ -9215,6 +9219,7 @@ no changes [INFO] @default/calendar: started [INFO] @default/addressbook: sent 1 [INFO remote@client] @client/addressbook: started +[INFO remote@client] @client/addressbook: updating "Joan Doe" [INFO remote@client] @client/addressbook: received 1/1 [INFO remote@client] @client/calendar: started [INFO] @default/addressbook: normal sync done successfully @@ -9337,6 +9342,7 @@ no changes [INFO] @default/calendar: started [INFO] @default/addressbook: sent 1 [INFO remote@client] @client/addressbook: started +[INFO remote@client] @client/addressbook: deleting <0> [INFO remote@client] @client/addressbook: received 1/1 [INFO remote@client] @client/calendar: started [INFO] @default/addressbook: normal sync done successfully