summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2013-04-08 19:17:36 +0200
committerPatrick Ohly <patrick.ohly@intel.com>2013-05-06 16:28:13 +0200
commit4f8615ee8b75329e7d3204e57e10b48294c6998c (patch)
tree19c3946529fbf89a0aceb21d7cbeae8b20a72b31
parentb5befe6cbf450346678a9a5d79ba885be9bd5dab (diff)
Logging: eliminate _instance from SE_LOG* macros
With the _instance parameter always being NULL thanks to the previous patch, it can be removed completely.
-rw-r--r--src/backends/activesync/ActiveSyncCalendarSource.cpp22
-rw-r--r--src/backends/activesync/ActiveSyncSource.cpp16
-rw-r--r--src/backends/activesync/ActiveSyncSourceRegister.cpp2
-rw-r--r--src/backends/addressbook/AddressBookSource.cpp14
-rw-r--r--src/backends/akonadi/akonadisyncsource.cpp4
-rw-r--r--src/backends/evolution/EvolutionCalendarSource.cpp14
-rw-r--r--src/backends/evolution/EvolutionContactSource.cpp8
-rw-r--r--src/backends/evolution/EvolutionSyncSource.cpp2
-rw-r--r--src/backends/kcalextended/KCalExtendedSource.cpp4
-rw-r--r--src/backends/pbap/PbapSyncSource.cpp34
-rw-r--r--src/backends/qtcontacts/QtContactsSource.cpp4
-rw-r--r--src/backends/sqlite/SQLiteContactSource.cpp2
-rw-r--r--src/backends/webdav/CalDAVSource.cpp32
-rw-r--r--src/backends/webdav/NeonCXX.cpp48
-rw-r--r--src/backends/webdav/WebDAVSource.cpp68
-rw-r--r--src/backends/webdav/WebDAVSourceRegister.cpp10
-rw-r--r--src/client-test-app.cpp6
-rw-r--r--src/dbus/server/auto-sync-manager.cpp42
-rw-r--r--src/dbus/server/auto-term.h10
-rw-r--r--src/dbus/server/bluez-manager.cpp8
-rw-r--r--src/dbus/server/client.cpp2
-rw-r--r--src/dbus/server/connection.cpp58
-rw-r--r--src/dbus/server/connman-client.cpp6
-rw-r--r--src/dbus/server/dbus-sync.cpp8
-rw-r--r--src/dbus/server/dbus-transport-agent.cpp14
-rw-r--r--src/dbus/server/main.cpp12
-rw-r--r--src/dbus/server/network-manager-client.cpp11
-rw-r--r--src/dbus/server/notification-backend-libnotify.cpp6
-rw-r--r--src/dbus/server/pim/edsf-view.cpp24
-rw-r--r--src/dbus/server/pim/filtered-view.cpp16
-rw-r--r--src/dbus/server/pim/folks.cpp42
-rw-r--r--src/dbus/server/pim/full-view.cpp24
-rw-r--r--src/dbus/server/pim/individual-traits.cpp4
-rw-r--r--src/dbus/server/pim/locale-factory-boost.cpp5
-rw-r--r--src/dbus/server/pim/manager.cpp36
-rw-r--r--src/dbus/server/pim/merge-view.cpp18
-rw-r--r--src/dbus/server/pim/view.cpp2
-rw-r--r--src/dbus/server/presence-status.cpp6
-rw-r--r--src/dbus/server/server.cpp40
-rw-r--r--src/dbus/server/session-helper.cpp10
-rw-r--r--src/dbus/server/session.cpp26
-rw-r--r--src/dbus/server/sync-helper.cpp20
-rw-r--r--src/syncevo/Cmdline.cpp90
-rw-r--r--src/syncevo/CurlTransportAgent.cpp2
-rw-r--r--src/syncevo/ForkExec.cpp24
-rw-r--r--src/syncevo/LocalTransportAgent.cpp70
-rw-r--r--src/syncevo/LogRedirect.cpp2
-rw-r--r--src/syncevo/Logging.h51
-rw-r--r--src/syncevo/MapSyncSource.cpp10
-rw-r--r--src/syncevo/ObexTransportAgent.cpp43
-rw-r--r--src/syncevo/SoupTransportAgent.cpp4
-rw-r--r--src/syncevo/SuspendFlags.cpp22
-rw-r--r--src/syncevo/SyncConfig.cpp4
-rw-r--r--src/syncevo/SyncContext.cpp202
-rw-r--r--src/syncevo/SyncSource.cpp10
-rw-r--r--src/syncevo/SynthesisDBPlugin.cpp76
-rw-r--r--src/syncevo/TrackingSyncSource.cpp14
-rw-r--r--src/syncevo/util.cpp14
-rw-r--r--src/syncevolution.cpp54
-rw-r--r--test/ClientTest.cpp26
-rw-r--r--test/ClientTest.h2
-rw-r--r--test/ClientTestAssert.h8
-rw-r--r--test/client-test-main.cpp6
63 files changed, 730 insertions, 744 deletions
diff --git a/src/backends/activesync/ActiveSyncCalendarSource.cpp b/src/backends/activesync/ActiveSyncCalendarSource.cpp
index 613c9564..c07c9030 100644
--- a/src/backends/activesync/ActiveSyncCalendarSource.cpp
+++ b/src/backends/activesync/ActiveSyncCalendarSource.cpp
@@ -50,10 +50,10 @@ void ActiveSyncCalendarSource::beginSync(const std::string &lastToken, const std
setStartSyncKey(lastToken);
if (lastToken.empty()) {
// slow sync: wipe out cached list of IDs, will be filled anew below
- SE_LOG_DEBUG(NULL, getDisplayName(), "sync key empty, starting slow sync");
+ SE_LOG_DEBUG(getDisplayName(), "sync key empty, starting slow sync");
m_trackingNode->clear();
} else {
- SE_LOG_DEBUG(NULL, getDisplayName(), "sync key %s, starting incremental sync", lastToken.c_str());
+ SE_LOG_DEBUG(getDisplayName(), "sync key %s, starting incremental sync", lastToken.c_str());
// re-populate cache from storage, without any item data
ConfigProps props;
@@ -87,7 +87,7 @@ void ActiveSyncCalendarSource::beginSync(const std::string &lastToken, const std
}
}
if (!okay) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "unsupported or corrupt revision entry: %s = %s",
+ SE_LOG_DEBUG(getDisplayName(), "unsupported or corrupt revision entry: %s = %s",
easid.c_str(),
value.c_str());
}
@@ -150,13 +150,13 @@ void ActiveSyncCalendarSource::beginSync(const std::string &lastToken, const std
if (easid.empty()) {
throwError("empty server ID for new eas item");
}
- SE_LOG_DEBUG(NULL, getDisplayName(), "new eas item %s", easid.c_str());
+ SE_LOG_DEBUG(getDisplayName(), "new eas item %s", easid.c_str());
if (!item->data) {
throwError(StringPrintf("no body returned for new eas item %s", easid.c_str()));
}
Event &event = setItemData(easid, item->data);
BOOST_FOREACH(const std::string &subid, event.m_subids) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "new eas item %s = uid %s + rid %s",
+ SE_LOG_DEBUG(getDisplayName(), "new eas item %s = uid %s + rid %s",
easid.c_str(), event.m_uid.c_str(), subid.c_str());
addItem(createLUID(easid, subid), NEW);
}
@@ -169,13 +169,13 @@ void ActiveSyncCalendarSource::beginSync(const std::string &lastToken, const std
if (easid.empty()) {
throwError("empty server ID for updated eas item");
}
- SE_LOG_DEBUG(NULL, getDisplayName(), "updated eas item %s", easid.c_str());
+ SE_LOG_DEBUG(getDisplayName(), "updated eas item %s", easid.c_str());
if (!item->data) {
throwError(StringPrintf("no body returned for updated eas item %s", easid.c_str()));
}
Event &event = setItemData(easid, item->data);
BOOST_FOREACH(const std::string &subid, event.m_subids) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "deleted eas item %s = uid %s + rid %s",
+ SE_LOG_DEBUG(getDisplayName(), "deleted eas item %s = uid %s + rid %s",
easid.c_str(), event.m_uid.c_str(), subid.c_str());
addItem(createLUID(easid, subid), UPDATED);
}
@@ -190,10 +190,10 @@ void ActiveSyncCalendarSource::beginSync(const std::string &lastToken, const std
}
Event &event = findItem(easid);
if (event.m_subids.empty()) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "deleted eas item %s empty?!", easid.c_str());
+ SE_LOG_DEBUG(getDisplayName(), "deleted eas item %s empty?!", easid.c_str());
} else {
BOOST_FOREACH(const std::string &subid, event.m_subids) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "deleted eas item %s = uid %s + rid %s",
+ SE_LOG_DEBUG(getDisplayName(), "deleted eas item %s = uid %s + rid %s",
easid.c_str(), event.m_uid.c_str(), subid.c_str());
addItem(createLUID(easid, subid), DELETED);
}
@@ -222,7 +222,7 @@ void ActiveSyncCalendarSource::beginSync(const std::string &lastToken, const std
const std::string &easid = entry.first;
const boost::shared_ptr<Event> &eventptr = entry.second;
BOOST_FOREACH(const std::string &subid, eventptr->m_subids) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "existing eas item %s = uid %s + rid %s",
+ SE_LOG_DEBUG(getDisplayName(), "existing eas item %s = uid %s + rid %s",
easid.c_str(), eventptr->m_uid.c_str(), subid.c_str());
addItem(createLUID(easid, subid), ANY);
}
@@ -253,7 +253,7 @@ std::string ActiveSyncCalendarSource::endSync(bool success)
m_trackingNode->flush();
std::string newSyncKey = getCurrentSyncKey();
- SE_LOG_DEBUG(NULL, getDisplayName(), "next sync key %s", newSyncKey.empty() ? "empty" : newSyncKey.c_str());
+ SE_LOG_DEBUG(getDisplayName(), "next sync key %s", newSyncKey.empty() ? "empty" : newSyncKey.c_str());
return newSyncKey;
}
diff --git a/src/backends/activesync/ActiveSyncSource.cpp b/src/backends/activesync/ActiveSyncSource.cpp
index b6971f74..73966e31 100644
--- a/src/backends/activesync/ActiveSyncSource.cpp
+++ b/src/backends/activesync/ActiveSyncSource.cpp
@@ -193,7 +193,7 @@ void ActiveSyncSource::open()
// extract account ID and throw error if missing
std::string username = m_context->getSyncUsername();
std::string folder = getDatabaseID();
- SE_LOG_DEBUG(NULL, NULL,
+ SE_LOG_DEBUG(NULL,
"using eas sync account %s from config %s with folder %s",
username.c_str(),
m_context->getConfigName().c_str(),
@@ -241,10 +241,10 @@ void ActiveSyncSource::beginSync(const std::string &lastToken, const std::string
m_startSyncKey = lastToken;
if (lastToken.empty()) {
// slow sync: wipe out cached list of IDs, will be filled anew below
- SE_LOG_DEBUG(NULL, getDisplayName(), "sync key empty, starting slow sync");
+ SE_LOG_DEBUG(getDisplayName(), "sync key empty, starting slow sync");
m_ids->clear();
} else {
- SE_LOG_DEBUG(NULL, getDisplayName(), "sync key %s for account '%s' folder '%s', starting incremental sync",
+ SE_LOG_DEBUG(getDisplayName(), "sync key %s for account '%s' folder '%s', starting incremental sync",
lastToken.c_str(),
m_account.c_str(),
m_folder.c_str());
@@ -305,7 +305,7 @@ void ActiveSyncSource::beginSync(const std::string &lastToken, const std::string
if (luid.empty()) {
throwError("empty server ID for new eas item");
}
- SE_LOG_DEBUG(NULL, getDisplayName(), "new item %s", luid.c_str());
+ SE_LOG_DEBUG(getDisplayName(), "new item %s", luid.c_str());
addItem(luid, NEW);
m_ids->setProperty(luid, "1");
if (!item->data) {
@@ -321,7 +321,7 @@ void ActiveSyncSource::beginSync(const std::string &lastToken, const std::string
if (luid.empty()) {
throwError("empty server ID for updated eas item");
}
- SE_LOG_DEBUG(NULL, getDisplayName(), "updated item %s", luid.c_str());
+ SE_LOG_DEBUG(getDisplayName(), "updated item %s", luid.c_str());
addItem(luid, UPDATED);
// m_ids.setProperty(luid, "1"); not necessary, should already exist (TODO: check?!)
if (!item->data) {
@@ -337,7 +337,7 @@ void ActiveSyncSource::beginSync(const std::string &lastToken, const std::string
if (luid.empty()) {
throwError("empty server ID for deleted eas item");
}
- SE_LOG_DEBUG(NULL, getDisplayName(), "deleted item %s", luid.c_str());
+ SE_LOG_DEBUG(getDisplayName(), "deleted item %s", luid.c_str());
addItem(luid, DELETED);
m_ids->removeProperty(luid);
}
@@ -363,7 +363,7 @@ void ActiveSyncSource::beginSync(const std::string &lastToken, const std::string
m_ids->readProperties(props);
BOOST_FOREACH(const StringPair &entry, props) {
const std::string &luid = entry.first;
- SE_LOG_DEBUG(NULL, getDisplayName(), "existing item %s", luid.c_str());
+ SE_LOG_DEBUG(getDisplayName(), "existing item %s", luid.c_str());
addItem(luid, ANY);
}
@@ -386,7 +386,7 @@ std::string ActiveSyncSource::endSync(bool success)
// let engine do incremental sync next time or start from scratch
// in case of failure
std::string newSyncKey = success ? m_currentSyncKey : "";
- SE_LOG_DEBUG(NULL, getDisplayName(), "next sync key %s", newSyncKey.empty() ? "empty" : newSyncKey.c_str());
+ SE_LOG_DEBUG(getDisplayName(), "next sync key %s", newSyncKey.empty() ? "empty" : newSyncKey.c_str());
return newSyncKey;
}
diff --git a/src/backends/activesync/ActiveSyncSourceRegister.cpp b/src/backends/activesync/ActiveSyncSourceRegister.cpp
index 13e2b2ac..4036fedd 100644
--- a/src/backends/activesync/ActiveSyncSourceRegister.cpp
+++ b/src/backends/activesync/ActiveSyncSourceRegister.cpp
@@ -204,7 +204,7 @@ static TestingSyncSource *createEASSource(const ClientTestConfig::createsource_t
return res.release();
} else {
// sorry, no database
- SE_LOG_ERROR(NULL, NULL, "cannot create EAS source for database %s, check config",
+ SE_LOG_ERROR(NULL, "cannot create EAS source for database %s, check config",
res->getDatabaseID().c_str());
return NULL;
}
diff --git a/src/backends/addressbook/AddressBookSource.cpp b/src/backends/addressbook/AddressBookSource.cpp
index 91499381..2ec7295d 100644
--- a/src/backends/addressbook/AddressBookSource.cpp
+++ b/src/backends/addressbook/AddressBookSource.cpp
@@ -1230,7 +1230,7 @@ void AddressBookSource::listAllItems(RevisionMap_t &revisions)
void AddressBookSource::close()
{
if (m_addressbook && !hasFailed()) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "flushing address book");
+ SE_LOG_DEBUG(getDisplayName(), "flushing address book");
// store changes persistently
if (!ABSave(m_addressbook)) {
throwError("saving address book");
@@ -1241,7 +1241,7 @@ void AddressBookSource::close()
// sleep a bit before returning control
sleep(2);
- SE_LOG_DEBUG(NULL, getDisplayName(), "done with address book");
+ SE_LOG_DEBUG(getDisplayName(), "done with address book");
}
m_addressbook = NULL;
@@ -1272,7 +1272,7 @@ SyncItem *AddressBookSource::createItem(const string &uid, bool asVCard30)
#ifdef USE_ADDRESS_BOOK_VCARD
ref<CFDataRef> vcard(ABPersonCopyVCardRepresentation(person), "vcard");
- SE_LOG_DEBUG(NULL, getDisplayName(), "%*s", (int)CFDataGetLength(vcard), (const char *)CFDataGetBytePtr(vcard));
+ SE_LOG_DEBUG(getDisplayName(), "%*s", (int)CFDataGetLength(vcard), (const char *)CFDataGetBytePtr(vcard));
item->setData(CFDataGetBytePtr(vcard), CFDataGetLength(vcard));
#else
string vcard;
@@ -1319,7 +1319,7 @@ AddressBookSource::InsertItemResult AddressBookSource::insertItem(const string &
person.set(PersonCreateWrapper(m_addressbook), "contact");
}
try {
- SE_LOG_DEBUG(NULL, getDisplayName(), "storing vCard for %s:\n%s",
+ SE_LOG_DEBUG(getDisplayName(), "storing vCard for %s:\n%s",
update ? luid.c_str() : "new contact",
data.c_str());
vCard2ABPerson converter(data, person);
@@ -1367,7 +1367,7 @@ void AddressBookSource::deleteItem(const string &uid)
throwError(string("deleting contact ") + uid);
}
} else {
- SE_LOG_DEBUG(NULL, getDisplayName(), "%s: %s: request to delete non-existant contact ignored",
+ SE_LOG_DEBUG(getDisplayName(), "%s: %s: request to delete non-existant contact ignored",
getName(), uid.c_str());
}
}
@@ -1405,7 +1405,7 @@ void AddressBookSource::logItem(const string &uid, const string &info, bool debu
line += "): ";
line += info;
- SE_LOG(debug ? Logger::DEBUG : Logger::INFO, this, NULL, "%s", line.c_str() );
+ SE_LOG(getDisplayName(), debug ? Logger::DEBUG : Logger::INFO, "%s", line.c_str() );
}
}
@@ -1465,7 +1465,7 @@ void AddressBookSource::logItem(const SyncItem &item, const string &info, bool d
line += ": ";
line += info;
- SE_LOG(debug ? Logger::DEBUG : Logger::INFO, this, NULL, "%s", line.c_str() );
+ SE_LOG(getDisplayName(), debug ? Logger::DEBUG : Logger::INFO, "%s", line.c_str() );
}
}
diff --git a/src/backends/akonadi/akonadisyncsource.cpp b/src/backends/akonadi/akonadisyncsource.cpp
index 6db91384..6a676a38 100644
--- a/src/backends/akonadi/akonadisyncsource.cpp
+++ b/src/backends/akonadi/akonadisyncsource.cpp
@@ -86,7 +86,7 @@ void AkonadiSyncSource::start()
// Starting it here also produces output that we don't want mixed
// into normal SyncEvolution command line output.
#if 0
- SE_LOG_DEBUG(NULL, NULL, "Akonadi Server isn't running, and hence starting it.");
+ SE_LOG_DEBUG(NULL, "Akonadi Server isn't running, and hence starting it.");
if (!Akonadi::Control::start()) {
SE_THROW("Couldn't Start Akonadi Server: hence the akonadi backend of syncevolution wont work ..");
}
@@ -153,7 +153,7 @@ void AkonadiSyncSource::open()
SE_THROW("need two Akonadi resources for testing");
}
id = databases[index].m_uri;
- SE_LOG_DEBUG(NULL, NULL, "testing Akonadi with %s", id.c_str());
+ SE_LOG_DEBUG(NULL, "testing Akonadi with %s", id.c_str());
}
}
diff --git a/src/backends/evolution/EvolutionCalendarSource.cpp b/src/backends/evolution/EvolutionCalendarSource.cpp
index 0fd75ce9..f9cdf1f3 100644
--- a/src/backends/evolution/EvolutionCalendarSource.cpp
+++ b/src/backends/evolution/EvolutionCalendarSource.cpp
@@ -197,7 +197,7 @@ char *EvolutionCalendarSource::authenticate(const char *prompt,
{
std::string passwd = getPassword();
- SE_LOG_DEBUG(NULL, getDisplayName(), "authentication requested, prompt \"%s\", key \"%s\" => %s",
+ SE_LOG_DEBUG(getDisplayName(), "authentication requested, prompt \"%s\", key \"%s\" => %s",
prompt, key,
!passwd.empty() ? "returning configured password" : "no password configured");
return !passwd.empty() ? strdup(passwd.c_str()) : NULL;
@@ -501,7 +501,7 @@ EvolutionCalendarSource::InsertItemResult EvolutionCalendarSource::insertItem(co
propstart = data.find("\nCATEGORIES", propstart + 1);
}
if (modified) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "after replacing , with \\, in CATEGORIES:\n%s", data.c_str());
+ SE_LOG_DEBUG(getDisplayName(), "after replacing , with \\, in CATEGORIES:\n%s", data.c_str());
}
eptr<icalcomponent> icomp(icalcomponent_new_from_string((char *)data.c_str()));
@@ -545,7 +545,7 @@ EvolutionCalendarSource::InsertItemResult EvolutionCalendarSource::insertItem(co
const char *tzid = icaltimezone_get_tzid(zone);
if (!tzid || !tzid[0]) {
// cannot add a VTIMEZONE without TZID
- SE_LOG_DEBUG(NULL, getDisplayName(), "skipping VTIMEZONE without TZID");
+ SE_LOG_DEBUG(getDisplayName(), "skipping VTIMEZONE without TZID");
} else {
gboolean success =
#ifdef USE_EDS_CLIENT
@@ -832,7 +832,7 @@ EvolutionCalendarSource::ICalComps_t EvolutionCalendarSource::removeEvents(const
#endif
) {
if (IsCalObjNotFound(gerror)) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "%s: request to delete non-existant item ignored",
+ SE_LOG_DEBUG(getDisplayName(), "%s: request to delete non-existant item ignored",
uid.c_str());
if (!ignoreNotFound) {
throwError(STATUS_NOT_FOUND, string("delete item: ") + uid);
@@ -920,7 +920,7 @@ void EvolutionCalendarSource::removeItem(const string &luid)
;
if (!item ||
(!success && IsCalObjNotFound(gerror))) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "%s: request to delete non-existant item",
+ SE_LOG_DEBUG(getDisplayName(), "%s: request to delete non-existant item",
luid.c_str());
throwError(STATUS_NOT_FOUND, string("delete item: ") + id.getLUID());
} else if (!success) {
@@ -1034,7 +1034,7 @@ string EvolutionCalendarSource::retrieveItemAsString(const ItemID &id)
if (!icalstr) {
throwError(string("could not encode item as iCalendar: ") + id.getLUID());
} else {
- SE_LOG_DEBUG(NULL, getDisplayName(), "had to remove TZIDs because e_cal_get_component_as_string() failed for:\n%s", icalstr.get());
+ SE_LOG_DEBUG(getDisplayName(), "had to remove TZIDs because e_cal_get_component_as_string() failed for:\n%s", icalstr.get());
}
}
@@ -1066,7 +1066,7 @@ string EvolutionCalendarSource::retrieveItemAsString(const ItemID &id)
propstart = data.find("\nCATEGORIES", propstart + 1);
}
if (modified) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "after replacing \\, with , in CATEGORIES:\n%s", data.c_str());
+ SE_LOG_DEBUG(getDisplayName(), "after replacing \\, with , in CATEGORIES:\n%s", data.c_str());
}
return data;
diff --git a/src/backends/evolution/EvolutionContactSource.cpp b/src/backends/evolution/EvolutionContactSource.cpp
index e01072d3..05821055 100644
--- a/src/backends/evolution/EvolutionContactSource.cpp
+++ b/src/backends/evolution/EvolutionContactSource.cpp
@@ -222,7 +222,7 @@ void EvolutionContactSource::open()
}
while (authmethod) {
const char *method = (const char *)authmethod->data;
- SE_LOG_DEBUG(NULL, getDisplayName(), "trying authentication method \"%s\", user %s, password %s",
+ SE_LOG_DEBUG(getDisplayName(), "trying authentication method \"%s\", user %s, password %s",
method,
!user.empty() ? "configured" : "not configured",
!passwd.empty() ? "configured" : "not configured");
@@ -231,10 +231,10 @@ void EvolutionContactSource::open()
passwd.c_str(),
method,
gerror)) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "authentication succeeded");
+ SE_LOG_DEBUG(getDisplayName(), "authentication succeeded");
break;
} else {
- SE_LOG_ERROR(NULL, getDisplayName(), "authentication failed: %s", gerror->message);
+ SE_LOG_ERROR(getDisplayName(), "authentication failed: %s", gerror->message);
}
authmethod = authmethod->next;
}
@@ -361,7 +361,7 @@ void EvolutionContactSource::listAllItems(RevisionMap_t &revisions)
interesting_field_list.push_back(e_contact_field_name (E_CONTACT_REV));
e_book_client_view_set_fields_of_interest (viewPtr, interesting_field_list, gerror);
if (gerror) {
- SE_LOG_ERROR(NULL, getDisplayName(), "e_book_client_view_set_fields_of_interest: %s", (const char*)gerror);
+ SE_LOG_ERROR(getDisplayName(), "e_book_client_view_set_fields_of_interest: %s", (const char*)gerror);
gerror.clear();
}
diff --git a/src/backends/evolution/EvolutionSyncSource.cpp b/src/backends/evolution/EvolutionSyncSource.cpp
index ea814f80..e39a5302 100644
--- a/src/backends/evolution/EvolutionSyncSource.cpp
+++ b/src/backends/evolution/EvolutionSyncSource.cpp
@@ -47,7 +47,7 @@ void EvolutionSyncSource::getDatabasesFromRegistry(SyncSource::Databases &result
static void handleErrorCB(EClient */*client*/, const gchar *error_msg, gpointer user_data)
{
EvolutionSyncSource *that = static_cast<EvolutionSyncSource *>(user_data);
- SE_LOG_ERROR(NULL, that->getDisplayName(), "%s", error_msg);
+ SE_LOG_ERROR(that->getDisplayName(), "%s", error_msg);
}
EClientCXX EvolutionSyncSource::openESource(const char *extension,
diff --git a/src/backends/kcalextended/KCalExtendedSource.cpp b/src/backends/kcalextended/KCalExtendedSource.cpp
index 0e3cbebd..bffe120b 100644
--- a/src/backends/kcalextended/KCalExtendedSource.cpp
+++ b/src/backends/kcalextended/KCalExtendedSource.cpp
@@ -98,7 +98,7 @@ public:
{
foreach (KCalCore::Incidence::Ptr incidence, incidences) {
if (incidence->type() == m_type) {
- SE_LOG_DEBUG(NULL, NULL, "item %s %s",
+ SE_LOG_DEBUG(NULL, "item %s %s",
getItemID(incidence).getLUID().c_str(),
state == SyncSourceChanges::ANY ? "exists" :
state == SyncSourceChanges::NEW ? "is new" :
@@ -421,7 +421,7 @@ void KCalExtendedSource::beginSync(const std::string &lastToken, const std::stri
// }
m_data->extractIncidences(incidences, SyncSourceChanges::ANY, *this);
if (*anchor) {
- SE_LOG_DEBUG(NULL, NULL, "checking for changes since %s UTC", anchor);
+ SE_LOG_DEBUG(NULL, "checking for changes since %s UTC", anchor);
KDateTime endSyncTime(QDateTime::fromString(QString(anchor), Qt::ISODate), KDateTime::Spec::UTC());
KCalCore::Incidence::List added, modified, deleted;
if (!m_data->m_storage->insertedIncidences(&added, endSyncTime, m_data->m_notebookUID)) {
diff --git a/src/backends/pbap/PbapSyncSource.cpp b/src/backends/pbap/PbapSyncSource.cpp
index 2fd4aea8..b2e071c4 100644
--- a/src/backends/pbap/PbapSyncSource.cpp
+++ b/src/backends/pbap/PbapSyncSource.cpp
@@ -154,10 +154,10 @@ void PbapSession::propChangedCb(const GDBusCXX::Path_t &path,
Params::const_iterator it = changed.find("Status");
if (it != changed.end()) {
std::string status = boost::get<std::string>(it->second);
- SE_LOG_DEBUG(NULL, NULL, "OBEXD transfer %s: %s",
+ SE_LOG_DEBUG(NULL, "OBEXD transfer %s: %s",
path.c_str(), status.c_str());
if (status == "complete") {
- SE_LOG_DEBUG(NULL, NULL, "obexd transfer completed");
+ SE_LOG_DEBUG(NULL, "obexd transfer completed");
m_transferComplete = true;
} else if (status == "error") {
m_transferComplete = true;
@@ -171,7 +171,7 @@ void PbapSession::propChangedCb(const GDBusCXX::Path_t &path,
void PbapSession::completeCb(const GDBusCXX::Path_t &path)
{
- SE_LOG_DEBUG(NULL, NULL, "obexd transfer %s completed", path.c_str());
+ SE_LOG_DEBUG(NULL, "obexd transfer %s completed", path.c_str());
m_transferComplete = true;
}
@@ -179,7 +179,7 @@ void PbapSession::errorCb(const GDBusCXX::Path_t &path,
const std::string &error,
const std::string &msg)
{
- SE_LOG_DEBUG(NULL, NULL, "obexd transfer %s failed: %s %s",
+ SE_LOG_DEBUG(NULL, "obexd transfer %s failed: %s %s",
path.c_str(), error.c_str(), msg.c_str());
m_transferComplete = true;
m_transferErrorCode = error;
@@ -233,7 +233,7 @@ void PbapSession::initSession(const std::string &address, const std::string &for
OBC_CLIENT_INTERFACE_NEW5,
OBC_SERVICE_NEW5, true));
try {
- SE_LOG_DEBUG(NULL, NULL, "trying to use bluez 5 obexd service %s", OBC_SERVICE_NEW5);
+ SE_LOG_DEBUG(NULL, "trying to use bluez 5 obexd service %s", OBC_SERVICE_NEW5);
session =
GDBusCXX::DBusClientCall1<GDBusCXX::DBusObject_t>(*m_client, "CreateSession")(address, params);
} catch (const std::exception &error) {
@@ -241,7 +241,7 @@ void PbapSession::initSession(const std::string &address, const std::string &for
throw;
}
// Fall back to old interface.
- SE_LOG_DEBUG(NULL, NULL, "bluez obex service not available (%s), falling back to previous obexd one %s",
+ SE_LOG_DEBUG(NULL, "bluez obex service not available (%s), falling back to previous obexd one %s",
error.what(),
OBC_SERVICE_NEW);
m_obexAPI = OBEXD_NEW;
@@ -251,7 +251,7 @@ void PbapSession::initSession(const std::string &address, const std::string &for
m_client.reset(new GDBusCXX::DBusRemoteObject(conn, "/", OBC_CLIENT_INTERFACE_NEW,
OBC_SERVICE_NEW, true));
try {
- SE_LOG_DEBUG(NULL, NULL, "trying to use new obexd service %s", OBC_SERVICE_NEW);
+ SE_LOG_DEBUG(NULL, "trying to use new obexd service %s", OBC_SERVICE_NEW);
session =
GDBusCXX::DBusClientCall1<GDBusCXX::DBusObject_t>(*m_client, "CreateSession")(address, params);
} catch (const std::exception &error) {
@@ -259,7 +259,7 @@ void PbapSession::initSession(const std::string &address, const std::string &for
throw;
}
// Fall back to old interface.
- SE_LOG_DEBUG(NULL, NULL, "new obexd service(s) not available (%s), falling back to old one %s",
+ SE_LOG_DEBUG(NULL, "new obexd service(s) not available (%s), falling back to old one %s",
error.what(),
OBC_SERVICE);
m_obexAPI = OBEXD_OLD;
@@ -330,12 +330,12 @@ void PbapSession::initSession(const std::string &address, const std::string &for
true));
}
- SE_LOG_DEBUG(NULL, NULL, "PBAP session created: %s", m_session->getPath());
+ SE_LOG_DEBUG(NULL, "PBAP session created: %s", m_session->getPath());
// get filter list so that we can continue validating our format specifier
std::vector<std::string> filterFields =
GDBusCXX::DBusClientCall1< std::vector<std::string> >(*m_session, "ListFilterFields")();
- SE_LOG_DEBUG(NULL, NULL, "supported PBAP filter fields:\n %s",
+ SE_LOG_DEBUG(NULL, "supported PBAP filter fields:\n %s",
boost::join(filterFields, "\n ").c_str());
std::list<std::string> filter;
@@ -377,7 +377,7 @@ void PbapSession::initSession(const std::string &address, const std::string &for
GDBusCXX::DBusClientCall0(*m_session, "SetFormat")(std::string(version == "2.1" ? "vcard21" : "vcard30"));
}
- SE_LOG_DEBUG(NULL, NULL, "PBAP session initialized");
+ SE_LOG_DEBUG(NULL, "PBAP session initialized");
}
void PbapSession::pullAll(Content &dst, std::string &buffer, TmpFile &tmpFile)
@@ -385,7 +385,7 @@ void PbapSession::pullAll(Content &dst, std::string &buffer, TmpFile &tmpFile)
pcrecpp::StringPiece content;
if (m_obexAPI != OBEXD_OLD) {
tmpFile.create();
- SE_LOG_DEBUG(NULL, NULL, "Created temporary file for PullAll %s", tmpFile.filename().c_str());
+ SE_LOG_DEBUG(NULL, "Created temporary file for PullAll %s", tmpFile.filename().c_str());
GDBusCXX::DBusClientCall1<std::pair<GDBusCXX::DBusObject_t, Params> > pullall(*m_session, "PullAll");
std::pair<GDBusCXX::DBusObject_t, Params> tuple =
m_obexAPI == BLUEZ5 ?
@@ -394,7 +394,7 @@ void PbapSession::pullAll(Content &dst, std::string &buffer, TmpFile &tmpFile)
const GDBusCXX::DBusObject_t &transfer = tuple.first;
const Params &properties = tuple.second;
- SE_LOG_DEBUG(NULL, NULL, "pullall transfer path %s, %ld properties", transfer.c_str(), (long)properties.size());
+ SE_LOG_DEBUG(NULL, "pullall transfer path %s, %ld properties", transfer.c_str(), (long)properties.size());
while (!m_transferComplete) {
g_main_context_iteration(NULL, true);
@@ -405,7 +405,7 @@ void PbapSession::pullAll(Content &dst, std::string &buffer, TmpFile &tmpFile)
m_transferErrorMsg.c_str()));
}
- SE_LOG_DEBUG(NULL, NULL, "Temporary file size is %u", static_cast<unsigned> (tmpFile.size()));
+ SE_LOG_DEBUG(NULL, "Temporary file size is %u", static_cast<unsigned> (tmpFile.size()));
content = tmpFile.stringPiece();
// closing tmp file leaves the mapping
@@ -426,7 +426,7 @@ void PbapSession::pullAll(Content &dst, std::string &buffer, TmpFile &tmpFile)
++count;
}
- SE_LOG_DEBUG(NULL, NULL, "PBAP content pulled: %d entries", (int) dst.size());
+ SE_LOG_DEBUG(NULL, "PBAP content pulled: %d entries", (int) dst.size());
}
void PbapSession::shutdown(void)
@@ -436,11 +436,11 @@ void PbapSession::shutdown(void)
// always clear pointer, even if method call fails
GDBusCXX::DBusObject_t path(m_session->getPath());
//m_session.reset();
- SE_LOG_DEBUG(NULL, NULL, "removed session: %s", path.c_str());
+ SE_LOG_DEBUG(NULL, "removed session: %s", path.c_str());
removeSession(path);
- SE_LOG_DEBUG(NULL, NULL, "PBAP session closed");
+ SE_LOG_DEBUG(NULL, "PBAP session closed");
}
PbapSyncSource::PbapSyncSource(const SyncSourceParams &params) :
diff --git a/src/backends/qtcontacts/QtContactsSource.cpp b/src/backends/qtcontacts/QtContactsSource.cpp
index 2b94cfd5..84e80ad5 100644
--- a/src/backends/qtcontacts/QtContactsSource.cpp
+++ b/src/backends/qtcontacts/QtContactsSource.cpp
@@ -391,7 +391,7 @@ void QtContactsSource::open()
{
QString buffer;
QDebug(&buffer) << "available managers (default one first): " << QContactManager::availableManagers();
- SE_LOG_DEBUG(NULL, NULL, buffer.toUtf8().data());
+ SE_LOG_DEBUG(NULL, buffer.toUtf8().data());
string id = getDatabaseID();
m_data = new QtContactsData(this, id.c_str());
@@ -405,7 +405,7 @@ void QtContactsSource::open()
buffer = "";
QDebug(&buffer) << manager->managerUri() << " manager supports contact types: " << manager->supportedContactTypes() <<
" and data types: " << manager->supportedDataTypes();
- SE_LOG_DEBUG(NULL, NULL, buffer.toUtf8().data());
+ SE_LOG_DEBUG(NULL, buffer.toUtf8().data());
m_data->m_manager = manager;
}
diff --git a/src/backends/sqlite/SQLiteContactSource.cpp b/src/backends/sqlite/SQLiteContactSource.cpp
index dcee3de4..c20f02b2 100644
--- a/src/backends/sqlite/SQLiteContactSource.cpp
+++ b/src/backends/sqlite/SQLiteContactSource.cpp
@@ -251,7 +251,7 @@ sysync::TSyError SQLiteContactSource::readItemAsKey(sysync::cItemID aID, sysync:
string value = m_sqlite.getTextColumn(contact, map.colindex);
sysync::TSyError res = getSynthesisAPI()->setValue(aItemKey, field, value.c_str(), value.size());
if (res != sysync::LOCERR_OK) {
- SE_LOG_WARNING (NULL, NULL, "SQLite backend: set field %s value %s failed", field.c_str(), value.c_str());
+ SE_LOG_WARNING(getDisplayName(), "SQLite backend: set field %s value %s failed", field.c_str(), value.c_str());
}
}
}
diff --git a/src/backends/webdav/CalDAVSource.cpp b/src/backends/webdav/CalDAVSource.cpp
index cfa226d6..851224f2 100644
--- a/src/backends/webdav/CalDAVSource.cpp
+++ b/src/backends/webdav/CalDAVSource.cpp
@@ -188,7 +188,7 @@ void CalDAVSource::updateAllSubItems(SubRevisionMap_t &revisions)
if (it == revisions.end() ||
it->second.m_revision != item.second) {
// read current information below
- SE_LOG_DEBUG(NULL, NULL, "updateAllSubItems(): read new or modified item %s", item.first.c_str());
+ SE_LOG_DEBUG(NULL, "updateAllSubItems(): read new or modified item %s", item.first.c_str());
mustRead.push_back(item.first);
// The server told us that the item exists. We still need
// to deal with the situation that the server might fail
@@ -210,7 +210,7 @@ void CalDAVSource::updateAllSubItems(SubRevisionMap_t &revisions)
m_cache.erase(item.first);
} else {
// copy still relevant information
- SE_LOG_DEBUG(NULL, NULL, "updateAllSubItems(): unmodified item %s", it->first.c_str());
+ SE_LOG_DEBUG(NULL, "updateAllSubItems(): unmodified item %s", it->first.c_str());
addSubItem(it->first, it->second);
}
}
@@ -343,7 +343,7 @@ int CalDAVSource::appendItem(SubRevisionMap_t &revisions,
// after using it for a while. Deleting them via DELETE doesn't seem
// to have an effect either, so all we really can do is ignore them.
if (entry.m_subids.empty()) {
- SE_LOG_DEBUG(NULL, NULL, "ignoring broken item %s (is empty)", davLUID.c_str());
+ SE_LOG_DEBUG(NULL, "ignoring broken item %s (is empty)", davLUID.c_str());
revisions.erase(davLUID);
m_cache.erase(davLUID);
data.clear();
@@ -513,7 +513,7 @@ SubSyncSource::SubItemResult CalDAVSource::insertSubItem(const std::string &luid
Event::escapeRecurrenceID(buffer);
data = &buffer;
}
- SE_LOG_DEBUG(NULL, getDisplayName(), "inserting new VEVENT");
+ SE_LOG_DEBUG(getDisplayName(), "inserting new VEVENT");
res = insertItem(name, *data, true);
subres.m_mainid = res.m_luid;
subres.m_uid = newEvent->m_UID;
@@ -578,7 +578,7 @@ SubSyncSource::SubItemResult CalDAVSource::insertSubItem(const std::string &luid
if (mangleRecurrenceID) {
Event::escapeRecurrenceID(buffer);
}
- SE_LOG_DEBUG(NULL, NULL, "resending VEVENT to get rid of VALARM");
+ SE_LOG_DEBUG(NULL, "resending VEVENT to get rid of VALARM");
res = insertItem(name, *data, true);
newEvent->m_etag =
subres.m_revision = res.m_revision;
@@ -720,7 +720,7 @@ SubSyncSource::SubItemResult CalDAVSource::insertSubItem(const std::string &luid
// TODO: avoid updating item on server immediately?
try {
- SE_LOG_DEBUG(NULL, getDisplayName(), "updating VEVENT");
+ SE_LOG_DEBUG(getDisplayName(), "updating VEVENT");
InsertItemResult res = insertItem(event.m_DAVluid, data, true);
if (res.m_state != ITEM_OKAY ||
res.m_luid != event.m_DAVluid) {
@@ -749,14 +749,14 @@ SubSyncSource::SubItemResult CalDAVSource::insertSubItem(const std::string &luid
// a detached recurrence had to be added to an existing meeting
// series. Ignoring the problem means would keep the detached
// recurrence out of the server permanently.
- SE_LOG_INFO(NULL, getDisplayName(), "%s: not updated because CalDAV server refused write access for it",
+ SE_LOG_INFO(getDisplayName(), "%s: not updated because CalDAV server refused write access for it",
getSubDescription(event, subid).c_str());
subres.m_merged = true;
subres.m_revision = event.m_etag;
#endif
} else if (ex.syncMLStatus() == 409 &&
strstr(ex.what(), "Can only store an event with a newer DTSTAMP")) {
- SE_LOG_DEBUG(NULL, NULL, "resending VEVENT with updated SEQUENCE/LAST-MODIFIED/DTSTAMP to work around 409");
+ SE_LOG_DEBUG(NULL, "resending VEVENT with updated SEQUENCE/LAST-MODIFIED/DTSTAMP to work around 409");
// Sometimes a PUT of two linked events updates one of them on the server
// (visible in modified SEQUENCE and LAST-MODIFIED values) and then
@@ -913,7 +913,7 @@ std::string CalDAVSource::removeSubItem(const string &davLUID, const std::string
if (event.m_subids.size() == 1) {
// remove entire merged item, nothing will be left after removal
if (*event.m_subids.begin() != subid) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "%s: request to remove the %s recurrence: only the %s recurrence exists",
+ SE_LOG_DEBUG(getDisplayName(), "%s: request to remove the %s recurrence: only the %s recurrence exists",
davLUID.c_str(),
SubIDName(subid).c_str(),
SubIDName(*event.m_subids.begin()).c_str());
@@ -945,7 +945,7 @@ std::string CalDAVSource::removeSubItem(const string &davLUID, const std::string
}
}
if (updated) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "Google recurring event delete hack: remove RRULE before deleting");
+ SE_LOG_DEBUG(getDisplayName(), "Google recurring event delete hack: remove RRULE before deleting");
eptr<char> icalstr(ical_strdup(icalcomponent_as_ical_string(event.m_calendar)));
insertSubItem(davLUID, subid, icalstr.get());
// It has been observed that trying the DELETE immediately
@@ -956,13 +956,13 @@ std::string CalDAVSource::removeSubItem(const string &davLUID, const std::string
// try a few times before giving up.
for (int retry = 0; retry < 5; retry++) {
try {
- SE_LOG_DEBUG(NULL, getDisplayName(), "Google recurring event delete hack: remove event, attempt #%d", retry);
+ SE_LOG_DEBUG(getDisplayName(), "Google recurring event delete hack: remove event, attempt #%d", retry);
removeSubItem(davLUID, subid);
break;
} catch (const TransportStatusException &ex2) {
if (ex2.syncMLStatus() == 409 &&
strstr(ex2.what(), "Can't delete a recurring event")) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "Google recurring event delete hack: try again in a second");
+ SE_LOG_DEBUG(getDisplayName(), "Google recurring event delete hack: try again in a second");
Sleep(1);
} else {
throw;
@@ -970,7 +970,7 @@ std::string CalDAVSource::removeSubItem(const string &davLUID, const std::string
}
}
} else {
- SE_LOG_DEBUG(NULL, getDisplayName(), "Google recurring event delete hack not applicable, giving up");
+ SE_LOG_DEBUG(getDisplayName(), "Google recurring event delete hack not applicable, giving up");
throw;
}
} else {
@@ -1031,7 +1031,7 @@ void CalDAVSource::removeMergedItem(const std::string &davLUID)
EventCache::iterator it = m_cache.find(davLUID);
if (it == m_cache.end()) {
// gone already, no need to do anything
- SE_LOG_DEBUG(NULL, getDisplayName(), "%s: ignoring request to delete non-existent item",
+ SE_LOG_DEBUG(getDisplayName(), "%s: ignoring request to delete non-existent item",
davLUID.c_str());
return;
}
@@ -1144,7 +1144,7 @@ int CalDAVSource::storeItem(const std::string &wantedLuid,
{
std::string luid = path2luid(Neon::URI::parse(href).m_path);
if (luid == wantedLuid) {
- SE_LOG_DEBUG(NULL, NULL, "got item %s via REPORT fallback", luid.c_str());
+ SE_LOG_DEBUG(NULL, "got item %s via REPORT fallback", luid.c_str());
item = data;
}
data.clear();
@@ -1473,7 +1473,7 @@ int CalDAVSource::backupItem(ItemCache &cache,
std::string rev = ETag2Rev(etag);
cache.backupItem(data, luid, rev);
} else {
- SE_LOG_DEBUG(NULL, NULL, "ignoring broken item %s during backup (is empty)", href.c_str());
+ SE_LOG_DEBUG(NULL, "ignoring broken item %s during backup (is empty)", href.c_str());
}
// reset data for next item
diff --git a/src/backends/webdav/NeonCXX.cpp b/src/backends/webdav/NeonCXX.cpp
index 5092af21..574de237 100644
--- a/src/backends/webdav/NeonCXX.cpp
+++ b/src/backends/webdav/NeonCXX.cpp
@@ -225,11 +225,11 @@ Session::Session(const boost::shared_ptr<Settings> &settings) :
// hack for Yahoo: need a client certificate
ne_ssl_client_cert *cert = ne_ssl_clicert_read("client.p12");
- SE_LOG_DEBUG(NULL, NULL, "client cert is %s", !cert ? "missing" : ne_ssl_clicert_encrypted(cert) ? "encrypted" : "unencrypted");
+ SE_LOG_DEBUG(NULL, "client cert is %s", !cert ? "missing" : ne_ssl_clicert_encrypted(cert) ? "encrypted" : "unencrypted");
if (cert) {
if (ne_ssl_clicert_encrypted(cert)) {
if (ne_ssl_clicert_decrypt(cert, "meego")) {
- SE_LOG_DEBUG(NULL, NULL, "decryption failed");
+ SE_LOG_DEBUG(NULL, "decryption failed");
}
}
ne_ssl_set_clicert(m_session, cert);
@@ -301,7 +301,7 @@ int Session::getCredentials(void *userdata, const char *realm, int attempt, char
SyncEvo::Strncpy(username, user.c_str(), NE_ABUFSIZ);
SyncEvo::Strncpy(password, pw.c_str(), NE_ABUFSIZ);
session->m_credentialsSent = true;
- SE_LOG_DEBUG(NULL, NULL, "retry request with credentials");
+ SE_LOG_DEBUG(NULL, "retry request with credentials");
return 0;
} else {
// give up
@@ -309,7 +309,7 @@ int Session::getCredentials(void *userdata, const char *realm, int attempt, char
}
} catch (...) {
Exception::handle();
- SE_LOG_ERROR(NULL, NULL, "no credentials for %s", realm);
+ SE_LOG_ERROR(NULL, "no credentials for %s", realm);
return 1;
}
}
@@ -352,9 +352,9 @@ void Session::preSend(ne_request *req, ne_buffer *header)
// check for acceptance of credentials later
m_credentialsSent = true;
- SE_LOG_DEBUG(NULL, NULL, "forced sending credentials");
+ SE_LOG_DEBUG(NULL, "forced sending credentials");
} else {
- SE_LOG_DEBUG(NULL, NULL, "skipping forced sending credentials because not using https");
+ SE_LOG_DEBUG(NULL, "skipping forced sending credentials because not using https");
}
}
}
@@ -373,17 +373,17 @@ int Session::sslVerify(void *userdata, int failures, const ne_ssl_certificate *c
{ 0, NULL }
};
- SE_LOG_DEBUG(NULL, NULL,
+ SE_LOG_DEBUG(NULL,
"%s: SSL verification problem: %s",
session->getURL().c_str(),
Flags2String(failures, descr).c_str());
if (!session->m_settings->verifySSLCertificate()) {
- SE_LOG_DEBUG(NULL, NULL, "ignoring bad certificate");
+ SE_LOG_DEBUG(NULL, "ignoring bad certificate");
return 0;
}
if (failures == NE_SSL_IDMISMATCH &&
!session->m_settings->verifySSLHost()) {
- SE_LOG_DEBUG(NULL, NULL, "ignoring hostname mismatch");
+ SE_LOG_DEBUG(NULL, "ignoring hostname mismatch");
return 0;
}
return 1;
@@ -487,7 +487,7 @@ int Session::propIterator(void *userdata,
void Session::startOperation(const string &operation, const Timespec &deadline)
{
- SE_LOG_DEBUG(NULL, NULL, "starting %s, credentials %s, %s",
+ SE_LOG_DEBUG(NULL, "starting %s, credentials %s, %s",
operation.c_str(),
m_settings->getCredentialsOkay() ? "okay" : "unverified",
deadline ? StringPrintf("deadline in %.1lfs",
@@ -597,7 +597,7 @@ bool Session::checkError(int error, int code, const ne_status *status, const str
// assume that credentials were valid, if sent
if (m_credentialsSent) {
- SE_LOG_DEBUG(NULL, NULL, "credentials accepted");
+ SE_LOG_DEBUG(NULL, "credentials accepted");
m_settings->setCredentialsOkay(true);
}
@@ -638,23 +638,23 @@ bool Session::checkError(int error, int code, const ne_status *status, const str
if (code == 401) {
if (m_settings->getCredentialsOkay()) {
- SE_LOG_DEBUG(NULL, NULL, "credential error due to throttling (?), retry");
+ SE_LOG_DEBUG(NULL, "credential error due to throttling (?), retry");
retry = true;
} else {
// give up without retrying
- SE_LOG_DEBUG(NULL, NULL, "credential error, no success with them before => report it");
+ SE_LOG_DEBUG(NULL, "credential error, no success with them before => report it");
}
}
- SE_LOG_DEBUG(NULL, NULL, "%s, %s",
+ SE_LOG_DEBUG(NULL, "%s, %s",
descr.c_str(),
retry ? "might retry" : "must not retry");
if (retry) {
m_attempt++;
if (!m_deadline) {
- SE_LOG_DEBUG(NULL, NULL, "retrying not allowed for %s (no deadline)",
+ SE_LOG_DEBUG(NULL, "retrying not allowed for %s (no deadline)",
operation.c_str());
} else {
Timespec now = Timespec::monotonic();
@@ -675,25 +675,25 @@ bool Session::checkError(int error, int code, const ne_status *status, const str
}
if (next > now) {
double duration = (next - now).duration();
- SE_LOG_DEBUG(NULL, NULL, "retry %s in %.1lfs, attempt #%d",
+ SE_LOG_DEBUG(NULL, "retry %s in %.1lfs, attempt #%d",
operation.c_str(),
duration,
m_attempt);
// Inform the user, because this will take a
// while and we don't want to give the
// impression of being stuck.
- SE_LOG_INFO(NULL, NULL, "operation temporarily (?) failed, going to retry in %.1lfs before giving up in %.1lfs: %s",
+ SE_LOG_INFO(NULL, "operation temporarily (?) failed, going to retry in %.1lfs before giving up in %.1lfs: %s",
duration,
(m_deadline - now).duration(),
descr.c_str());
Sleep(duration);
} else {
- SE_LOG_DEBUG(NULL, NULL, "retry %s immediately (due already), attempt #%d",
+ SE_LOG_DEBUG(NULL, "retry %s immediately (due already), attempt #%d",
operation.c_str(),
m_attempt);
}
} else {
- SE_LOG_DEBUG(NULL, NULL, "retry %s immediately (retry interval <= 0), attempt #%d",
+ SE_LOG_DEBUG(NULL, "retry %s immediately (retry interval <= 0), attempt #%d",
operation.c_str(),
m_attempt);
}
@@ -704,7 +704,7 @@ bool Session::checkError(int error, int code, const ne_status *status, const str
return false;
}
} else {
- SE_LOG_DEBUG(NULL, NULL, "retry %s would exceed deadline, bailing out",
+ SE_LOG_DEBUG(NULL, "retry %s would exceed deadline, bailing out",
m_operation.c_str());
}
}
@@ -712,7 +712,7 @@ bool Session::checkError(int error, int code, const ne_status *status, const str
if (code == 401) {
// fatal credential error, remember that
- SE_LOG_DEBUG(NULL, NULL, "credentials rejected");
+ SE_LOG_DEBUG(NULL, "credentials rejected");
m_settings->setCredentialsOkay(false);
}
@@ -758,7 +758,7 @@ int XMLParser::startCB(void *userdata, int parent,
return cb->m_start(parent, nspace, name, atts);
} catch (...) {
Exception::handle();
- SE_LOG_ERROR(NULL, NULL, "startCB %s %s failed", nspace, name);
+ SE_LOG_ERROR(NULL, "startCB %s %s failed", nspace, name);
return -1;
}
}
@@ -773,7 +773,7 @@ int XMLParser::dataCB(void *userdata, int state,
0;
} catch (...) {
Exception::handle();
- SE_LOG_ERROR(NULL, NULL, "dataCB failed");
+ SE_LOG_ERROR(NULL, "dataCB failed");
return -1;
}
}
@@ -788,7 +788,7 @@ int XMLParser::endCB(void *userdata, int state,
0;
} catch (...) {
Exception::handle();
- SE_LOG_ERROR(NULL, NULL, "endCB %s %s failed", nspace, name);
+ SE_LOG_ERROR(NULL, "endCB %s %s failed", nspace, name);
return -1;
}
}
diff --git a/src/backends/webdav/WebDAVSource.cpp b/src/backends/webdav/WebDAVSource.cpp
index 3ff90f8a..fcede1a4 100644
--- a/src/backends/webdav/WebDAVSource.cpp
+++ b/src/backends/webdav/WebDAVSource.cpp
@@ -494,7 +494,7 @@ void WebDAVSource::contactServer()
// we have done this work before, no need to repeat it
}
- SE_LOG_DEBUG(NULL, NULL, "using libneon %s with %s",
+ SE_LOG_DEBUG(NULL, "using libneon %s with %s",
ne_version_string(), Neon::features().c_str());
// Can we skip auto-detection because a full resource URL is set?
@@ -521,7 +521,7 @@ void WebDAVSource::contactServer()
if (m_calendar.empty()) {
throwError("no database found");
}
- SE_LOG_DEBUG(NULL, NULL, "picked final path %s", m_calendar.m_path.c_str());
+ SE_LOG_DEBUG(NULL, "picked final path %s", m_calendar.m_path.c_str());
// Check some server capabilities. Purely informational at this
// point, doesn't have to succeed either (Google 401 throttling
@@ -529,7 +529,7 @@ void WebDAVSource::contactServer()
#ifdef HAVE_LIBNEON_OPTIONS
if (LoggerBase::instance().getLevel() >= Logger::DEV) {
try {
- SE_LOG_DEBUG(NULL, NULL, "read capabilities of %s", m_calendar.toURL().c_str());
+ SE_LOG_DEBUG(NULL, "read capabilities of %s", m_calendar.toURL().c_str());
m_session->startOperation("OPTIONS", Timespec());
int caps = m_session->options(m_calendar.m_path);
static const Flag descr[] = {
@@ -551,7 +551,7 @@ void WebDAVSource::contactServer()
{ NE_CAP_VC_COLLECTION, "DeltaV version-controlled-collection" },
{ 0, NULL }
};
- SE_LOG_DEBUG(NULL, NULL, "%s WebDAV capabilities: %s",
+ SE_LOG_DEBUG(NULL, "%s WebDAV capabilities: %s",
m_session->getURL().c_str(),
Flags2String(caps, descr).c_str());
} catch (...) {
@@ -567,7 +567,7 @@ bool WebDAVSource::findCollections(const boost::function<bool (const std::string
bool res = true; // completed
int timeoutSeconds = m_settings->timeoutSeconds();
int retrySeconds = m_settings->retrySeconds();
- SE_LOG_DEBUG(NULL, getDisplayName(), "timout %ds, retry %ds => %s",
+ SE_LOG_DEBUG(getDisplayName(), "timout %ds, retry %ds => %s",
timeoutSeconds, retrySeconds,
(timeoutSeconds <= 0 ||
retrySeconds <= 0) ? "resending disabled" : "resending allowed");
@@ -612,7 +612,7 @@ bool WebDAVSource::findCollections(const boost::function<bool (const std::string
}
buffer[read] = 0;
m_contextSettings->setURL(buffer);
- SE_LOG_DEBUG(NULL, getDisplayName(), "found syncURL '%s' via DNS SRV", buffer);
+ SE_LOG_DEBUG(getDisplayName(), "found syncURL '%s' via DNS SRV", buffer);
int res = pclose(in);
in = NULL;
switch (res) {
@@ -629,12 +629,12 @@ bool WebDAVSource::findCollections(const boost::function<bool (const std::string
if (retrySeconds > 0 &&
timeoutSeconds > 0) {
if (now < startTime + timeoutSeconds) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "DNS SRV search failed due to network issues, retry in %d seconds",
+ SE_LOG_DEBUG(getDisplayName(), "DNS SRV search failed due to network issues, retry in %d seconds",
retrySeconds);
Sleep(retrySeconds);
goto retry;
} else {
- SE_LOG_INFO(NULL, getDisplayName(), "DNS SRV search timed out after %d seconds", timeoutSeconds);
+ SE_LOG_INFO(getDisplayName(), "DNS SRV search timed out after %d seconds", timeoutSeconds);
}
}
@@ -767,7 +767,7 @@ bool WebDAVSource::findCollections(const boost::function<bool (const std::string
// must normalize so that we can compare against results from server
path = tried.insert(path);
- SE_LOG_DEBUG(NULL, NULL, "testing %s", path.c_str());
+ SE_LOG_DEBUG(NULL, "testing %s", path.c_str());
// Accessing the well-known URIs should lead to a redirect, but
// with Yahoo! Calendar all I got was a 502 "connection refused".
@@ -803,7 +803,7 @@ bool WebDAVSource::findCollections(const boost::function<bool (const std::string
// properties which must be asked for explicitly!). Only
// relevant for debugging.
try {
- SE_LOG_DEBUG(NULL, NULL, "debugging: read all WebDAV properties of %s", path.c_str());
+ SE_LOG_DEBUG(NULL, "debugging: read all WebDAV properties of %s", path.c_str());
Neon::Session::PropfindPropCallback_t callback =
boost::bind(&WebDAVSource::openPropCallback,
this, _1, _2, _3, _4);
@@ -886,7 +886,7 @@ bool WebDAVSource::findCollections(const boost::function<bool (const std::string
{ "urn:ietf:params:xml:ns:carddav", "max-resource-size" },
{ NULL, NULL }
};
- SE_LOG_DEBUG(NULL, NULL, "read relevant properties of %s", path.c_str());
+ SE_LOG_DEBUG(NULL, "read relevant properties of %s", path.c_str());
m_session->propfindProp(path, 0,
getContent() == "VCARD" ? carddav : caldav,
callback, deadline);
@@ -908,23 +908,23 @@ bool WebDAVSource::findCollections(const boost::function<bool (const std::string
if (next.m_scheme != old.m_scheme ||
next.m_host != old.m_host ||
next.m_port != old.m_port) {
- SE_LOG_DEBUG(NULL, NULL, "ignore redirection to different server (not implemented): %s",
+ SE_LOG_DEBUG(NULL, "ignore redirection to different server (not implemented): %s",
ex.getLocation().c_str());
if (tried.errorIsFatal()) {
throw;
}
} else if (tried.isNew(next.m_path)) {
- SE_LOG_DEBUG(NULL, NULL, "new candidate from %s -> %s redirect",
+ SE_LOG_DEBUG(NULL, "new candidate from %s -> %s redirect",
old.m_path.c_str(),
next.m_path.c_str());
tried.addCandidate(next.m_path, Tried::FRONT);
} else {
- SE_LOG_DEBUG(NULL, NULL, "already known candidate from %s -> %s redirect",
+ SE_LOG_DEBUG(NULL, "already known candidate from %s -> %s redirect",
old.m_path.c_str(),
next.m_path.c_str());
}
} catch (const TransportStatusException &ex) {
- SE_LOG_DEBUG(NULL, NULL, "TransportStatusException: %s", ex.what());
+ SE_LOG_DEBUG(NULL, "TransportStatusException: %s", ex.what());
if (ex.syncMLStatus() == 404 && boost::find_first(path, username) && usernameInserted) {
// We're actually looking at an authentication error: the path to the calendar has
// not been found, so the username was wrong. Let's hijack the error message and
@@ -941,7 +941,7 @@ bool WebDAVSource::findCollections(const boost::function<bool (const std::string
// candidate; needed to handle 502 "Connection
// refused" for /.well-known/caldav/ from Yahoo!
// Calendar
- SE_LOG_DEBUG(NULL, NULL, "ignore error for URI candidate: %s", ex.what());
+ SE_LOG_DEBUG(NULL, "ignore error for URI candidate: %s", ex.what());
}
}
} catch (const Exception &ex) {
@@ -952,7 +952,7 @@ bool WebDAVSource::findCollections(const boost::function<bool (const std::string
// candidate; needed to handle 502 "Connection
// refused" for /.well-known/caldav/ from Yahoo!
// Calendar
- SE_LOG_DEBUG(NULL, NULL, "ignore error for URI candidate: %s", ex.what());
+ SE_LOG_DEBUG(NULL, "ignore error for URI candidate: %s", ex.what());
}
}
@@ -965,7 +965,7 @@ bool WebDAVSource::findCollections(const boost::function<bool (const std::string
if (!m_davProps.empty()) {
pathProps = m_davProps.begin();
string newpath = pathProps->first;
- SE_LOG_DEBUG(NULL, NULL, "use properties for '%s' instead of '%s'",
+ SE_LOG_DEBUG(NULL, "use properties for '%s' instead of '%s'",
newpath.c_str(), path.c_str());
path = newpath;
}
@@ -989,7 +989,7 @@ bool WebDAVSource::findCollections(const boost::function<bool (const std::string
if (it != props.end()) {
name = it->second;
}
- SE_LOG_DEBUG(NULL, NULL, "found %s = %s",
+ SE_LOG_DEBUG(NULL, "found %s = %s",
name.c_str(),
uri.toURL().c_str());
res = storeResult(name,
@@ -1007,10 +1007,10 @@ bool WebDAVSource::findCollections(const boost::function<bool (const std::string
if (!home.empty() &&
tried.isNew(home)) {
if (next.empty()) {
- SE_LOG_DEBUG(NULL, NULL, "follow home-set property to %s", home.c_str());
+ SE_LOG_DEBUG(NULL, "follow home-set property to %s", home.c_str());
next = home;
} else {
- SE_LOG_DEBUG(NULL, NULL, "new candidate from home-set property %s", home.c_str());
+ SE_LOG_DEBUG(NULL, "new candidate from home-set property %s", home.c_str());
tried.addCandidate(home, Tried::FRONT);
}
}
@@ -1025,7 +1025,7 @@ bool WebDAVSource::findCollections(const boost::function<bool (const std::string
if (!principal.empty() &&
tried.isNew(principal)) {
next = principal;
- SE_LOG_DEBUG(NULL, NULL, "follow current-user-prinicipal to %s", next.c_str());
+ SE_LOG_DEBUG(NULL, "follow current-user-prinicipal to %s", next.c_str());
}
}
// finally, recursively descend into collections,
@@ -1037,7 +1037,7 @@ bool WebDAVSource::findCollections(const boost::function<bool (const std::string
// List members and find new candidates.
// Yahoo! Calendar does not return resources contained in /dav/<user>/Calendar/
// if <allprops> is used. Properties must be requested explicitly.
- SE_LOG_DEBUG(NULL, NULL, "list items in %s", path.c_str());
+ SE_LOG_DEBUG(NULL, "list items in %s", path.c_str());
// See findCollections() for the reason why we are not mixing CalDAV and CardDAV
// properties.
static const ne_propname caldav[] = {
@@ -1083,9 +1083,9 @@ bool WebDAVSource::findCollections(const boost::function<bool (const std::string
subType.find("<http://calendarserver.org/ns/shared") == subType.npos &&
(typeMatches(entry.second) || !ignoreCollection(entry.second))) {
subs.insert(sub);
- SE_LOG_DEBUG(NULL, NULL, "new candidate: %s", sub.c_str());
+ SE_LOG_DEBUG(NULL, "new candidate: %s", sub.c_str());
} else {
- SE_LOG_DEBUG(NULL, NULL, "skipping: %s", sub.c_str());
+ SE_LOG_DEBUG(NULL, "skipping: %s", sub.c_str());
}
}
@@ -1105,7 +1105,7 @@ bool WebDAVSource::findCollections(const boost::function<bool (const std::string
// done searching
break;
}
- SE_LOG_DEBUG(NULL, NULL, "follow candidate %s", next.c_str());
+ SE_LOG_DEBUG(NULL, "follow candidate %s", next.c_str());
}
counter++;
@@ -1293,7 +1293,7 @@ void WebDAVSource::getSynthesisInfo(SynthesisInfo &info,
" <include rule=\"ALL\"/>\n"
" </remoterule>";
}
- SE_LOG_DEBUG(NULL, getDisplayName(), "using data conversion rules for '%s'", info.m_backendRule.c_str());
+ SE_LOG_DEBUG(getDisplayName(), "using data conversion rules for '%s'", info.m_backendRule.c_str());
}
}
@@ -1514,12 +1514,12 @@ void WebDAVSource::listAllItemsCallback(const Neon::URI &uri,
const char *etag = ne_propset_value(results, &prop);
if (etag) {
std::string rev = ETag2Rev(etag);
- SE_LOG_DEBUG(NULL, NULL, "item %s = rev %s",
+ SE_LOG_DEBUG(NULL, "item %s = rev %s",
uid.c_str(), rev.c_str());
revisions[uid] = rev;
} else {
failed = true;
- SE_LOG_ERROR(NULL, NULL,
+ SE_LOG_ERROR(NULL,
"%s: %s",
uri.toURL().c_str(),
Neon::Status2String(ne_propset_status(results, &prop)).c_str());
@@ -1652,7 +1652,7 @@ TrackingSyncSource::InsertItemResult WebDAVSource::insertItem(const string &uid,
if (!req.run(&expected)) {
goto retry;
}
- SE_LOG_DEBUG(NULL, NULL, "add item status: %s",
+ SE_LOG_DEBUG(NULL, "add item status: %s",
Neon::Status2String(req.getStatus()).c_str());
switch (req.getStatusCode()) {
case 204:
@@ -1686,7 +1686,7 @@ TrackingSyncSource::InsertItemResult WebDAVSource::insertItem(const string &uid,
// <UID>.ics. Interestingly enough, our 1234567890!@#$%^&*()<>@dummy UID
// test case leads to a resource path which Google then cannot find
// via CalDAV. client-test must run with CLIENT_TEST_SIMPLE_UID=1...
- SE_LOG_DEBUG(NULL, NULL, "new item mapped to %s", real_luid.c_str());
+ SE_LOG_DEBUG(NULL, "new item mapped to %s", real_luid.c_str());
new_uid = real_luid;
// TODO: find a better way of detecting unexpected updates.
// state = ...
@@ -1712,7 +1712,7 @@ TrackingSyncSource::InsertItemResult WebDAVSource::insertItem(const string &uid,
// to return the "real" uid to our caller.
if (revisions.size() == 1 &&
revisions.begin()->first != new_uid) {
- SE_LOG_DEBUG(NULL, NULL, "%s mapped to %s by peer",
+ SE_LOG_DEBUG(NULL, "%s mapped to %s by peer",
new_uid.c_str(),
revisions.begin()->first.c_str());
new_uid = revisions.begin()->first;
@@ -1740,7 +1740,7 @@ TrackingSyncSource::InsertItemResult WebDAVSource::insertItem(const string &uid,
if (!req.run()) {
goto retry;
}
- SE_LOG_DEBUG(NULL, NULL, "update item status: %s",
+ SE_LOG_DEBUG(NULL, "update item status: %s",
Neon::Status2String(req.getStatus()).c_str());
switch (req.getStatusCode()) {
case 204:
@@ -1860,7 +1860,7 @@ void WebDAVSource::removeItem(const string &uid)
break;
}
}
- SE_LOG_DEBUG(NULL, NULL, "remove item status: %s",
+ SE_LOG_DEBUG(NULL, "remove item status: %s",
Neon::Status2String(req->getStatus()).c_str());
switch (req->getStatusCode()) {
case 204:
diff --git a/src/backends/webdav/WebDAVSourceRegister.cpp b/src/backends/webdav/WebDAVSourceRegister.cpp
index fdf8931d..a7b481da 100644
--- a/src/backends/webdav/WebDAVSourceRegister.cpp
+++ b/src/backends/webdav/WebDAVSourceRegister.cpp
@@ -284,7 +284,7 @@ public:
string("_") + clientID +
string("_") + (isSourceA ? "A" : "B");
- SE_LOG_DEBUG(NULL, NULL, "instantiating testing source %s in config %s, with tracking name %s",
+ SE_LOG_DEBUG(NULL, "instantiating testing source %s in config %s, with tracking name %s",
name.c_str(),
config.c_str(),
tracking.c_str());
@@ -298,7 +298,7 @@ public:
std::string peerName = std::string(server ? server : "no-such-server") + "_" + clientID;
boost::shared_ptr<SyncConfig> peer(new SyncConfig(peerName));
SyncSourceNodes peerNodes = peer->getSyncSourceNodes(name);
- SE_LOG_DEBUG(NULL, NULL, "overriding testing source %s properties with the ones from config %s = %s",
+ SE_LOG_DEBUG(NULL, "overriding testing source %s properties with the ones from config %s = %s",
name.c_str(),
peerName.c_str(),
peer->getRootPath().c_str());
@@ -308,7 +308,7 @@ public:
}
boost::shared_ptr<FilterConfigNode> node = peerNodes.getNode(*prop);
InitStateString value = prop->getProperty(*node);
- SE_LOG_DEBUG(NULL, NULL, " %s = %s (%s)",
+ SE_LOG_DEBUG(NULL, " %s = %s (%s)",
prop->getMainName().c_str(),
value.c_str(),
value.wasSet() ? "set" : "default");
@@ -322,12 +322,12 @@ public:
// Always set properties taken from the environment.
nodes.getProperties()->setProperty("backend", InitStateString(m_type, true));
- SE_LOG_DEBUG(NULL, NULL, " additional property backend = %s (from CLIENT_TEST_WEBDAV)",
+ SE_LOG_DEBUG(NULL, " additional property backend = %s (from CLIENT_TEST_WEBDAV)",
m_type.c_str());
BOOST_FOREACH(const StringPair &propval, m_props) {
boost::shared_ptr<FilterConfigNode> node = context->getNode(propval.first);
if (node) {
- SE_LOG_DEBUG(NULL, NULL, " additional property %s = %s (from CLIENT_TEST_WEBDAV)",
+ SE_LOG_DEBUG(NULL, " additional property %s = %s (from CLIENT_TEST_WEBDAV)",
propval.first.c_str(), propval.second.c_str());
node->setProperty(propval.first, InitStateString(propval.second, true));
} else if (!boost::ends_with(propval.first, "testconfig") &&
diff --git a/src/client-test-app.cpp b/src/client-test-app.cpp
index 0c13e724..96cf2f3f 100644
--- a/src/client-test-app.cpp
+++ b/src/client-test-app.cpp
@@ -486,7 +486,7 @@ private:
std::string tracking =
string("_") + m_clientID +
"_" + (isSourceA ? "A" : "B");
- SE_LOG_DEBUG(NULL, NULL, "instantiating testing source %s in config %s, with tracking name %s",
+ SE_LOG_DEBUG(NULL, "instantiating testing source %s in config %s, with tracking name %s",
name.c_str(),
config.c_str(),
tracking.c_str());
@@ -500,7 +500,7 @@ private:
std::string peerName = server ? (std::string(server) + "_" + m_clientID) : "@default";
boost::shared_ptr<SyncConfig> peer(new SyncConfig(peerName));
SyncSourceNodes peerNodes = peer->getSyncSourceNodes(name);
- SE_LOG_DEBUG(NULL, NULL, "overriding testing source %s properties with the ones from config %s = %s",
+ SE_LOG_DEBUG(NULL, "overriding testing source %s properties with the ones from config %s = %s",
name.c_str(),
peerName.c_str(),
peer->getRootPath().c_str());
@@ -510,7 +510,7 @@ private:
}
boost::shared_ptr<FilterConfigNode> node = peerNodes.getNode(*prop);
InitStateString value = prop->getProperty(*node);
- SE_LOG_DEBUG(NULL, NULL, " %s = %s (%s)",
+ SE_LOG_DEBUG(NULL, " %s = %s (%s)",
prop->getMainName().c_str(),
value.c_str(),
value.wasSet() ? "set" : "default");
diff --git a/src/dbus/server/auto-sync-manager.cpp b/src/dbus/server/auto-sync-manager.cpp
index 6822267b..76a45ce1 100644
--- a/src/dbus/server/auto-sync-manager.cpp
+++ b/src/dbus/server/auto-sync-manager.cpp
@@ -90,7 +90,7 @@ void AutoSyncManager::init()
void AutoSyncManager::initConfig(const std::string &configName)
{
- SE_LOG_DEBUG(NULL, NULL, "auto sync: updating info about config %s", configName.c_str());
+ SE_LOG_DEBUG(NULL, "auto sync: updating info about config %s", configName.c_str());
if (configName.empty()) {
// Anything might have changed. Check all configs we know
@@ -177,7 +177,7 @@ void AutoSyncManager::initConfig(const std::string &configName)
// the past problem -> allow auto syncing again.
task->m_permanentFailure = false;
- SE_LOG_DEBUG(NULL, NULL,
+ SE_LOG_DEBUG(NULL,
"auto sync: %s: auto sync '%s', %s, %s, %d seconds repeat interval, %d seconds online delay",
configName.c_str(),
autoSync.c_str(),
@@ -201,7 +201,7 @@ void AutoSyncManager::initConfig(const std::string &configName)
(transport == AutoSyncTask::NEEDS_BT && bt) ||
(transport == AutoSyncTask::NEEDS_OTHER && any)) {
task->m_urls.push_back(std::make_pair(transport, url));
- SE_LOG_DEBUG(NULL, NULL,
+ SE_LOG_DEBUG(NULL,
"auto sync: adding config %s url %s",
configName.c_str(),
url.c_str());
@@ -214,11 +214,11 @@ void AutoSyncManager::initConfig(const std::string &configName)
bool lock = preventTerm();
if (m_autoTermLocked && !lock) {
- SE_LOG_DEBUG(NULL, NULL, "auto sync: allow auto shutdown");
+ SE_LOG_DEBUG(NULL, "auto sync: allow auto shutdown");
m_server.autoTermUnref();
m_autoTermLocked = false;
} else if (!m_autoTermLocked && lock) {
- SE_LOG_DEBUG(NULL, NULL, "auto sync: prevent auto shutdown");
+ SE_LOG_DEBUG(NULL, "auto sync: prevent auto shutdown");
m_server.autoTermRef();
m_autoTermLocked = true;
}
@@ -229,20 +229,20 @@ void AutoSyncManager::initConfig(const std::string &configName)
void AutoSyncManager::schedule(const std::string &reason)
{
- SE_LOG_DEBUG(NULL, NULL, "auto sync: reschedule, %s", reason.c_str());
+ SE_LOG_DEBUG(NULL, "auto sync: reschedule, %s", reason.c_str());
// idle callback will be (re)set if needed
m_idleConnection.disconnect();
if (!preventTerm()) {
- SE_LOG_DEBUG(NULL, NULL, "auto sync: nothing to do");
+ SE_LOG_DEBUG(NULL, "auto sync: nothing to do");
return;
}
if (!m_server.isIdle()) {
// Only schedule automatic syncs when nothing else is
// going on or pending.
- SE_LOG_DEBUG(NULL, NULL, "auto sync: server not idle");
+ SE_LOG_DEBUG(NULL, "auto sync: server not idle");
connectIdle();
return;
}
@@ -266,7 +266,7 @@ void AutoSyncManager::schedule(const std::string &reason)
// Adds two seconds just to be on the safe side and not
// wake up again too soon.
int seconds = (task->m_lastSyncTime + task->m_interval - now).seconds() + 2;
- SE_LOG_DEBUG(NULL, NULL, "auto sync: %s: interval expires in %ds",
+ SE_LOG_DEBUG(NULL, "auto sync: %s: interval expires in %ds",
configName.c_str(),
seconds);
task->m_intervalTimeout.runOnce(seconds,
@@ -284,7 +284,7 @@ void AutoSyncManager::schedule(const std::string &reason)
Timeout *timeout = NULL;
switch (urlinfo.first) {
case AutoSyncTask::NEEDS_HTTP:
- SE_LOG_DEBUG(NULL, NULL, "auto sync: %s: %s uses HTTP",
+ SE_LOG_DEBUG(NULL, "auto sync: %s: %s uses HTTP",
configName.c_str(),
urlinfo.second.c_str());
starttime = &m_httpStartTime;
@@ -292,7 +292,7 @@ void AutoSyncManager::schedule(const std::string &reason)
timeout = &task->m_httpTimeout;
break;
case AutoSyncTask::NEEDS_BT:
- SE_LOG_DEBUG(NULL, NULL, "auto sync: %s: %s uses Bluetooth",
+ SE_LOG_DEBUG(NULL, "auto sync: %s: %s uses Bluetooth",
configName.c_str(),
urlinfo.second.c_str());
starttime = &m_btStartTime;
@@ -300,7 +300,7 @@ void AutoSyncManager::schedule(const std::string &reason)
timeout = &task->m_btTimeout;
break;
case AutoSyncTask::NEEDS_OTHER:
- SE_LOG_DEBUG(NULL, NULL, "auto sync: %s: %s uses some unknown transport",
+ SE_LOG_DEBUG(NULL, "auto sync: %s: %s uses some unknown transport",
configName.c_str(),
urlinfo.second.c_str());
break;
@@ -308,7 +308,7 @@ void AutoSyncManager::schedule(const std::string &reason)
if (!starttime || // some other transport, assumed to be online, use it
(*starttime && // present
(task->m_delay <= 0 || *starttime + task->m_delay <= now))) { // present long enough
- SE_LOG_DEBUG(NULL, NULL, "auto sync: %s: ready to run via %s (transport present for %lds > %ds auto sync delay)",
+ SE_LOG_DEBUG(NULL, "auto sync: %s: ready to run via %s (transport present for %lds > %ds auto sync delay)",
configName.c_str(),
urlinfo.second.c_str(),
starttime ? (long)(*starttime - now).seconds() : -1,
@@ -321,13 +321,13 @@ void AutoSyncManager::schedule(const std::string &reason)
signal->connect(PresenceStatus::PresenceSignal_t::slot_type(&AutoSyncManager::schedule,
this,
"presence change").track(m_me));
- SE_LOG_DEBUG(NULL, NULL, "auto sync: %s: transport for %s not present",
+ SE_LOG_DEBUG(NULL, "auto sync: %s: transport for %s not present",
configName.c_str(),
urlinfo.second.c_str());
} else {
// check again after waiting the requested amount of time
int seconds = (*starttime + task->m_delay - now).seconds() + 2;
- SE_LOG_DEBUG(NULL, NULL, "auto sync: %s: presence delay of transport for %s expires in %ds",
+ SE_LOG_DEBUG(NULL, "auto sync: %s: presence delay of transport for %s expires in %ds",
configName.c_str(),
urlinfo.second.c_str(),
seconds);
@@ -379,7 +379,7 @@ void AutoSyncManager::schedule(const std::string &reason)
}
- SE_LOG_DEBUG(NULL, NULL, "auto sync: nothing to do now");
+ SE_LOG_DEBUG(NULL, "auto sync: nothing to do now");
}
void AutoSyncManager::connectIdle()
@@ -396,14 +396,14 @@ void AutoSyncManager::sessionStarted(const boost::shared_ptr<Session> &session)
std::string configName = session->getConfigName();
PeerMap::iterator it = m_peerMap.find(configName);
if (it == m_peerMap.end()) {
- SE_LOG_DEBUG(NULL, NULL, "auto sync: ignore running sync %s without config",
+ SE_LOG_DEBUG(NULL, "auto sync: ignore running sync %s without config",
configName.c_str());
return;
}
boost::shared_ptr<AutoSyncManager> me = m_me.lock();
if (!me) {
- SE_LOG_DEBUG(NULL, NULL, "auto sync: already destructing, ignore new sync %s",
+ SE_LOG_DEBUG(NULL, "auto sync: already destructing, ignore new sync %s",
configName.c_str());
return;
}
@@ -445,7 +445,7 @@ bool AutoSyncManager::preventTerm()
void AutoSyncManager::autoSyncSuccessStart(AutoSyncTask *task)
{
task->m_syncSuccessStart = true;
- SE_LOG_INFO(NULL, NULL,"Automatic sync for '%s' has been successfully started.\n",
+ SE_LOG_INFO(NULL,"Automatic sync for '%s' has been successfully started.\n",
task->m_peerName.c_str());
if (m_server.notificationsEnabled() &&
task->m_notifyLevel >= SyncConfig::NOTIFY_ALL) {
@@ -475,7 +475,7 @@ static bool ErrorIsTemporary(SyncMLStatus status)
void AutoSyncManager::autoSyncDone(AutoSyncTask *task, SyncMLStatus status)
{
- SE_LOG_INFO(NULL, NULL,"Automatic sync for '%s' has been done.\n", task->m_peerName.c_str());
+ SE_LOG_INFO(NULL,"Automatic sync for '%s' has been done.\n", task->m_peerName.c_str());
if (m_server.notificationsEnabled()) {
// send a notification to notification server
std::string summary, body;
@@ -509,7 +509,7 @@ void AutoSyncManager::anySyncDone(AutoSyncTask *task, SyncMLStatus status)
{
// set "permanently failed" flag according to most recent result
task->m_permanentFailure = status != STATUS_OK && !ErrorIsTemporary(status);
- SE_LOG_DEBUG(NULL, NULL, "auto sync: sync session %s done, result %d %s",
+ SE_LOG_DEBUG(NULL, "auto sync: sync session %s done, result %d %s",
task->m_configName.c_str(),
status,
task->m_permanentFailure ?
diff --git a/src/dbus/server/auto-term.h b/src/dbus/server/auto-term.h
index 15cf1260..357d9bc2 100644
--- a/src/dbus/server/auto-term.h
+++ b/src/dbus/server/auto-term.h
@@ -53,12 +53,12 @@ class AutoTerm {
time_t now = time(NULL);
if (at->m_lastUsed + at->m_interval <= now) {
// yes, shut down event loop and daemon
- SE_LOG_DEBUG(NULL, NULL, "terminating because not in use and idle for more than %ld seconds", (long)at->m_interval);
+ SE_LOG_DEBUG(NULL, "terminating because not in use and idle for more than %ld seconds", (long)at->m_interval);
at->m_shutdownRequested = true;
g_main_loop_quit(at->getLoop());
} else {
// check again later
- SE_LOG_DEBUG(NULL, NULL, "not terminating because last used %ld seconds ago, check again in %ld seconds",
+ SE_LOG_DEBUG(NULL, "not terminating because last used %ld seconds ago, check again in %ld seconds",
(long)(now - at->m_lastUsed),
(long)(at->m_lastUsed + at->m_interval - now));
at->m_checkSource = g_timeout_add_seconds(at->m_lastUsed + at->m_interval - now,
@@ -66,7 +66,7 @@ class AutoTerm {
data);
}
} else {
- SE_LOG_DEBUG(NULL, NULL, "not terminating, not renewing timeout because busy");
+ SE_LOG_DEBUG(NULL, "not terminating, not renewing timeout because busy");
}
// always remove the current timeout, its job is done
return FALSE;
@@ -130,7 +130,7 @@ public:
if (m_refs > 0) {
// in use, don't need timeout
if (m_checkSource) {
- SE_LOG_DEBUG(NULL, NULL, "deactivating idle termination because in use");
+ SE_LOG_DEBUG(NULL, "deactivating idle termination because in use");
g_source_remove(m_checkSource);
m_checkSource = 0;
}
@@ -140,7 +140,7 @@ public:
// reset the timer. Therefore we don't have to remove it.
m_lastUsed = time(NULL);
if (!m_checkSource) {
- SE_LOG_DEBUG(NULL, NULL, "activating idle termination in %ld seconds because idle", m_interval);
+ SE_LOG_DEBUG(NULL, "activating idle termination in %ld seconds because idle", m_interval);
m_checkSource = g_timeout_add_seconds(m_interval,
checkCallback,
static_cast<gpointer>(this));
diff --git a/src/dbus/server/bluez-manager.cpp b/src/dbus/server/bluez-manager.cpp
index acde6850..661ce987 100644
--- a/src/dbus/server/bluez-manager.cpp
+++ b/src/dbus/server/bluez-manager.cpp
@@ -71,7 +71,7 @@ void BluezManager::defaultAdapterChanged(const DBusObject_t &adapter)
void BluezManager::defaultAdapterCb(const DBusObject_t &adapter, const string &error)
{
if(!error.empty()) {
- SE_LOG_DEBUG (NULL, NULL, "Error in calling DefaultAdapter of Interface org.bluez.Manager: %s", error.c_str());
+ SE_LOG_DEBUG(NULL, "Error in calling DefaultAdapter of Interface org.bluez.Manager: %s", error.c_str());
m_done = true;
return;
}
@@ -93,7 +93,7 @@ BluezManager::BluezAdapter::BluezAdapter(BluezManager &manager, const string &pa
void BluezManager::BluezAdapter::listDevicesCb(const std::vector<DBusObject_t> &devices, const string &error)
{
if(!error.empty()) {
- SE_LOG_DEBUG (NULL, NULL, "Error in calling ListDevices of Interface org.bluez.Adapter: %s", error.c_str());
+ SE_LOG_DEBUG(NULL, "Error in calling ListDevices of Interface org.bluez.Adapter: %s", error.c_str());
checkDone(true);
return;
}
@@ -216,7 +216,7 @@ void BluezManager::loadBluetoothDeviceLookupTable()
string filePath(SyncEvolutionDataDir() + "/bluetooth_products.ini");
if(!g_key_file_load_from_file(m_lookupTable.bt_key_file, filePath.c_str(),
G_KEY_FILE_NONE, &err)) {
- SE_LOG_DEBUG(NULL, NULL, "%s[%d]: %s - filePath = %s, error = %s",
+ SE_LOG_DEBUG(NULL, "%s[%d]: %s - filePath = %s, error = %s",
__FILE__, __LINE__, "Bluetooth products file not loaded",
filePath.c_str(), err->message);
m_lookupTable.isLoaded = false;
@@ -324,7 +324,7 @@ void BluezManager::BluezDevice::getPropertiesCb(const PropDict &props, const str
m_adapter.m_devReplies++;
m_reply = true;
if(!error.empty()) {
- SE_LOG_DEBUG (NULL, NULL, "Error in calling GetProperties of Interface org.bluez.Device: %s", error.c_str());
+ SE_LOG_DEBUG(NULL, "Error in calling GetProperties of Interface org.bluez.Device: %s", error.c_str());
} else {
PropDict::const_iterator it = props.find("Name");
if(it != props.end()) {
diff --git a/src/dbus/server/client.cpp b/src/dbus/server/client.cpp
index 55858dcf..3c100f20 100644
--- a/src/dbus/server/client.cpp
+++ b/src/dbus/server/client.cpp
@@ -26,7 +26,7 @@ SE_BEGIN_CXX
Client::~Client()
{
- SE_LOG_DEBUG(NULL, NULL, "D-Bus client %s is destructing", m_ID.c_str());
+ SE_LOG_DEBUG(NULL, "D-Bus client %s is destructing", m_ID.c_str());
// explicitly detach all resources instead of just freeing the
// list, so that the special behavior for sessions in detach() is
diff --git a/src/dbus/server/connection.cpp b/src/dbus/server/connection.cpp
index 8b2971e6..1d1e87bc 100644
--- a/src/dbus/server/connection.cpp
+++ b/src/dbus/server/connection.cpp
@@ -31,7 +31,7 @@ SE_BEGIN_CXX
void Connection::failed(const std::string &reason)
{
- SE_LOG_DEBUG(NULL, NULL, "Connection %s: failed: %s (old state %s)",
+ SE_LOG_DEBUG(NULL, "Connection %s: failed: %s (old state %s)",
m_sessionID.c_str(),
reason.c_str(),
SessionCommon::ConnectionStateToString(m_state).c_str());
@@ -100,7 +100,7 @@ void Connection::process(const Caller_t &caller,
const GDBusCXX::DBusArray<uint8_t> &message,
const std::string &message_type)
{
- SE_LOG_DEBUG(NULL, NULL, "Connection %s: D-Bus client %s sends %lu bytes, %s (old state %s)",
+ SE_LOG_DEBUG(NULL, "Connection %s: D-Bus client %s sends %lu bytes, %s (old state %s)",
m_sessionID.c_str(),
caller.c_str(),
(unsigned long)message.first,
@@ -142,7 +142,7 @@ void Connection::process(const Caller_t &caller,
// whether it is a SAN package or a normal sync pacakge
if (message_type == TransportAgent::m_contentTypeServerAlertedNotificationDS) {
config = "default";
- SE_LOG_DEBUG(NULL, NULL, "SAN parsing failed, falling back to 'default' config");
+ SE_LOG_DEBUG(NULL, "SAN parsing failed, falling back to 'default' config");
}
} else { //Server alerted notification case
// Extract server ID and match it against a server
@@ -178,7 +178,7 @@ void Connection::process(const Caller_t &caller,
vector<string> urls = conf.getSyncURL();
BOOST_FOREACH (string &url, urls){
url = url.substr (0, url.find("+"));
- SE_LOG_DEBUG (NULL, NULL, "matching against %s",url.c_str());
+ SE_LOG_DEBUG(NULL, "matching against %s",url.c_str());
if (url.find ("obex-bt://") ==0 && url.substr(strlen("obex-bt://"), url.npos) == m_peerBtAddr) {
config = server.first;
break;
@@ -204,14 +204,12 @@ void Connection::process(const Caller_t &caller,
// create a default configuration name if none matched
if (config.empty()) {
config = serverID+"_"+getCurrentTime();
- SE_LOG_DEBUG(NULL,
- NULL,
- "SAN Server ID '%s' unknown, falling back to automatically created '%s' config",
+ SE_LOG_DEBUG(NULL, "SAN Server ID '%s' unknown, falling back to automatically created '%s' config",
serverID.c_str(), config.c_str());
}
- SE_LOG_DEBUG(NULL, NULL, "SAN sync with config %s", config.c_str());
+ SE_LOG_DEBUG(NULL, "SAN sync with config %s", config.c_str());
m_SANContent.reset (new SANContent ());
// extract number of sources
@@ -220,22 +218,22 @@ void Connection::process(const Caller_t &caller,
uint32_t contentType;
std::string serverURI;
if (!numSources) {
- SE_LOG_DEBUG(NULL, NULL, "SAN message with no sources, using selected modes");
+ SE_LOG_DEBUG(NULL, "SAN message with no sources, using selected modes");
// Synchronize all known sources with the default mode.
if (san.GetNthSync(0, syncType, contentType, serverURI)) {
- SE_LOG_DEBUG(NULL, NULL, "SAN invalid header, using default modes");
+ SE_LOG_DEBUG(NULL, "SAN invalid header, using default modes");
} else if (syncType < SYNC_FIRST || syncType > SYNC_LAST) {
- SE_LOG_DEBUG(NULL, NULL, "SAN invalid sync type %d, using default modes", syncType);
+ SE_LOG_DEBUG(NULL, "SAN invalid sync type %d, using default modes", syncType);
} else {
m_syncMode = PrettyPrintSyncMode(SyncMode(syncType), true);
- SE_LOG_DEBUG(NULL, NULL, "SAN sync mode for all configured sources: %s", m_syncMode.c_str());
+ SE_LOG_DEBUG(NULL, "SAN sync mode for all configured sources: %s", m_syncMode.c_str());
}
} else {
for (int sync = 1; sync <= numSources; sync++) {
if (san.GetNthSync(sync, syncType, contentType, serverURI)) {
- SE_LOG_DEBUG(NULL, NULL, "SAN invalid sync entry #%d", sync);
+ SE_LOG_DEBUG(NULL, "SAN invalid sync entry #%d", sync);
} else if (syncType < SYNC_FIRST || syncType > SYNC_LAST) {
- SE_LOG_DEBUG(NULL, NULL, "SAN invalid sync type %d for entry #%d, ignoring entry", syncType, sync);
+ SE_LOG_DEBUG(NULL, "SAN invalid sync type %d for entry #%d, ignoring entry", syncType, sync);
} else {
std::string syncMode = PrettyPrintSyncMode(SyncMode(syncType), true);
m_SANContent->m_syncType.push_back (syncMode);
@@ -253,7 +251,7 @@ void Connection::process(const Caller_t &caller,
serverMode = true;
if (m_peer.find("config") == m_peer.end() &&
!m_peer["config"].empty()) {
- SE_LOG_DEBUG(NULL, NULL, "ignoring pre-chosen config '%s'",
+ SE_LOG_DEBUG(NULL, "ignoring pre-chosen config '%s'",
m_peer["config"].c_str());
}
@@ -272,7 +270,7 @@ void Connection::process(const Caller_t &caller,
SyncConfig peer(entry.first);
if (info.m_deviceID == peer.getRemoteDevID()) {
config = entry.first;
- SE_LOG_INFO(NULL, NULL, "matched %s against config %s (%s)",
+ SE_LOG_INFO(NULL, "matched %s against config %s (%s)",
info.toString().c_str(),
entry.first.c_str(),
entry.second.c_str());
@@ -372,7 +370,7 @@ void Connection::send(const DBusArray<uint8_t> buffer,
const std::string &type,
const std::string &url)
{
- SE_LOG_DEBUG(NULL, NULL, "Connection %s: send %lu bytes, %s, %s (old state %s)",
+ SE_LOG_DEBUG(NULL, "Connection %s: send %lu bytes, %s, %s (old state %s)",
m_sessionID.c_str(),
(unsigned long)buffer.first,
type.c_str(),
@@ -398,7 +396,7 @@ void Connection::send(const DBusArray<uint8_t> buffer,
void Connection::sendFinalMsg()
{
- SE_LOG_DEBUG(NULL, NULL, "Connection %s: shut down (old state %s)",
+ SE_LOG_DEBUG(NULL, "Connection %s: shut down (old state %s)",
m_sessionID.c_str(),
SessionCommon::ConnectionStateToString(m_state).c_str());
if (m_state == SessionCommon::PROCESSING) {
@@ -414,7 +412,7 @@ void Connection::close(const Caller_t &caller,
bool normal,
const std::string &error)
{
- SE_LOG_DEBUG(NULL, NULL, "Connection %s: client %s closes connection %s %s%s%s (old state %s)",
+ SE_LOG_DEBUG(NULL, "Connection %s: client %s closes connection %s %s%s%s (old state %s)",
m_sessionID.c_str(),
caller.c_str(),
getPath(),
@@ -464,13 +462,13 @@ void Connection::close(const Caller_t &caller,
void Connection::abort()
{
if (!m_abortSent) {
- SE_LOG_DEBUG(NULL, NULL, "Connection %s: send abort to client (state %s)",
+ SE_LOG_DEBUG(NULL, "Connection %s: send abort to client (state %s)",
m_sessionID.c_str(),
SessionCommon::ConnectionStateToString(m_state).c_str());
sendAbort();
m_abortSent = true;
} else {
- SE_LOG_DEBUG(NULL, NULL, "Connection %s: not sending abort to client, already done (state %s)",
+ SE_LOG_DEBUG(NULL, "Connection %s: not sending abort to client, already done (state %s)",
m_sessionID.c_str(),
SessionCommon::ConnectionStateToString(m_state).c_str());
}
@@ -479,7 +477,7 @@ void Connection::abort()
void Connection::shutdown()
{
- SE_LOG_DEBUG(NULL, NULL, "Connection %s: self-destructing (state %s)",
+ SE_LOG_DEBUG(NULL, "Connection %s: self-destructing (state %s)",
m_sessionID.c_str(),
SessionCommon::ConnectionStateToString(m_state).c_str());
// trigger removal of this connection by removing all
@@ -513,7 +511,7 @@ Connection::Connection(Server &server,
add(reply);
m_server.autoTermRef();
- SE_LOG_DEBUG(NULL, NULL, "Connection %s: created",
+ SE_LOG_DEBUG(NULL, "Connection %s: created",
m_sessionID.c_str());
}
@@ -530,7 +528,7 @@ boost::shared_ptr<Connection> Connection::createConnection(Server &server,
Connection::~Connection()
{
- SE_LOG_DEBUG(NULL, NULL, "Connection %s: done with '%s'%s%s%s (old state %s)",
+ SE_LOG_DEBUG(NULL, "Connection %s: done with '%s'%s%s%s (old state %s)",
m_sessionID.c_str(),
m_description.c_str(),
m_state == SessionCommon::DONE ? ", normal shutdown" : " unexpectedly",
@@ -555,7 +553,7 @@ Connection::~Connection()
void Connection::ready()
{
- SE_LOG_DEBUG(NULL, NULL, "Connection %s: ready to run (old state %s)",
+ SE_LOG_DEBUG(NULL, "Connection %s: ready to run (old state %s)",
m_sessionID.c_str(),
SessionCommon::ConnectionStateToString(m_state).c_str());
@@ -563,7 +561,7 @@ void Connection::ready()
std::string configName = m_session->getConfigName();
SyncConfig config (configName);
if (!config.exists() && m_SANContent) {
- SE_LOG_DEBUG (NULL, NULL, "Configuration %s not exists for a runnable session in a SAN context, create it automatically", configName.c_str());
+ SE_LOG_DEBUG(NULL, "Configuration %s not exists for a runnable session in a SAN context, create it automatically", configName.c_str());
ReadOperations::Config_t from;
const std::string templateName = "SyncEvolution";
// TODO: support SAN from other well known servers
@@ -599,7 +597,7 @@ void Connection::ready()
// additional parameters (like date
// range selection for events)
if (boost::starts_with(sourceConfig->getURINonEmpty(), serverURI)) {
- SE_LOG_DEBUG(NULL, NULL,
+ SE_LOG_DEBUG(NULL,
"SAN entry #%d = source %s with mode %s",
(int)sync, source.c_str(), syncMode.c_str());
m_sourceModes[source] = syncMode;
@@ -608,13 +606,13 @@ void Connection::ready()
}
}
if (!found) {
- SE_LOG_DEBUG(NULL, NULL,
+ SE_LOG_DEBUG(NULL,
"SAN entry #%d with mode %s ignored because Server URI %s is unknown",
(int)sync, syncMode.c_str(), serverURI.c_str());
}
}
if (m_sourceModes.empty()) {
- SE_LOG_DEBUG(NULL, NULL,
+ SE_LOG_DEBUG(NULL,
"SAN message with no known entries, falling back to default");
m_syncMode = "";
}
@@ -640,7 +638,7 @@ void Connection::activateTimeout()
void Connection::timeoutCb()
{
- SE_LOG_DEBUG(NULL, NULL, "Connection %s: timed out after %ds (state %s)",
+ SE_LOG_DEBUG(NULL, "Connection %s: timed out after %ds (state %s)",
m_sessionID.c_str(), m_timeoutSeconds,
SessionCommon::ConnectionStateToString(m_state).c_str());
failed(StringPrintf("timed out after %ds", m_timeoutSeconds));
diff --git a/src/dbus/server/connman-client.cpp b/src/dbus/server/connman-client.cpp
index 674feae6..c8acf6fc 100644
--- a/src/dbus/server/connman-client.cpp
+++ b/src/dbus/server/connman-client.cpp
@@ -41,7 +41,7 @@ ConnmanClient::ConnmanClient(Server &server):
getProp.start(boost::bind(&ConnmanClient::getPropCb, this, _1, _2));
m_propertyChanged.activate(boost::bind(&ConnmanClient::propertyChanged, this, _1, _2));
}else{
- SE_LOG_DEBUG (NULL, NULL, "DBus connection setup for connman failed");
+ SE_LOG_DEBUG(NULL, "DBus connection setup for connman failed");
}
}
@@ -53,10 +53,10 @@ void ConnmanClient::getPropCb (const std::map <std::string,
// ensure there is still first set of singal set in case of no
// connman available
m_server.getPresenceStatus().updatePresenceStatus (true, PresenceStatus::HTTP_TRANSPORT);
- SE_LOG_DEBUG (NULL, NULL, "No connman service available %s", error.c_str());
+ SE_LOG_DEBUG(NULL, "No connman service available %s", error.c_str());
return;
}
- SE_LOG_DEBUG (NULL, NULL, "error in connmanCallback %s", error.c_str());
+ SE_LOG_DEBUG(NULL, "error in connmanCallback %s", error.c_str());
return;
}
diff --git a/src/dbus/server/dbus-sync.cpp b/src/dbus/server/dbus-sync.cpp
index 40486f51..87ebdc19 100644
--- a/src/dbus/server/dbus-sync.cpp
+++ b/src/dbus/server/dbus-sync.cpp
@@ -220,19 +220,19 @@ void DBusSync::askPasswordAsync(const std::string &passwordName,
}
try {
- SE_LOG_DEBUG(NULL, NULL, "asking parent for password");
+ SE_LOG_DEBUG(NULL, "asking parent for password");
m_passwordSuccess = success;
m_passwordFailure = failureException;
m_helper.emitPasswordRequest(descr, key);
if (!m_helper.connected()) {
- SE_LOG_DEBUG(NULL, NULL, "password request failed, lost connection");
+ SE_LOG_DEBUG(NULL, "password request failed, lost connection");
SE_THROW_EXCEPTION_STATUS(StatusException,
StringPrintf("Could not get the '%s' password from user, no connection to UI.",
descr.c_str()),
STATUS_PASSWORD_TIMEOUT);
}
if (SuspendFlags::getSuspendFlags().getState() != SuspendFlags::NORMAL) {
- SE_LOG_DEBUG(NULL, NULL, "password request failed, was asked to terminate");
+ SE_LOG_DEBUG(NULL, "password request failed, was asked to terminate");
SE_THROW_EXCEPTION_STATUS(StatusException,
StringPrintf("Could not get the '%s' password from user, was asked to shut down.",
descr.c_str()),
@@ -254,7 +254,7 @@ void DBusSync::passwordResponse(bool timedOut, bool aborted, const std::string &
std::swap(failureException, m_passwordFailure);
if (success && failureException) {
- SE_LOG_DEBUG(NULL, NULL, "password result: %s",
+ SE_LOG_DEBUG(NULL, "password result: %s",
timedOut ? "timeout or parent gone" :
aborted ? "user abort" :
password.empty() ? "empty password" :
diff --git a/src/dbus/server/dbus-transport-agent.cpp b/src/dbus/server/dbus-transport-agent.cpp
index c7a4741e..8d3c4144 100644
--- a/src/dbus/server/dbus-transport-agent.cpp
+++ b/src/dbus/server/dbus-transport-agent.cpp
@@ -30,7 +30,7 @@ DBusTransportAgent::DBusTransportAgent(SessionHelper &helper) :
void DBusTransportAgent::serverAlerted()
{
- SE_LOG_DEBUG(NULL, NULL, "D-Bus transport: server alerted (old state: %s, %s)",
+ SE_LOG_DEBUG(NULL, "D-Bus transport: server alerted (old state: %s, %s)",
SessionCommon::ConnectionStateToString(m_state).c_str(),
m_error.c_str());
if (m_state == SessionCommon::SETUP) {
@@ -44,7 +44,7 @@ void DBusTransportAgent::serverAlerted()
void DBusTransportAgent::storeMessage(const GDBusCXX::DBusArray<uint8_t> &buffer,
const std::string &type)
{
- SE_LOG_DEBUG(NULL, NULL, "D-Bus transport: store incoming message, %ld bytes, %s (old state: %s, %s)",
+ SE_LOG_DEBUG(NULL, "D-Bus transport: store incoming message, %ld bytes, %s (old state: %s, %s)",
(long)buffer.first,
type.c_str(),
SessionCommon::ConnectionStateToString(m_state).c_str(),
@@ -68,7 +68,7 @@ void DBusTransportAgent::storeMessage(const GDBusCXX::DBusArray<uint8_t> &buffer
void DBusTransportAgent::storeState(const std::string &error)
{
- SE_LOG_DEBUG(NULL, NULL, "D-Bus transport: got error '%s', current error is '%s', state %s",
+ SE_LOG_DEBUG(NULL, "D-Bus transport: got error '%s', current error is '%s', state %s",
error.c_str(), m_error.c_str(), SessionCommon::ConnectionStateToString(m_state).c_str());
if (!error.empty()) {
@@ -88,7 +88,7 @@ void DBusTransportAgent::storeState(const std::string &error)
void DBusTransportAgent::send(const char *data, size_t len)
{
- SE_LOG_DEBUG(NULL, NULL, "D-Bus transport: outgoing message %ld bytes, %s, %s",
+ SE_LOG_DEBUG(NULL, "D-Bus transport: outgoing message %ld bytes, %s, %s",
(long)len, m_type.c_str(), m_url.c_str());
if (m_state != SessionCommon::PROCESSING) {
SE_THROW_EXCEPTION(TransportException,
@@ -103,7 +103,7 @@ void DBusTransportAgent::send(const char *data, size_t len)
void DBusTransportAgent::shutdown()
{
- SE_LOG_DEBUG(NULL, NULL, "D-Bus transport: shut down (old state: %s, %s)",
+ SE_LOG_DEBUG(NULL, "D-Bus transport: shut down (old state: %s, %s)",
SessionCommon::ConnectionStateToString(m_state).c_str(),
m_error.c_str());
if (m_state == SessionCommon::PROCESSING) {
@@ -114,7 +114,7 @@ void DBusTransportAgent::shutdown()
void DBusTransportAgent::doWait()
{
- SE_LOG_DEBUG(NULL, NULL, "D-Bus transport: wait - old state: %s, %s",
+ SE_LOG_DEBUG(NULL, "D-Bus transport: wait - old state: %s, %s",
SessionCommon::ConnectionStateToString(m_state).c_str(),
m_error.c_str());
if (SuspendFlags::getSuspendFlags().getState() == SuspendFlags::NORMAL) {
@@ -123,7 +123,7 @@ void DBusTransportAgent::doWait()
// wake us up.
g_main_context_iteration(NULL, true);
}
- SE_LOG_DEBUG(NULL, NULL, "D-Bus transport: wait - new state: %s, %s",
+ SE_LOG_DEBUG(NULL, "D-Bus transport: wait - new state: %s, %s",
SessionCommon::ConnectionStateToString(m_state).c_str(),
m_error.c_str());
}
diff --git a/src/dbus/server/main.cpp b/src/dbus/server/main.cpp
index 3cdf6df2..1860eb24 100644
--- a/src/dbus/server/main.cpp
+++ b/src/dbus/server/main.cpp
@@ -166,7 +166,7 @@ int main(int argc, char **argv, char **envp)
// syncevo-dbus-helper.
Logger::setProcessName("syncevo-dbus-server");
- SE_LOG_DEBUG(NULL, NULL, "syncevo-dbus-server: catch SIGINT/SIGTERM in our own shutdown function");
+ SE_LOG_DEBUG(NULL, "syncevo-dbus-server: catch SIGINT/SIGTERM in our own shutdown function");
signal(SIGTERM, niam);
signal(SIGINT, niam);
boost::shared_ptr<SuspendFlags::Guard> guard = SuspendFlags::getSuspendFlags().activate();
@@ -196,22 +196,22 @@ int main(int argc, char **argv, char **envp)
dbus_bus_connection_undelay(conn);
server->run();
- SE_LOG_DEBUG(NULL, NULL, "cleaning up");
+ SE_LOG_DEBUG(NULL, "cleaning up");
#ifdef ENABLE_DBUS_PIM
manager.reset();
#endif
server.reset();
obj.reset();
guard.reset();
- SE_LOG_DEBUG(NULL, NULL, "flushing D-Bus connection");
+ SE_LOG_DEBUG(NULL, "flushing D-Bus connection");
conn.flush();
conn.reset();
- SE_LOG_INFO(NULL, NULL, "terminating");
+ SE_LOG_INFO(NULL, "terminating");
return 0;
} catch ( const std::exception &ex ) {
- SE_LOG_ERROR(NULL, NULL, "%s", ex.what());
+ SE_LOG_ERROR(NULL, "%s", ex.what());
} catch (...) {
- SE_LOG_ERROR(NULL, NULL, "unknown error");
+ SE_LOG_ERROR(NULL, "unknown error");
}
return 1;
diff --git a/src/dbus/server/network-manager-client.cpp b/src/dbus/server/network-manager-client.cpp
index 6c462d50..1a36119b 100644
--- a/src/dbus/server/network-manager-client.cpp
+++ b/src/dbus/server/network-manager-client.cpp
@@ -46,7 +46,7 @@ NetworkManagerClient::NetworkManagerClient(Server &server) :
&NetworkManagerClient::stateChanged,
this, _1));
} else {
- SE_LOG_DEBUG(NULL, NULL,
+ SE_LOG_DEBUG(NULL,
"DBus connection setup for NetworkManager failed");
}
}
@@ -61,13 +61,13 @@ void NetworkManagerClient::stateChanged(uint32_t uiState)
case NM_STATE_ASLEEP_DEPRECATED:
case NM_STATE_CONNECTING_DEPRECATED:
case NM_STATE_DISCONNECTED_DEPRECATED:
- SE_LOG_DEBUG(NULL, NULL, "NetworkManager disconnected");
+ SE_LOG_DEBUG(NULL, "NetworkManager disconnected");
m_server.getPresenceStatus().updatePresenceStatus(
false, PresenceStatus::HTTP_TRANSPORT);
break;
default:
- SE_LOG_DEBUG(NULL, NULL, "NetworkManager connected");
+ SE_LOG_DEBUG(NULL, "NetworkManager connected");
m_server.getPresenceStatus().updatePresenceStatus(
true, PresenceStatus::HTTP_TRANSPORT);
}
@@ -95,10 +95,7 @@ void NetworkManagerClient::NetworkManagerProperties::getCallback(
const std::string &error)
{
if(!error.empty()) {
- SE_LOG_DEBUG (
- NULL, NULL,
- "Error in calling Get of Interface "
- "org.freedesktop.DBus.Properties : %s", error.c_str());
+ SE_LOG_DEBUG(NULL, "Error in calling Get of Interface org.freedesktop.DBus.Properties : %s", error.c_str());
} else {
// Now, and only now, do we know that NetworkManager is running.
m_manager.m_available = true;
diff --git a/src/dbus/server/notification-backend-libnotify.cpp b/src/dbus/server/notification-backend-libnotify.cpp
index e11dc59b..caba91fa 100644
--- a/src/dbus/server/notification-backend-libnotify.cpp
+++ b/src/dbus/server/notification-backend-libnotify.cpp
@@ -62,7 +62,7 @@ gboolean (*notify_notification_show)(NotifyNotification *notification,
static bool NotFound(const char *func)
{
- SE_LOG_DEBUG(NULL, NULL, "%s: not found", func);
+ SE_LOG_DEBUG(NULL, "%s: not found", func);
return false;
}
#endif
@@ -102,7 +102,7 @@ bool NotificationBackendLibnotify::init()
for (i = 1; i <= 4; i++) {
dlhandle = dlopen(StringPrintf("libnotify.so.%d", i).c_str(), RTLD_LAZY|RTLD_GLOBAL);
if (!dlhandle) {
- SE_LOG_DEBUG(NULL, NULL, "failed to load libnotify.so.%d: %s", i, dlerror());
+ SE_LOG_DEBUG(NULL, "failed to load libnotify.so.%d: %s", i, dlerror());
} else {
break;
}
@@ -123,7 +123,7 @@ bool NotificationBackendLibnotify::init()
!LOOKUP(notify_notification_show)) {
return false;
}
- SE_LOG_DEBUG(NULL, NULL, "using libnotify.so.%d", i);
+ SE_LOG_DEBUG(NULL, "using libnotify.so.%d", i);
#endif
m_initialized = notify_init("SyncEvolution");
diff --git a/src/dbus/server/pim/edsf-view.cpp b/src/dbus/server/pim/edsf-view.cpp
index 16972f33..e0c1c531 100644
--- a/src/dbus/server/pim/edsf-view.cpp
+++ b/src/dbus/server/pim/edsf-view.cpp
@@ -53,7 +53,7 @@ void EDSFView::doStart()
ESourceCXX source(e_source_registry_ref_source(m_registry, m_uuid.c_str()), false);
if (!source) {
- SE_LOG_DEBUG(NULL, NULL, "edsf %s: address book not found", m_uuid.c_str());
+ SE_LOG_DEBUG(NULL, "edsf %s: address book not found", m_uuid.c_str());
return;
}
m_store = EdsfPersonaStoreCXX::steal(edsf_persona_store_new_with_source_registry(m_registry, source));
@@ -62,12 +62,12 @@ void EDSFView::doStart()
// TODO: use asynchronous version, once there is one in EDS
if (!getenv("SYNCEVOLUTION_NO_PIM_EDS_DIRECT")) {
while (!m_ebook) {
- SE_LOG_DEBUG(NULL, NULL, "edsf %s: synchronously connecting direct", m_uuid.c_str());
+ SE_LOG_DEBUG(NULL, "edsf %s: synchronously connecting direct", m_uuid.c_str());
m_ebook = EBookClientCXX::steal(E_BOOK_CLIENT(e_book_client_connect_direct_sync(m_registry, source, NULL, gerror)));
if (!m_ebook) {
- SE_LOG_DEBUG(NULL, NULL, "edsf %s: no DRA client for address book: %s", m_uuid.c_str(), gerror ? gerror->message : "???");
+ SE_LOG_DEBUG(NULL, "edsf %s: no DRA client for address book: %s", m_uuid.c_str(), gerror ? gerror->message : "???");
if (gerror && g_error_matches(gerror, E_CLIENT_ERROR, E_CLIENT_ERROR_BUSY)) {
- SE_LOG_DEBUG(NULL, NULL, "edsf %s: try again", m_uuid.c_str());
+ SE_LOG_DEBUG(NULL, "edsf %s: try again", m_uuid.c_str());
gerror.clear();
} else {
return;
@@ -80,14 +80,14 @@ void EDSFView::doStart()
}
#endif
- SE_LOG_DEBUG(NULL, NULL, "edsf %s: new client", m_uuid.c_str());
+ SE_LOG_DEBUG(NULL, "edsf %s: new client", m_uuid.c_str());
m_ebook = EBookClientCXX::steal(e_book_client_new(source, gerror));
if (!m_ebook) {
- SE_LOG_DEBUG(NULL, NULL, "edsf %s: no normal client for address book: %s", m_uuid.c_str(), gerror ? gerror->message : "???");
+ SE_LOG_DEBUG(NULL, "edsf %s: no normal client for address book: %s", m_uuid.c_str(), gerror ? gerror->message : "???");
return;
}
- SE_LOG_DEBUG(NULL, NULL, "edsf %s: asynchronous open", m_uuid.c_str());
+ SE_LOG_DEBUG(NULL, "edsf %s: asynchronous open", m_uuid.c_str());
SYNCEVO_GLIB_CALL_ASYNC(e_client_open,
boost::bind(&EDSFView::opened,
m_self,
@@ -102,14 +102,14 @@ void EDSFView::opened(gboolean success, const GError *gerror) throw()
{
try {
if (!success) {
- SE_LOG_DEBUG(NULL, NULL, "edsf %s: opening failed: %s", m_uuid.c_str(), gerror ? gerror->message : "???");
+ SE_LOG_DEBUG(NULL, "edsf %s: opening failed: %s", m_uuid.c_str(), gerror ? gerror->message : "???");
if (gerror && g_error_matches(gerror, E_CLIENT_ERROR, E_CLIENT_ERROR_BUSY)) {
- SE_LOG_DEBUG(NULL, NULL, "edsf %s: try again", m_uuid.c_str());
+ SE_LOG_DEBUG(NULL, "edsf %s: try again", m_uuid.c_str());
doStart();
return;
}
}
- SE_LOG_DEBUG(NULL, NULL, "edsf %s: opened successfully, reading contacts asynchronously: %s", m_uuid.c_str(), m_query.c_str());
+ SE_LOG_DEBUG(NULL, "edsf %s: opened successfully, reading contacts asynchronously: %s", m_uuid.c_str(), m_query.c_str());
SYNCEVO_GLIB_CALL_ASYNC(e_book_client_get_contacts,
boost::bind(&EDSFView::read,
m_self,
@@ -127,14 +127,14 @@ void EDSFView::opened(gboolean success, const GError *gerror) throw()
void EDSFView::read(gboolean success, GSList *contactslist, const GError *gerror) throw()
{
try {
- SE_LOG_DEBUG(NULL, NULL, "edsf %s: reading contacts completed: %s",
+ SE_LOG_DEBUG(NULL, "edsf %s: reading contacts completed: %s",
m_uuid.c_str(),
success ? "success" :
gerror ? gerror->message :
"failed without error");
GListCXX<EContact, GSList, GObjectDestructor> contacts(contactslist);
if (!success) {
- SE_LOG_DEBUG(NULL, NULL, "edsf %s: reading failed: %s", m_uuid.c_str(), gerror->message);
+ SE_LOG_DEBUG(NULL, "edsf %s: reading failed: %s", m_uuid.c_str(), gerror->message);
return;
}
diff --git a/src/dbus/server/pim/filtered-view.cpp b/src/dbus/server/pim/filtered-view.cpp
index cd354dc5..f4ea2ddf 100644
--- a/src/dbus/server/pim/filtered-view.cpp
+++ b/src/dbus/server/pim/filtered-view.cpp
@@ -89,7 +89,7 @@ void FilteredView::fillViewCb()
{
// Can we add back contacts which were excluded because of the
// maximum number of results?
- SE_LOG_DEBUG(NULL, NULL, "filtered view %s: fill view on idle", getName());
+ SE_LOG_DEBUG(NULL, "filtered view %s: fill view on idle", getName());
int candidate = m_local2parent.empty() ? 0 : m_local2parent.back() + 1;
while (!isFull() &&
candidate < m_parent->size()) {
@@ -303,7 +303,7 @@ void FilteredView::addIndividual(int parentIndex, const IndividualData &data)
if (newEndIndex > index &&
!m_filter->isIncluded(newEndIndex)) {
const IndividualData *data = m_parent->getContact(m_local2parent.back());
- SE_LOG_DEBUG(NULL, NULL, "%s: removed at #%ld/%ld to make room for new entry", getName(), (long)(newEndIndex - 1), (long)m_local2parent.size());
+ SE_LOG_DEBUG(NULL, "%s: removed at #%ld/%ld to make room for new entry", getName(), (long)(newEndIndex - 1), (long)m_local2parent.size());
m_local2parent.pop_back();
m_removedSignal(newEndIndex - 1, *data);
// Iterator might have pointed to removed entry, which may have
@@ -312,10 +312,10 @@ void FilteredView::addIndividual(int parentIndex, const IndividualData &data)
}
m_local2parent.insert(it, parentIndex);
- SE_LOG_DEBUG(NULL, NULL, "%s: added at #%ld/%ld", getName(), (long)index, (long)m_local2parent.size());
+ SE_LOG_DEBUG(NULL, "%s: added at #%ld/%ld", getName(), (long)index, (long)m_local2parent.size());
m_addedSignal(index, data);
} else {
- SE_LOG_DEBUG(NULL, NULL, "%s: not added at #%ld/%ld because outside of result range", getName(), (long)index, (long)m_local2parent.size());
+ SE_LOG_DEBUG(NULL, "%s: not added at #%ld/%ld because outside of result range", getName(), (long)index, (long)m_local2parent.size());
}
}
}
@@ -341,7 +341,7 @@ void FilteredView::removeIndividual(int parentIndex, const IndividualData &data)
if (found) {
size_t index = it - m_local2parent.begin();
- SE_LOG_DEBUG(NULL, NULL, "%s: removed at #%ld/%ld", getName(), (long)index, (long)m_local2parent.size());
+ SE_LOG_DEBUG(NULL, "%s: removed at #%ld/%ld", getName(), (long)index, (long)m_local2parent.size());
m_local2parent.erase(it);
m_removedSignal(index, data);
// Try adding more contacts from the parent once the parent
@@ -363,11 +363,11 @@ void FilteredView::modifyIndividual(int parentIndex, const IndividualData &data)
size_t index = it - m_local2parent.begin();
if (matches) {
// Still matched, merely pass on modification signal.
- SE_LOG_DEBUG(NULL, NULL, "%s: modified at #%ld/%ld", getName(), (long)index, (long)m_local2parent.size());
+ SE_LOG_DEBUG(NULL, "%s: modified at #%ld/%ld", getName(), (long)index, (long)m_local2parent.size());
m_modifiedSignal(index, data);
} else {
// Removed.
- SE_LOG_DEBUG(NULL, NULL, "%s: removed at #%ld/%ld due to modification", getName(), (long)index, (long)m_local2parent.size());
+ SE_LOG_DEBUG(NULL, "%s: removed at #%ld/%ld due to modification", getName(), (long)index, (long)m_local2parent.size());
m_local2parent.erase(it);
m_removedSignal(index, data);
fillView();
@@ -377,7 +377,7 @@ void FilteredView::modifyIndividual(int parentIndex, const IndividualData &data)
size_t index = it - m_local2parent.begin();
if (m_filter->isIncluded(index)) {
m_local2parent.insert(it, parentIndex);
- SE_LOG_DEBUG(NULL, NULL, "%s: added at #%ld/%ld due to modification", getName(), (long)index, (long)m_local2parent.size());
+ SE_LOG_DEBUG(NULL, "%s: added at #%ld/%ld due to modification", getName(), (long)index, (long)m_local2parent.size());
m_addedSignal(index, data);
}
} else {
diff --git a/src/dbus/server/pim/folks.cpp b/src/dbus/server/pim/folks.cpp
index 7c5ac7e5..7997b2db 100644
--- a/src/dbus/server/pim/folks.cpp
+++ b/src/dbus/server/pim/folks.cpp
@@ -40,9 +40,9 @@ SE_BEGIN_CXX
static void logResult(const GError *gerror, const char *operation)
{
if (gerror) {
- SE_LOG_ERROR(NULL, NULL, "%s: %s", operation, gerror->message);
+ SE_LOG_ERROR(NULL, "%s: %s", operation, gerror->message);
} else {
- SE_LOG_DEBUG(NULL, NULL, "%s: done", operation);
+ SE_LOG_DEBUG(NULL, "%s: done", operation);
}
}
@@ -63,7 +63,7 @@ public:
if (fn) {
const char *family = folks_structured_name_get_family_name(fn);
const char *given = folks_structured_name_get_given_name(fn);
- SE_LOG_DEBUG(NULL, NULL, "criteria: formatted name: %s, %s",
+ SE_LOG_DEBUG(NULL, "criteria: formatted name: %s, %s",
family, given);
if (m_firstLast) {
criteria.push_back(given ? given : "");
@@ -73,7 +73,7 @@ public:
criteria.push_back(given ? given : "");
}
} else {
- SE_LOG_DEBUG(NULL, NULL, "criteria: no formatted");
+ SE_LOG_DEBUG(NULL, "criteria: no formatted");
}
}
@@ -180,7 +180,7 @@ std::string IndividualAggregator::dumpDatabases()
void IndividualAggregator::storePrepared()
{
- SE_LOG_DEBUG(NULL, NULL, "backend store is prepared");
+ SE_LOG_DEBUG(NULL, "backend store is prepared");
// Have to hard-code the list of known backends that we don't want.
SYNCEVO_GLIB_CALL_ASYNC(folks_backend_store_disable_backend,
@@ -214,10 +214,10 @@ void IndividualAggregator::storePrepared()
void IndividualAggregator::backendsLoaded()
{
- SE_LOG_DEBUG(NULL, NULL, "backend store has loaded backends");
+ SE_LOG_DEBUG(NULL, "backend store has loaded backends");
GeeCollectionCXX coll(folks_backend_store_list_backends(m_backendStore));
BOOST_FOREACH (FolksBackend *backend, GeeCollCXX<FolksBackend *>(coll.get())) {
- SE_LOG_DEBUG(NULL, NULL, "folks backend: %s", folks_backend_get_name(backend));
+ SE_LOG_DEBUG(NULL, "folks backend: %s", folks_backend_get_name(backend));
}
m_eds =
FolksBackendCXX::steal(folks_backend_store_dup_backend_by_name(m_backendStore, "eds"));
@@ -228,7 +228,7 @@ void IndividualAggregator::backendsLoaded()
m_systemStore = systemStore;
// Tell the backend which databases we want.
- SE_LOG_DEBUG(NULL, NULL, "backends loaded: setting EDS persona stores: [%s]",
+ SE_LOG_DEBUG(NULL, "backends loaded: setting EDS persona stores: [%s]",
dumpDatabases().c_str());
folks_backend_set_persona_stores(m_eds, GEE_SET(m_databases.get()));
@@ -243,7 +243,7 @@ void IndividualAggregator::backendsLoaded()
// Execute delayed work.
m_backendsLoadedSignal();
} else {
- SE_LOG_ERROR(NULL, NULL, "EDS backend not active?!");
+ SE_LOG_ERROR(NULL, "EDS backend not active?!");
}
}
@@ -256,11 +256,11 @@ void IndividualAggregator::setDatabases(std::set<std::string> &databases)
if (m_eds) {
// Backend is loaded, tell it about the change.
- SE_LOG_DEBUG(NULL, NULL, "backends already loaded: setting EDS persona stores directly: [%s]",
+ SE_LOG_DEBUG(NULL, "backends already loaded: setting EDS persona stores directly: [%s]",
dumpDatabases().c_str());
folks_backend_set_persona_stores(m_eds, GEE_SET(m_databases.get()));
} else {
- SE_LOG_DEBUG(NULL, NULL, "backends not loaded yet: setting EDS persona stores delayed: [%s]",
+ SE_LOG_DEBUG(NULL, "backends not loaded yet: setting EDS persona stores delayed: [%s]",
dumpDatabases().c_str());
}
}
@@ -536,7 +536,7 @@ private:
done = true;
if (gerror) {
failed = true;
- SE_LOG_ERROR(NULL, NULL, "%s: %s", func, gerror->message);
+ SE_LOG_ERROR(NULL, "%s: %s", func, gerror->message);
}
}
@@ -559,7 +559,7 @@ private:
}
GeeMap *individuals = folks_individual_aggregator_get_individuals(aggregator);
- SE_LOG_DEBUG(NULL, NULL, "%d individuals", gee_map_get_size(individuals));
+ SE_LOG_DEBUG(NULL, "%d individuals", gee_map_get_size(individuals));
GeeMapIteratorCXX it(gee_map_map_iterator(individuals), false);
while (gee_map_iterator_next(it)) {
@@ -568,7 +568,7 @@ private:
false);
GValueStringCXX fullname;
g_object_get_property(G_OBJECT(individual.get()), "full-name", &fullname);
- SE_LOG_DEBUG(NULL, NULL, "map: id %s name %s = %s",
+ SE_LOG_DEBUG(NULL, "map: id %s name %s = %s",
id.get(),
fullname.toString().c_str(),
fullname.get());
@@ -581,7 +581,7 @@ private:
FolksIndividual *individual(reinterpret_cast<FolksIndividual *>(const_cast<gpointer>(gee_map_entry_get_value(entry))));
GValueStringCXX fullname;
g_object_get_property(G_OBJECT(individual), "full-name", &fullname);
- SE_LOG_DEBUG(NULL, NULL, "iterable: id %s name %s = %s",
+ SE_LOG_DEBUG(NULL, "iterable: id %s name %s = %s",
id,
fullname.toString().c_str(),
fullname.get());
@@ -597,7 +597,7 @@ private:
GValueStringCXX fullname;
g_object_get_property(G_OBJECT(individual), "full-name", &fullname);
- SE_LOG_DEBUG(NULL, NULL, "first: id %s name %s = %s",
+ SE_LOG_DEBUG(NULL, "first: id %s name %s = %s",
id,
fullname.toString().c_str(),
fullname.get());
@@ -611,16 +611,16 @@ private:
// g_object_get_property(G_OBJECT(individual), "full-name", &fullname);
const gchar *fullname = folks_name_details_get_full_name(FOLKS_NAME_DETAILS(individual));
- SE_LOG_DEBUG(NULL, NULL, "boost: id %s %s name %s",
+ SE_LOG_DEBUG(NULL, "boost: id %s %s name %s",
id,
fullname ? "has" : "has no",
fullname);
GeeSet *emails = folks_email_details_get_email_addresses(FOLKS_EMAIL_DETAILS(individual));
- SE_LOG_DEBUG(NULL, NULL, " %d emails", gee_collection_get_size(GEE_COLLECTION(emails)));
+ SE_LOG_DEBUG(NULL, " %d emails", gee_collection_get_size(GEE_COLLECTION(emails)));
typedef GeeCollCXX<FolksEmailFieldDetails *> EmailColl;
BOOST_FOREACH (FolksEmailFieldDetails *email, EmailColl(emails)) {
- SE_LOG_DEBUG(NULL, NULL, " %s",
+ SE_LOG_DEBUG(NULL, " %s",
reinterpret_cast<const gchar *>(folks_abstract_field_details_get_value(FOLKS_ABSTRACT_FIELD_DETAILS(email))));
}
}
@@ -630,7 +630,7 @@ private:
void gvalue() {
GValueBooleanCXX b(true);
- SE_LOG_DEBUG(NULL, NULL, "GValueBooleanCXX(true) = %s", b.toString().c_str());
+ SE_LOG_DEBUG(NULL, "GValueBooleanCXX(true) = %s", b.toString().c_str());
GValueBooleanCXX b2(b);
CPPUNIT_ASSERT_EQUAL(b.get(), b2.get());
b2.set(false);
@@ -639,7 +639,7 @@ private:
CPPUNIT_ASSERT_EQUAL(b.get(), b2.get());
GValueStringCXX str("foo bar");
- SE_LOG_DEBUG(NULL, NULL, "GValueStringCXX(\"foo bar\") = %s", str.toString().c_str());
+ SE_LOG_DEBUG(NULL, "GValueStringCXX(\"foo bar\") = %s", str.toString().c_str());
CPPUNIT_ASSERT(!strcmp(str.get(), "foo bar"));
GValueStringCXX str2(str);
CPPUNIT_ASSERT(!strcmp(str.get(), str2.get()));
diff --git a/src/dbus/server/pim/full-view.cpp b/src/dbus/server/pim/full-view.cpp
index 8ec65efc..fb86c77d 100644
--- a/src/dbus/server/pim/full-view.cpp
+++ b/src/dbus/server/pim/full-view.cpp
@@ -57,7 +57,7 @@ void FullView::doStart()
Coll coll(map);
guint size = gee_map_get_size(map);
individuals.reserve(size);
- SE_LOG_DEBUG(NULL, NULL, "starting with %u individuals", size);
+ SE_LOG_DEBUG(NULL, "starting with %u individuals", size);
BOOST_FOREACH (const Coll::value_type &entry, coll) {
FolksIndividual *individual = entry.value();
data.init(m_compare.get(), m_locale.get(), individual);
@@ -110,7 +110,7 @@ void FullView::individualsChanged(GeeSet *added,
FolksPersona *actor,
FolksGroupDetailsChangeReason reason)
{
- SE_LOG_DEBUG(NULL, NULL, "individuals changed, %s, %d added, %d removed, message: %s",
+ SE_LOG_DEBUG(NULL, "individuals changed, %s, %d added, %d removed, message: %s",
actor ? folks_persona_get_display_id(actor) : "<<no actor>>",
added ? gee_collection_get_size(GEE_COLLECTION(added)) : 0,
removed ? gee_collection_get_size(GEE_COLLECTION(removed)) : 0,
@@ -135,7 +135,7 @@ void FullView::individualsChanged(GeeSet *added,
void FullView::individualModified(gpointer gobject,
GParamSpec *pspec)
{
- SE_LOG_DEBUG(NULL, NULL, "individual %p modified",
+ SE_LOG_DEBUG(NULL, "individual %p modified",
gobject);
FolksIndividual *individual = FOLKS_INDIVIDUAL(gobject);
// Delay the expensive modification check until the process is
@@ -151,7 +151,7 @@ void FullView::individualModified(gpointer gobject,
void FullView::quiescenceChanged()
{
bool quiescent = folks_individual_aggregator_get_is_quiescent(m_folks);
- SE_LOG_DEBUG(NULL, NULL, "aggregator is %s", quiescent ? "quiescent" : "busy");
+ SE_LOG_DEBUG(NULL, "aggregator is %s", quiescent ? "quiescent" : "busy");
// In practice, libfolks only switches from "busy" to "quiescent"
// once. See https://bugzilla.gnome.org/show_bug.cgi?id=684766
// "enter and leave quiescence state".
@@ -159,7 +159,7 @@ void FullView::quiescenceChanged()
int seconds = atoi(getEnv("SYNCEVOLUTION_PIM_DELAY_FOLKS", "0"));
if (seconds > 0) {
// Delay the quiescent state change as requested.
- SE_LOG_DEBUG(NULL, NULL, "delay aggregrator quiescence by %d seconds", seconds);
+ SE_LOG_DEBUG(NULL, "delay aggregrator quiescence by %d seconds", seconds);
m_quiescenceDelay.runOnce(seconds,
boost::bind(&FullView::quiescenceChanged,
this));
@@ -182,7 +182,7 @@ void FullView::doAddIndividual(Entries_t::auto_type &data)
IndividualDataCompare(m_compare));
size_t index = it - m_entries.begin();
it = m_entries.insert(it, data.release());
- SE_LOG_DEBUG(NULL, NULL, "full view: added at #%ld/%ld", (long)index, (long)m_entries.size());
+ SE_LOG_DEBUG(NULL, "full view: added at #%ld/%ld", (long)index, (long)m_entries.size());
m_addedSignal(index, *it);
waitForIdle();
@@ -221,12 +221,12 @@ void FullView::modifyIndividual(FolksIndividual *individual)
// sorting became invalid => move the entry. Do it
// as simple as possible, because this is not expected
// to happen often.
- SE_LOG_DEBUG(NULL, NULL, "full view: temporarily removed at #%ld/%ld", (long)index, (long)m_entries.size());
+ SE_LOG_DEBUG(NULL, "full view: temporarily removed at #%ld/%ld", (long)index, (long)m_entries.size());
Entries_t::auto_type old = m_entries.release(it);
m_removedSignal(index, *old);
doAddIndividual(data);
} else {
- SE_LOG_DEBUG(NULL, NULL, "full view: modified at #%ld/%ld", (long)index, (long)m_entries.size());
+ SE_LOG_DEBUG(NULL, "full view: modified at #%ld/%ld", (long)index, (long)m_entries.size());
// Use potentially modified pre-computed data.
m_entries.replace(it, data.release());
m_modifiedSignal(index, *it);
@@ -237,7 +237,7 @@ void FullView::modifyIndividual(FolksIndividual *individual)
}
// Not a bug: individual might have been removed before we got
// around to processing the modification notification.
- SE_LOG_DEBUG(NULL, NULL, "full view: modified individual not found");
+ SE_LOG_DEBUG(NULL, "full view: modified individual not found");
}
void FullView::removeIndividual(FolksIndividual *individual)
@@ -247,7 +247,7 @@ void FullView::removeIndividual(FolksIndividual *individual)
++it) {
if (it->m_individual.get() == individual) {
size_t index = it - m_entries.begin();
- SE_LOG_DEBUG(NULL, NULL, "full view: removed at #%ld/%ld", (long)index, (long)m_entries.size());
+ SE_LOG_DEBUG(NULL, "full view: removed at #%ld/%ld", (long)index, (long)m_entries.size());
Entries_t::auto_type data = m_entries.release(it);
m_removedSignal(index, *data);
waitForIdle();
@@ -255,12 +255,12 @@ void FullView::removeIndividual(FolksIndividual *individual)
}
}
// A bug?!
- SE_LOG_DEBUG(NULL, NULL, "full view: individual to be removed not found");
+ SE_LOG_DEBUG(NULL, "full view: individual to be removed not found");
}
void FullView::onIdle()
{
- SE_LOG_DEBUG(NULL, NULL, "full view: process is idle");
+ SE_LOG_DEBUG(NULL, "full view: process is idle");
// Process delayed contact modifications.
BOOST_FOREACH (const FolksIndividualCXX &individual,
diff --git a/src/dbus/server/pim/individual-traits.cpp b/src/dbus/server/pim/individual-traits.cpp
index 165a02c9..7c054e52 100644
--- a/src/dbus/server/pim/individual-traits.cpp
+++ b/src/dbus/server/pim/individual-traits.cpp
@@ -695,7 +695,7 @@ static void Details2PersonaStep(const GError *gerror, const boost::shared_ptr<Pe
if (current < pending->m_changes.size()) {
// send next change, as determined earlier
Pending::Change &change = pending->m_changes[current];
- SE_LOG_DEBUG(NULL, NULL, "modification step %d/%d: %s",
+ SE_LOG_DEBUG(NULL, "modification step %d/%d: %s",
(int)current,
(int)pending->m_changes.size(),
boost::get<1>(change));
@@ -714,7 +714,7 @@ void Details2Persona(const Result<void ()> &result, const PersonaDetails &detail
boost::shared_ptr<Pending> pending(new Pending(result, persona));
#define PUSH_CHANGE(_prepare) \
- SE_LOG_DEBUG(NULL, NULL, "queueing new change: %s", #_prepare); \
+ SE_LOG_DEBUG(NULL, "queueing new change: %s", #_prepare); \
pending->m_changes.push_back(Pending::Change(boost::bind(_prepare, \
details, \
value, \
diff --git a/src/dbus/server/pim/locale-factory-boost.cpp b/src/dbus/server/pim/locale-factory-boost.cpp
index 61615fcf..b47982b9 100644
--- a/src/dbus/server/pim/locale-factory-boost.cpp
+++ b/src/dbus/server/pim/locale-factory-boost.cpp
@@ -411,8 +411,9 @@ class PhoneNumberLogger : public i18n::phonenumbers::Logger
public:
virtual void WriteMessage(const std::string &msg)
{
- SE_LOG(level() == i18n::phonenumbers::LOG_FATAL ? SyncEvo::Logger::ERROR : SyncEvo::Logger::DEBUG,
- NULL, getPrefix(), "%s", msg.c_str());
+ SE_LOG(getPrefix(),
+ level() == i18n::phonenumbers::LOG_FATAL ? SyncEvo::Logger::ERROR : SyncEvo::Logger::DEBUG,
+ "%s", msg.c_str());
}
};
diff --git a/src/dbus/server/pim/manager.cpp b/src/dbus/server/pim/manager.cpp
index 8399ac5c..1b8a949a 100644
--- a/src/dbus/server/pim/manager.cpp
+++ b/src/dbus/server/pim/manager.cpp
@@ -300,7 +300,7 @@ void Manager::stop()
// idle server has only two references to the main view:
// one inside m_folks, one given back to us here.
if (m_folks->getMainView().use_count() <= 2) {
- SE_LOG_DEBUG(NULL, NULL, "restarting due to Manager.Stop()");
+ SE_LOG_DEBUG(NULL, "restarting due to Manager.Stop()");
initFolks();
initDatabases();
initSorting(m_sortOrder);
@@ -435,7 +435,7 @@ class ViewResource : public Resource, public GDBusCXX::DBusObjectHelper
{
FolksIndividual *individual = data.m_individual.get();
const char *id = folks_individual_get_id(individual);
- SE_LOG_DEBUG(NULL, NULL, "handle change %s: %s, #%d, %s = %s",
+ SE_LOG_DEBUG(NULL, "handle change %s: %s, #%d, %s = %s",
getPath(),
&call == &m_contactsModified ? "modified" :
&call == &m_contactsAdded ? "added" :
@@ -454,7 +454,7 @@ class ViewResource : public Resource, public GDBusCXX::DBusObjectHelper
&call == &m_contactsModified &&
start >= m_lastChange.m_start &&
start < m_lastChange.m_start + (int)m_lastChange.m_ids.size()) {
- SE_LOG_DEBUG(NULL, NULL, "handle change %s: redundant 'modified' signal, ignore",
+ SE_LOG_DEBUG(NULL, "handle change %s: redundant 'modified' signal, ignore",
getPath());
return;
@@ -464,7 +464,7 @@ class ViewResource : public Resource, public GDBusCXX::DBusObjectHelper
m_pendingChange.m_call = &call;
m_pendingChange.m_start = start;
m_pendingChange.m_ids.push_back(id);
- SE_LOG_DEBUG(NULL, NULL, "handle change %s: stored as pending change",
+ SE_LOG_DEBUG(NULL, "handle change %s: stored as pending change",
getPath());
return;
}
@@ -475,7 +475,7 @@ class ViewResource : public Resource, public GDBusCXX::DBusObjectHelper
// Modification, indices are unchanged.
if (start + 1 == m_pendingChange.m_start) {
// New modified element at the front.
- SE_LOG_DEBUG(NULL, NULL, "handle change %s: insert modification, #%d + %d and #%d => #%d + %d",
+ SE_LOG_DEBUG(NULL, "handle change %s: insert modification, #%d + %d and #%d => #%d + %d",
getPath(),
m_pendingChange.m_start, pendingCount,
start,
@@ -485,7 +485,7 @@ class ViewResource : public Resource, public GDBusCXX::DBusObjectHelper
return;
} else if (start == m_pendingChange.m_start + pendingCount) {
// New modified element at the end.
- SE_LOG_DEBUG(NULL, NULL, "handle change %s: append modification, #%d + %d and #%d => #%d + %d",
+ SE_LOG_DEBUG(NULL, "handle change %s: append modification, #%d + %d and #%d => #%d + %d",
getPath(),
m_pendingChange.m_start, pendingCount,
start,
@@ -495,7 +495,7 @@ class ViewResource : public Resource, public GDBusCXX::DBusObjectHelper
} else if (start >= m_pendingChange.m_start &&
start < m_pendingChange.m_start + pendingCount) {
// Element modified again => no change, except perhaps for the ID.
- SE_LOG_DEBUG(NULL, NULL, "handle change %s: modification of already modified contact, #%d + %d and #%d => #%d + %d",
+ SE_LOG_DEBUG(NULL, "handle change %s: modification of already modified contact, #%d + %d and #%d => #%d + %d",
getPath(),
m_pendingChange.m_start, pendingCount,
start,
@@ -511,7 +511,7 @@ class ViewResource : public Resource, public GDBusCXX::DBusObjectHelper
// Adding in the middle or at the end?
int end = m_pendingChange.m_start + pendingCount;
if (start == end) {
- SE_LOG_DEBUG(NULL, NULL, "handle change %s: increase count of 'added' individuals at end, #%d + %d and #%d new => #%d + %d",
+ SE_LOG_DEBUG(NULL, "handle change %s: increase count of 'added' individuals at end, #%d + %d and #%d new => #%d + %d",
getPath(),
m_pendingChange.m_start, pendingCount,
start,
@@ -519,7 +519,7 @@ class ViewResource : public Resource, public GDBusCXX::DBusObjectHelper
m_pendingChange.m_ids.push_back(id);
return;
} else if (start < end) {
- SE_LOG_DEBUG(NULL, NULL, "handle change %s: increase count of 'added' individuals in the middle, #%d + %d and #%d new => #%d + %d",
+ SE_LOG_DEBUG(NULL, "handle change %s: increase count of 'added' individuals in the middle, #%d + %d and #%d new => #%d + %d",
getPath(),
m_pendingChange.m_start, pendingCount,
start,
@@ -531,7 +531,7 @@ class ViewResource : public Resource, public GDBusCXX::DBusObjectHelper
} else {
// Adding directly before the previous start?
if (start + 1 == m_pendingChange.m_start) {
- SE_LOG_DEBUG(NULL, NULL, "handle change %s: reduce start and increase count of 'added' individuals, #%d + %d and #%d => #%d + %d",
+ SE_LOG_DEBUG(NULL, "handle change %s: reduce start and increase count of 'added' individuals, #%d + %d and #%d => #%d + %d",
getPath(),
m_pendingChange.m_start, pendingCount,
start,
@@ -547,7 +547,7 @@ class ViewResource : public Resource, public GDBusCXX::DBusObjectHelper
int newCount = m_pendingChange.m_ids.size() + 1;
if (start == m_pendingChange.m_start) {
// Removing directly at end.
- SE_LOG_DEBUG(NULL, NULL, "handle change %s: increase count of 'removed' individuals, #%d + %d and #%d => #%d + %d",
+ SE_LOG_DEBUG(NULL, "handle change %s: increase count of 'removed' individuals, #%d + %d and #%d => #%d + %d",
getPath(),
m_pendingChange.m_start, pendingCount,
start,
@@ -556,7 +556,7 @@ class ViewResource : public Resource, public GDBusCXX::DBusObjectHelper
return;
} else if (start + 1 == m_pendingChange.m_start) {
// Removing directly before the previous start.
- SE_LOG_DEBUG(NULL, NULL, "handle change %s: reduce start and increase count of 'removed' individuals, #%d + %d and #%d => #%d + %d",
+ SE_LOG_DEBUG(NULL, "handle change %s: reduce start and increase count of 'removed' individuals, #%d + %d and #%d => #%d + %d",
getPath(),
m_pendingChange.m_start, pendingCount,
start,
@@ -578,7 +578,7 @@ class ViewResource : public Resource, public GDBusCXX::DBusObjectHelper
start == m_pendingChange.m_start &&
1 == m_pendingChange.m_ids.size() &&
m_pendingChange.m_ids.front() == id) {
- SE_LOG_DEBUG(NULL, NULL, "handle change %s: removed individual was re-added => #%d modified",
+ SE_LOG_DEBUG(NULL, "handle change %s: removed individual was re-added => #%d modified",
getPath(),
start);
m_pendingChange.m_call = &m_contactsModified;
@@ -600,7 +600,7 @@ class ViewResource : public Resource, public GDBusCXX::DBusObjectHelper
{
int count = m_pendingChange.m_ids.size();
if (count) {
- SE_LOG_DEBUG(NULL, NULL, "send change %s: %s, #%d + %d",
+ SE_LOG_DEBUG(NULL, "send change %s: %s, #%d + %d",
getPath(),
m_pendingChange.m_call == &m_contactsModified ? "modified" :
m_pendingChange.m_call == &m_contactsAdded ? "added" :
@@ -638,7 +638,7 @@ class ViewResource : public Resource, public GDBusCXX::DBusObjectHelper
{
if (required && !error.empty()) {
// remove view because it is no longer needed
- SE_LOG_DEBUG(NULL, NULL, "ViewAgent %s method call failed, deleting view: %s", method, error.c_str());
+ SE_LOG_DEBUG(NULL, "ViewAgent %s method call failed, deleting view: %s", method, error.c_str());
boost::shared_ptr<ViewResource> r = self.lock();
if (r) {
r->close();
@@ -848,7 +848,7 @@ void Manager::doSearch(const ESourceRegistryCXX &registry,
view = FilteredView::create(view, individualFilter);
view->setName(StringPrintf("filtered view%u", ViewResource::getNextViewNumber()));
- SE_LOG_DEBUG(NULL, NULL, "preparing %s: EDS search term is '%s', active address books %s",
+ SE_LOG_DEBUG(NULL, "preparing %s: EDS search term is '%s', active address books %s",
view->getName(),
ebookFilter.c_str(),
boost::join(m_enabledEBooks, " ").c_str());
@@ -1063,7 +1063,7 @@ void Manager::doSetPeer(const boost::shared_ptr<Session> &session,
std::string context = StringPrintf("@%s%s", MANAGER_PREFIX, uid.c_str());
- SE_LOG_DEBUG(NULL, NULL, "%s: creating config for protocol %s",
+ SE_LOG_DEBUG(NULL, "%s: creating config for protocol %s",
uid.c_str(),
protocol.c_str());
@@ -1175,7 +1175,7 @@ void Manager::doSetPeer(const boost::shared_ptr<Session> &session,
}
// Report success.
- SE_LOG_DEBUG(NULL, NULL, "%s: created config for protocol %s",
+ SE_LOG_DEBUG(NULL, "%s: created config for protocol %s",
uid.c_str(),
protocol.c_str());
result->done();
diff --git a/src/dbus/server/pim/merge-view.cpp b/src/dbus/server/pim/merge-view.cpp
index eecf0e4a..c6ccc132 100644
--- a/src/dbus/server/pim/merge-view.cpp
+++ b/src/dbus/server/pim/merge-view.cpp
@@ -82,7 +82,7 @@ void MergeView::addEDSIndividual(const FolksIndividualCXX &individual) throw ()
IndividualDataCompare(m_compare));
size_t index = it - m_entries.begin();
it = m_entries.insert(it, data.release());
- SE_LOG_DEBUG(NULL, NULL, "%s: added at #%ld/%ld", getName(), (long)index, (long)m_entries.size());
+ SE_LOG_DEBUG(NULL, "%s: added at #%ld/%ld", getName(), (long)index, (long)m_entries.size());
m_addedSignal(index, *it);
} catch (...) {
Exception::handle(HANDLE_EXCEPTION_NO_ERROR);
@@ -92,14 +92,14 @@ void MergeView::addEDSIndividual(const FolksIndividualCXX &individual) throw ()
void MergeView::edsDone(const std::string &uuid) throw ()
{
try {
- SE_LOG_DEBUG(NULL, NULL, "%s: %s is done", getName(), uuid.c_str());
+ SE_LOG_DEBUG(NULL, "%s: %s is done", getName(), uuid.c_str());
BOOST_FOREACH (const Searches::value_type &search, m_searches) {
if (!search->isQuiescent()) {
- SE_LOG_DEBUG(NULL, NULL, "%s: still waiting for %s", getName(), search->getName());
+ SE_LOG_DEBUG(NULL, "%s: still waiting for %s", getName(), search->getName());
return;
}
}
- SE_LOG_DEBUG(NULL, NULL, "%s: all EDS searches done, %s", getName(), m_viewReady ? "folks also done" : "still waiting for folks, send quiescent now");
+ SE_LOG_DEBUG(NULL, "%s: all EDS searches done, %s", getName(), m_viewReady ? "folks also done" : "still waiting for folks, send quiescent now");
if (!m_viewReady) {
// folks is still busy, this may take a while. Therefore
// flush current status.
@@ -148,7 +148,7 @@ void MergeView::viewReady() throw ()
if (!m_viewReady) {
m_viewReady = true;
- SE_LOG_DEBUG(NULL, NULL, "%s: folks is ready: %d entries from EDS, %d from folks",
+ SE_LOG_DEBUG(NULL, "%s: folks is ready: %d entries from EDS, %d from folks",
getName(),
(int)m_entries.size(),
(int)m_view->size());
@@ -163,7 +163,7 @@ void MergeView::viewReady() throw ()
// that if the underlying contacts are identical, then
// so must be the data.
if (!SamePersonas(oldData.m_individual, newData->m_individual)) {
- SE_LOG_DEBUG(NULL, NULL, "%s: entry #%d modified",
+ SE_LOG_DEBUG(NULL, "%s: entry #%d modified",
getName(),
index);
m_modifiedSignal(index, *newData);
@@ -171,7 +171,7 @@ void MergeView::viewReady() throw ()
}
for (; index < m_view->size(); index++) {
const IndividualData *newData = m_view->getContact(index);
- SE_LOG_DEBUG(NULL, NULL, "%s: entry #%d added",
+ SE_LOG_DEBUG(NULL, "%s: entry #%d added",
getName(),
index);
m_addedSignal(index, *newData);
@@ -181,7 +181,7 @@ void MergeView::viewReady() throw ()
int removeAt = index;
for (; index < (int)m_entries.size(); index++) {
const IndividualData &oldData = m_entries[index];
- SE_LOG_DEBUG(NULL, NULL, "%s: entry #%d removed",
+ SE_LOG_DEBUG(NULL, "%s: entry #%d removed",
getName(),
index);
m_removedSignal(removeAt, oldData);
@@ -196,7 +196,7 @@ void MergeView::viewReady() throw ()
} catch (...) {
Exception::handle(HANDLE_EXCEPTION_NO_ERROR);
}
- SE_LOG_DEBUG(NULL, NULL, "%s: switched to folks, quiescent", getName());
+ SE_LOG_DEBUG(NULL, "%s: switched to folks, quiescent", getName());
m_quiescenceSignal();
}
} catch (...) {
diff --git a/src/dbus/server/pim/view.cpp b/src/dbus/server/pim/view.cpp
index 82553a2c..11fc4e30 100644
--- a/src/dbus/server/pim/view.cpp
+++ b/src/dbus/server/pim/view.cpp
@@ -24,7 +24,7 @@ SE_BEGIN_CXX
void View::start()
{
- SE_LOG_DEBUG(NULL, NULL, "%s: start() %s",
+ SE_LOG_DEBUG(NULL, "%s: start() %s",
getName(),
m_started ? "already done" : "doing it now");
if (!m_started) {
diff --git a/src/dbus/server/presence-status.cpp b/src/dbus/server/presence-status.cpp
index fc2b6f89..5c9b3e52 100644
--- a/src/dbus/server/presence-status.cpp
+++ b/src/dbus/server/presence-status.cpp
@@ -134,20 +134,20 @@ void PresenceStatus::updatePresenceStatus (bool httpPresence, bool btPresence) {
if (boost::starts_with (url, "http") && (httpChanged || !initiated)) {
entry.second = m_httpPresence ? MIGHTWORK: NOTRANSPORT;
m_server.emitPresence (peer.first, status2string (entry.second), entry.first);
- SE_LOG_DEBUG(NULL, NULL,
+ SE_LOG_DEBUG(NULL,
"http presence signal %s,%s,%s",
peer.first.c_str(),
status2string (entry.second).c_str(), entry.first.c_str());
} else if (boost::starts_with (url, "obex-bt") && (btChanged || !initiated)) {
entry.second = m_btPresence ? MIGHTWORK: NOTRANSPORT;
m_server.emitPresence (peer.first, status2string (entry.second), entry.first);
- SE_LOG_DEBUG(NULL, NULL,
+ SE_LOG_DEBUG(NULL,
"bluetooth presence signal %s,%s,%s",
peer.first.c_str(),
status2string (entry.second).c_str(), entry.first.c_str());
} else if (boost::starts_with (url, "local") && !initiated) {
m_server.emitPresence (peer.first, status2string (MIGHTWORK), entry.first);
- SE_LOG_DEBUG(NULL, NULL,
+ SE_LOG_DEBUG(NULL,
"local presence signal %s,%s,%s",
peer.first.c_str(),
status2string (MIGHTWORK).c_str(), entry.first.c_str());
diff --git a/src/dbus/server/server.cpp b/src/dbus/server/server.cpp
index 663189a0..f483471d 100644
--- a/src/dbus/server/server.cpp
+++ b/src/dbus/server/server.cpp
@@ -45,7 +45,7 @@ SE_BEGIN_CXX
static void logIdle(bool idle)
{
- SE_LOG_DEBUG(NULL, NULL, "server is %s", idle ? "idle" : "not idle");
+ SE_LOG_DEBUG(NULL, "server is %s", idle ? "idle" : "not idle");
}
void Server::clientGone(Client *c)
@@ -54,14 +54,14 @@ void Server::clientGone(Client *c)
it != m_clients.end();
++it) {
if (it->second.get() == c) {
- SE_LOG_DEBUG(NULL, NULL, "D-Bus client %s has disconnected",
+ SE_LOG_DEBUG(NULL, "D-Bus client %s has disconnected",
c->m_ID.c_str());
autoTermUnref(it->second->getAttachCount());
m_clients.erase(it);
return;
}
}
- SE_LOG_DEBUG(NULL, NULL, "unknown client has disconnected?!");
+ SE_LOG_DEBUG(NULL, "unknown client has disconnected?!");
}
std::string Server::getNextSession()
@@ -168,7 +168,7 @@ void Server::connect(const Caller_t &caller,
new_session,
peer,
must_authenticate));
- SE_LOG_DEBUG(NULL, NULL, "connecting D-Bus client %s with connection %s '%s'",
+ SE_LOG_DEBUG(NULL, "connecting D-Bus client %s with connection %s '%s'",
caller.c_str(),
c->getPath(),
c->m_description.c_str());
@@ -370,17 +370,17 @@ bool Server::shutdown()
{
Timespec now = Timespec::monotonic();
bool autosync = m_autoSync && m_autoSync->preventTerm();
- SE_LOG_DEBUG(NULL, NULL, "shut down or restart server at %lu.%09lu because of file modifications, auto sync %s",
+ SE_LOG_DEBUG(NULL, "shut down or restart server at %lu.%09lu because of file modifications, auto sync %s",
now.tv_sec, now.tv_nsec, autosync ? "on" : "off");
if (autosync) {
// suitable exec() call which restarts the server using the same environment it was in
// when it was started
- SE_LOG_INFO(NULL, NULL, "server restarting because files loaded into memory were modified on disk");
+ SE_LOG_INFO(NULL, "server restarting because files loaded into memory were modified on disk");
m_restart->restart();
} else {
// leave server now
g_main_loop_quit(m_loop);
- SE_LOG_INFO(NULL, NULL, "server shutting down because files loaded into memory were modified on disk");
+ SE_LOG_INFO(NULL, "server shutting down because files loaded into memory were modified on disk");
}
return false;
@@ -388,7 +388,7 @@ bool Server::shutdown()
void Server::fileModified()
{
- SE_LOG_DEBUG(NULL, NULL, "file modified, %s shutdown: %s, %s",
+ SE_LOG_DEBUG(NULL, "file modified, %s shutdown: %s, %s",
m_shutdownRequested ? "continuing" : "initiating",
m_shutdownTimer ? "timer already active" : "timer not yet active",
m_activeSession ? "waiting for active session to finish" : "setting timer");
@@ -406,9 +406,9 @@ void Server::run()
// memory which might be dynamically loadable, like backend
// plugins.
StringMap map = getVersions();
- SE_LOG_DEBUG(NULL, NULL, "D-Bus server ready to run, versions:");
+ SE_LOG_DEBUG(NULL, "D-Bus server ready to run, versions:");
BOOST_FOREACH(const StringPair &entry, map) {
- SE_LOG_DEBUG(NULL, NULL, "%s: %s", entry.first.c_str(), entry.second.c_str());
+ SE_LOG_DEBUG(NULL, "%s: %s", entry.first.c_str(), entry.second.c_str());
}
// Now that everything is loaded, check memory map for files which we have to monitor.
@@ -426,7 +426,7 @@ void Server::run()
in.close();
BOOST_FOREACH(const string &file, files) {
try {
- SE_LOG_DEBUG(NULL, NULL, "watching: %s", file.c_str());
+ SE_LOG_DEBUG(NULL, "watching: %s", file.c_str());
boost::shared_ptr<SyncEvo::GLibNotify> notify(new GLibNotify(file.c_str(), boost::bind(&Server::fileModified, this)));
m_files.push_back(notify);
} catch (...) {
@@ -435,12 +435,12 @@ void Server::run()
}
}
- SE_LOG_INFO(NULL, NULL, "ready to run");
+ SE_LOG_INFO(NULL, "ready to run");
if (!m_shutdownRequested) {
g_main_loop_run(m_loop);
}
- SE_LOG_DEBUG(NULL, NULL, "%s", "Exiting Server::run");
+ SE_LOG_DEBUG(NULL, "%s", "Exiting Server::run");
}
@@ -512,7 +512,7 @@ void Server::killSessionsAsync(const std::string &peerDeviceID,
while (it != m_workQueue.end()) {
boost::shared_ptr<Session> session = it->lock();
if (session && session->getPeerDeviceID() == peerDeviceID) {
- SE_LOG_DEBUG(NULL, NULL, "removing pending session %s because it matches deviceID %s",
+ SE_LOG_DEBUG(NULL, "removing pending session %s because it matches deviceID %s",
session->getSessionID().c_str(),
peerDeviceID.c_str());
// remove session and its corresponding connection
@@ -530,7 +530,7 @@ void Server::killSessionsAsync(const std::string &peerDeviceID,
boost::shared_ptr<Session> active = m_activeSessionRef.lock();
if (active &&
active->getPeerDeviceID() == peerDeviceID) {
- SE_LOG_DEBUG(NULL, NULL, "aborting active session %s because it matches deviceID %s",
+ SE_LOG_DEBUG(NULL, "aborting active session %s because it matches deviceID %s",
active->getSessionID().c_str(),
peerDeviceID.c_str());
// hand over work to session
@@ -606,14 +606,14 @@ void Server::removeSyncSession(Session *session)
delaySessionDestruction(m_syncSession);
m_syncSession.reset();
} else {
- SE_LOG_DEBUG(NULL, NULL, "ignoring removeSyncSession() for session %s, it is not the sync session",
+ SE_LOG_DEBUG(NULL, "ignoring removeSyncSession() for session %s, it is not the sync session",
session->getSessionID().c_str());
}
}
static void quitLoop(GMainLoop *loop)
{
- SE_LOG_DEBUG(NULL, NULL, "stopping server's event loop");
+ SE_LOG_DEBUG(NULL, "stopping server's event loop");
g_main_loop_quit(loop);
}
@@ -629,7 +629,7 @@ void Server::checkQueue()
// But don't do it immediately: when done inside the Session.Detach()
// call, the D-Bus response was not delivered reliably to the client
// which caused the shutdown.
- SE_LOG_DEBUG(NULL, NULL, "shutting down in checkQueue(), idle and shutdown was requested");
+ SE_LOG_DEBUG(NULL, "shutting down in checkQueue(), idle and shutdown was requested");
addTimeout(boost::bind(quitLoop, m_loop), 0);
return;
}
@@ -650,7 +650,7 @@ void Server::checkQueue()
void Server::sessionExpired(const boost::shared_ptr<Session> &session)
{
- SE_LOG_DEBUG(NULL, NULL, "session %s expired",
+ SE_LOG_DEBUG(NULL, "session %s expired",
session->getSessionID().c_str());
}
@@ -660,7 +660,7 @@ void Server::delaySessionDestruction(const boost::shared_ptr<Session> &session)
return;
}
- SE_LOG_DEBUG(NULL, NULL, "delaying destruction of session %s by one minute",
+ SE_LOG_DEBUG(NULL, "delaying destruction of session %s by one minute",
session->getSessionID().c_str());
addTimeout(boost::bind(&Server::sessionExpired,
session),
diff --git a/src/dbus/server/session-helper.cpp b/src/dbus/server/session-helper.cpp
index a22be21e..11fb93f9 100644
--- a/src/dbus/server/session-helper.cpp
+++ b/src/dbus/server/session-helper.cpp
@@ -123,12 +123,12 @@ void SessionHelper::run()
SuspendFlags &s = SuspendFlags::getSuspendFlags();
while (true) {
if (s.getState() != SuspendFlags::NORMAL) {
- SE_LOG_DEBUG(NULL, NULL, "terminating because of suspend or abort signal");
+ SE_LOG_DEBUG(NULL, "terminating because of suspend or abort signal");
break;
}
if (m_operation &&
m_operation()) {
- SE_LOG_DEBUG(NULL, NULL, "terminating as requested by operation");
+ SE_LOG_DEBUG(NULL, "terminating as requested by operation");
break;
}
g_main_loop_run(m_loop);
@@ -154,6 +154,10 @@ bool SessionHelper::doSync(const SessionCommon::SyncParams &params,
m_sync.reset(new DBusSync(params, *this));
SyncMLStatus status = m_sync->sync();
if (status) {
+ // Clear the abort signal, to allow the process to send
+ // out the D-Bus response. Our parent will signal us again
+ // after it received the response.
+ // TODO
SE_THROW_EXCEPTION_STATUS(StatusException,
"sync failed",
status);
@@ -258,7 +262,7 @@ void SessionHelper::passwordResponse(bool timedOut, bool aborted, const std::str
if (m_sync) {
m_sync->passwordResponse(timedOut, aborted, password);
} else {
- SE_LOG_DEBUG(NULL, NULL, "discarding obsolete password response");
+ SE_LOG_DEBUG(NULL, "discarding obsolete password response");
}
}
diff --git a/src/dbus/server/session.cpp b/src/dbus/server/session.cpp
index c6e00b72..eb35ebc4 100644
--- a/src/dbus/server/session.cpp
+++ b/src/dbus/server/session.cpp
@@ -590,7 +590,7 @@ Session::Session(Server &server,
add(emitStatus);
add(emitProgress);
- SE_LOG_DEBUG(NULL, NULL, "session %s created", getPath());
+ SE_LOG_DEBUG(NULL, "session %s created", getPath());
}
void Session::passwordRequest(const std::string &descr, const ConfigPasswordKey &key)
@@ -603,7 +603,7 @@ void Session::dbusResultCb(const std::string &operation, bool success, const std
{
Session::LoggingGuard guard(this);
try {
- SE_LOG_DEBUG(NULL, NULL, "%s helper call completed, %s",
+ SE_LOG_DEBUG(NULL, "%s helper call completed, %s",
operation.c_str(),
!error.empty() ? error.c_str() :
success ? "<<successfully>>" :
@@ -652,7 +652,7 @@ void Session::failureCb() throw()
}
// set error, but don't overwrite older one
if (!m_error) {
- SE_LOG_DEBUG(NULL, NULL, "session failed: remember %d error", error);
+ SE_LOG_DEBUG(NULL, "session failed: remember %d error", error);
m_error = error;
}
// will fire status signal, including the error
@@ -690,7 +690,7 @@ void Session::doneCb(bool success) throw()
m_server.m_configChangedSignal(m_configName);
}
- SE_LOG_DEBUG(NULL, NULL, "session %s done, config %s, %s, result %d",
+ SE_LOG_DEBUG(NULL, "session %s done, config %s, %s, result %d",
getPath(),
m_configName.c_str(),
m_setConfig ? "modified" : "not modified",
@@ -713,7 +713,7 @@ void Session::doneCb(bool success) throw()
Session::~Session()
{
- SE_LOG_DEBUG(NULL, NULL, "session %s deconstructing", getPath());
+ SE_LOG_DEBUG(NULL, "session %s deconstructing", getPath());
doneCb();
}
@@ -879,7 +879,7 @@ void Session::onConnect(const GDBusCXX::DBusConnectionPtr &conn) throw ()
{
Session::LoggingGuard guard(this);
try {
- SE_LOG_DEBUG(NULL, NULL, "helper has connected");
+ SE_LOG_DEBUG(NULL, "helper has connected");
m_helper.reset(new SessionProxy(conn));
// Activate signal watch on helper signals.
@@ -898,19 +898,19 @@ void Session::onQuit(int status) throw ()
{
Session::LoggingGuard guard(this);
try {
- SE_LOG_DEBUG(NULL, NULL, "helper quit with return code %d, was %s",
+ SE_LOG_DEBUG(NULL, "helper quit with return code %d, was %s",
status,
m_wasAborted ? "aborted" : "not aborted");
if (m_status == SESSION_DONE) {
// don't care anymore whether the helper goes down, not an error
- SE_LOG_DEBUG(NULL, NULL, "session already completed, ignore helper");
+ SE_LOG_DEBUG(NULL, "session already completed, ignore helper");
} else if (m_wasAborted &&
((WIFEXITED(status) && WEXITSTATUS(status) == 0) ||
(WIFSIGNALED(status) && WTERMSIG(status) == SIGTERM))) {
- SE_LOG_DEBUG(NULL, NULL, "helper terminated via SIGTERM, as expected");
+ SE_LOG_DEBUG(NULL, "helper terminated via SIGTERM, as expected");
if (!m_error) {
m_error = sysync::LOCERR_USERABORT;
- SE_LOG_DEBUG(NULL, NULL, "helper was asked to quit -> error %d = LOCERR_USERABORT",
+ SE_LOG_DEBUG(NULL, "helper was asked to quit -> error %d = LOCERR_USERABORT",
m_error);
}
} else {
@@ -943,7 +943,7 @@ void Session::onFailure(SyncMLStatus status, const std::string &explanation) thr
{
Session::LoggingGuard guard(this);
try {
- SE_LOG_DEBUG(NULL, NULL, "helper failed, status code %d = %s, %s",
+ SE_LOG_DEBUG(NULL, "helper failed, status code %d = %s, %s",
status,
Status2String(status).c_str(),
explanation.c_str());
@@ -958,7 +958,7 @@ void Session::onOutput(const char *buffer, size_t length)
// treat null-bytes inside the buffer like line breaks
size_t off = 0;
do {
- SE_LOG_ERROR(NULL, "session-helper", "%s", buffer + off);
+ SE_LOG_ERROR("session-helper", "%s", buffer + off);
off += strlen(buffer + off) + 1;
} while (off < length);
}
@@ -1018,7 +1018,7 @@ void Session::syncProgress(sysync::TProgressEventEnum type,
// result of the sync method invocation.
//
// if((uint32_t)extra1 != m_error) {
- // SE_LOG_DEBUG(NULL, NULL, "session sync progress: failed with code %d", extra1);
+ // SE_LOG_DEBUG(NULL, "session sync progress: failed with code %d", extra1);
// m_error = extra1;
// fireStatus(true);
// }
diff --git a/src/dbus/server/sync-helper.cpp b/src/dbus/server/sync-helper.cpp
index 933d417d..dc614196 100644
--- a/src/dbus/server/sync-helper.cpp
+++ b/src/dbus/server/sync-helper.cpp
@@ -39,7 +39,7 @@ namespace {
// call m_onFailure instead of throwing an exception
void onFailure(const std::string &error, bool &failed) throw ()
{
- SE_LOG_DEBUG(NULL, NULL, "failure, quitting now: %s", error.c_str());
+ SE_LOG_DEBUG(NULL, "failure, quitting now: %s", error.c_str());
failed = true;
}
@@ -119,11 +119,11 @@ int main(int argc, char **argv, char **envp)
// Run until we are connected, failed or get interrupted.
boost::signals2::connection c =
s.m_stateChanged.connect(boost::bind(&onAbort));
- SE_LOG_DEBUG(NULL, NULL, "helper (pid %d) finished setup, waiting for parent connection", getpid());
+ SE_LOG_DEBUG(NULL, "helper (pid %d) finished setup, waiting for parent connection", getpid());
while (true) {
if (s.getState() != SuspendFlags::NORMAL) {
// not an error, someone wanted us to stop
- SE_LOG_DEBUG(NULL, NULL, "aborted via signal while starting, terminating");
+ SE_LOG_DEBUG(NULL, "aborted via signal while starting, terminating");
// tell caller that we aborted by terminating via the SIGTERM signal
return 0;
}
@@ -141,12 +141,12 @@ int main(int argc, char **argv, char **envp)
// TODO: What if the parent fails to call us and instead closes his
// side of the connection? Will we notice and abort?
c.disconnect();
- SE_LOG_DEBUG(NULL, NULL, "connected to parent, run helper");
+ SE_LOG_DEBUG(NULL, "connected to parent, run helper");
helper->run();
- SE_LOG_DEBUG(NULL, NULL, "helper operation done");
+ SE_LOG_DEBUG(NULL, "helper operation done");
helper.reset();
- SE_LOG_DEBUG(NULL, NULL, "helper destroyed");
+ SE_LOG_DEBUG(NULL, "helper destroyed");
// Wait for confirmation from parent that we are allowed to
// quit. This is necessary because we might have pending IO
@@ -154,20 +154,20 @@ int main(int argc, char **argv, char **envp)
while (true) {
if (s.getState() == SuspendFlags::ABORT) {
// not an error, someone wanted us to stop
- SE_LOG_DEBUG(NULL, NULL, "aborted via signal after completing operation, terminating");
+ SE_LOG_DEBUG(NULL, "aborted via signal after completing operation, terminating");
return 0;
}
if (forkexec->getState() != ForkExecChild::CONNECTED) {
// no point running any longer, parent is gone
- SE_LOG_DEBUG(NULL, NULL, "parent has quit, terminating");
+ SE_LOG_DEBUG(NULL, "parent has quit, terminating");
return 1;
}
g_main_context_iteration(NULL, true);
}
} catch ( const std::exception &ex ) {
- SE_LOG_ERROR(NULL, NULL, "%s", ex.what());
+ SE_LOG_ERROR(NULL, "%s", ex.what());
} catch (...) {
- SE_LOG_ERROR(NULL, NULL, "unknown error");
+ SE_LOG_ERROR(NULL, "unknown error");
}
return 1;
diff --git a/src/syncevo/Cmdline.cpp b/src/syncevo/Cmdline.cpp
index beb92c05..93c908c1 100644
--- a/src/syncevo/Cmdline.cpp
+++ b/src/syncevo/Cmdline.cpp
@@ -690,7 +690,7 @@ bool Cmdline::run() {
if (m_usage) {
usage(true);
} else if (m_version) {
- SE_LOG_SHOW(NULL, NULL, "SyncEvolution %s%s\n%s%s",
+ SE_LOG_SHOW(NULL, "SyncEvolution %s%s\n%s%s",
VERSION,
SyncContext::isStableRelease() ? "" : " (pre-release)",
EDSAbiWrapperInfo(),
@@ -777,7 +777,7 @@ bool Cmdline::run() {
}
(this->*operation)(source.get(), header);
} else {
- SE_LOG_SHOW(NULL, NULL, "%s:\n cannot access databases", header.c_str());
+ SE_LOG_SHOW(NULL, "%s:\n cannot access databases", header.c_str());
}
} else {
// list for all backends
@@ -795,7 +795,7 @@ bool Cmdline::run() {
auto_ptr<SyncSource> source(SyncSource::createSource(params, false));
(this->*operation)(source.get(), header);
} catch (...) {
- SE_LOG_ERROR(NULL, NULL, "%s:\naccessing databases failed", header.c_str());
+ SE_LOG_ERROR(NULL, "%s:\naccessing databases failed", header.c_str());
Exception::handle();
}
}
@@ -814,7 +814,7 @@ bool Cmdline::run() {
}
config.reset(new SyncConfig(m_server));
if (!config->exists()) {
- SE_LOG_ERROR(NULL, NULL, "Server '%s' has not been configured yet.", m_server.c_str());
+ SE_LOG_ERROR(NULL, "Server '%s' has not been configured yet.", m_server.c_str());
return false;
}
@@ -829,7 +829,7 @@ bool Cmdline::run() {
peer, context);
config = SyncConfig::createPeerTemplate(peer);
if (!config.get()) {
- SE_LOG_ERROR(NULL, NULL, "No configuration template for '%s' available.", m_template.c_str());
+ SE_LOG_ERROR(NULL, "No configuration template for '%s' available.", m_template.c_str());
return false;
}
@@ -865,7 +865,7 @@ bool Cmdline::run() {
BOOST_FOREACH(const string &name, sources) {
if (m_sources.empty() ||
m_sources.find(name) != m_sources.end()) {
- SE_LOG_SHOW(NULL, NULL, "[%s]", name.c_str());
+ SE_LOG_SHOW(NULL, "[%s]", name.c_str());
SyncSourceNodes nodes = config->getSyncSourceNodes(name);
boost::shared_ptr<FilterConfigNode> sourceProps = nodes.getProperties();
sourceProps->setFilter(sourceFilters.createSourceFilter(name));
@@ -917,7 +917,7 @@ bool Cmdline::run() {
string origPeer;
if (m_migrate) {
if (!m_sources.empty()) {
- SE_LOG_ERROR(NULL, NULL, "cannot migrate individual sources");
+ SE_LOG_ERROR(NULL, "cannot migrate individual sources");
return false;
}
@@ -928,7 +928,7 @@ bool Cmdline::run() {
oldContext = "";
from.reset(new SyncConfig(peer));
if (!from->exists()) {
- SE_LOG_ERROR(NULL, NULL, "Server '%s' has not been configured yet.", m_server.c_str());
+ SE_LOG_ERROR(NULL, "Server '%s' has not been configured yet.", m_server.c_str());
return false;
}
}
@@ -1005,7 +1005,7 @@ bool Cmdline::run() {
if (SyncConfig::splitConfigString(SyncConfig::normalizeConfigString(configTemplate,
SyncConfig::NormalizeFlags(SyncConfig::NORMALIZE_SHORTHAND|SyncConfig::NORMALIZE_IS_NEW)),
peer, context)) {
- SE_LOG_ERROR(NULL, NULL, "Template %s must not specify a context.", configTemplate.c_str());
+ SE_LOG_ERROR(NULL, "Template %s must not specify a context.", configTemplate.c_str());
return false;
}
string tmp;
@@ -1035,15 +1035,15 @@ bool Cmdline::run() {
}
}
if (!from.get()) {
- SE_LOG_ERROR(NULL, NULL, "No configuration template for '%s' available.", configTemplate.c_str());
+ SE_LOG_ERROR(NULL, "No configuration template for '%s' available.", configTemplate.c_str());
if (m_template.empty()) {
- SE_LOG_INFO(NULL, NULL,
+ SE_LOG_INFO(NULL,
"Use '--template none' and/or specify relevant properties on the command line to create a configuration without a template. Need values for: %s",
boost::join(missing, ", ").c_str());
} else if (missing.empty()) {
- SE_LOG_INFO(NULL, NULL, "All relevant properties seem to be set, omit the --template parameter to proceed.");
+ SE_LOG_INFO(NULL, "All relevant properties seem to be set, omit the --template parameter to proceed.");
}
- SE_LOG_INFO(NULL, NULL, "\n");
+ SE_LOG_INFO(NULL, "\n");
SyncConfig::DeviceList devices;
devices.push_back(SyncConfig::DeviceDescription("", "", SyncConfig::MATCH_ALL));
dumpConfigTemplates("Available configuration templates (clients and servers):",
@@ -1150,7 +1150,7 @@ bool Cmdline::run() {
// TODO: update complete --configure output to be more informative.
// This is a first step, but shouldn't be done in isolation.
- // SE_LOG_INFO(NULL, NULL, "%s configuration %s",
+ // SE_LOG_INFO(NULL, "%s configuration %s",
// fromScratch ? "creating" : "updating",
// to->getConfigName().c_str());
@@ -1186,7 +1186,7 @@ bool Cmdline::run() {
// check whether the sync source works; this can
// take some time, so allow the user to abort
- SE_LOG_INFO(NULL, NULL, "%s: looking for databases...",
+ SE_LOG_INFO(NULL, "%s: looking for databases...",
source.c_str());
SyncSourceParams params(source, to->getSyncSourceNodes(source), to);
auto_ptr<SyncSource> syncSource(SyncSource::createSource(params, false, to.get()));
@@ -1205,7 +1205,7 @@ bool Cmdline::run() {
}
}
s.checkForNormal();
- SE_LOG_INFO(NULL, NULL, "%s: %s\n",
+ SE_LOG_INFO(NULL, "%s: %s\n",
source.c_str(),
disable.empty() ? "okay" : disable.c_str());
}
@@ -1346,7 +1346,7 @@ bool Cmdline::run() {
if (logging) {
description = logging->getDescription(luid);
}
- SE_LOG_SHOW(NULL, NULL, "%s%s%s",
+ SE_LOG_SHOW(NULL, "%s%s%s",
CmdlineLUID::fromLUID(luid).c_str(),
description.empty() ? "" : ": ",
description.c_str());
@@ -1419,7 +1419,7 @@ bool Cmdline::run() {
luid = *m_luids.begin();
}
}
- SE_LOG_SHOW(NULL, NULL, "#0: %s",
+ SE_LOG_SHOW(NULL, "#0: %s",
insertItem(raw, luid, content).getEncoded().c_str());
} else {
typedef boost::split_iterator<string::iterator> string_split_iterator;
@@ -1454,7 +1454,7 @@ bool Cmdline::run() {
luid = *luidit;
++luidit;
}
- SE_LOG_SHOW(NULL, NULL, "#%d: %s",
+ SE_LOG_SHOW(NULL, "#%d: %s",
count,
insertItem(raw,
luid,
@@ -1471,7 +1471,7 @@ bool Cmdline::run() {
if (!ReadFile(path, content)) {
SyncContext::throwError(path, errno);
}
- SE_LOG_SHOW(NULL, NULL, "#%d: %s: %s",
+ SE_LOG_SHOW(NULL, "#%d: %s: %s",
count,
entry.c_str(),
insertItem(raw, "", content).getEncoded().c_str());
@@ -1528,7 +1528,7 @@ bool Cmdline::run() {
}
if (out == &std::cout) {
// special case, use logging infrastructure
- SE_LOG_SHOW(NULL, NULL, "%s%s",
+ SE_LOG_SHOW(NULL, "%s%s",
delimiter.c_str(),
item.c_str());
// always prints newline
@@ -1627,15 +1627,15 @@ bool Cmdline::run() {
if (first) {
first = false;
} else if(!m_quiet) {
- SE_LOG_SHOW(NULL, NULL, "\n");
+ SE_LOG_SHOW(NULL, "\n");
}
- SE_LOG_SHOW(NULL, NULL, "%s", dir.c_str());
+ SE_LOG_SHOW(NULL, "%s", dir.c_str());
if (!m_quiet) {
SyncReport report;
context->readSessionInfo(dir, report);
ostringstream out;
out << report;
- SE_LOG_SHOW(NULL, NULL, "%s", out.str().c_str());
+ SE_LOG_SHOW(NULL, "%s", out.str().c_str());
}
}
} else if (!m_restore.empty()) {
@@ -1810,13 +1810,13 @@ bool Cmdline::parseProp(PropertyType propertyType,
// replaced it
prop = validProps->find("backend");
if (!prop) {
- SE_LOG_ERROR(NULL, NULL, "backend: no such property");
+ SE_LOG_ERROR(NULL, "backend: no such property");
return false;
}
SourceType sourceType(paramstr);
string error;
if (!prop->checkValue(sourceType.m_backend, error)) {
- SE_LOG_ERROR(NULL, NULL, "%s: %s", args.c_str(), error.c_str());
+ SE_LOG_ERROR(NULL, "%s: %s", args.c_str(), error.c_str());
return false;
}
ContextProps &props = m_props[spec.m_config];
@@ -1835,19 +1835,19 @@ bool Cmdline::parseProp(PropertyType propertyType,
InitStateString("0", false);
return true;
} else if (!prop) {
- SE_LOG_ERROR(NULL, NULL, "%s: no such property", args.c_str());
+ SE_LOG_ERROR(NULL, "%s: no such property", args.c_str());
return false;
} else {
string error;
if (!prop->checkValue(paramstr, error)) {
- SE_LOG_ERROR(NULL, NULL, "%s: %s", args.c_str(), error.c_str());
+ SE_LOG_ERROR(NULL, "%s: %s", args.c_str(), error.c_str());
return false;
} else {
ContextProps &props = m_props[spec.m_config];
if (validProps == &m_validSyncProps) {
// complain if sync property includes source prefix
if (!spec.m_source.empty()) {
- SE_LOG_ERROR(NULL, NULL, "%s: source name '%s' not allowed in sync property",
+ SE_LOG_ERROR(NULL, "%s: source name '%s' not allowed in sync property",
args.c_str(),
spec.m_source.c_str());
return false;
@@ -1899,7 +1899,7 @@ bool Cmdline::listPropValues(const ConfigPropertyRegistry &validProps,
{
const ConfigProperty *prop = validProps.find(propName);
if (!prop && boost::iequals(propName, "type")) {
- SE_LOG_SHOW(NULL, NULL,
+ SE_LOG_SHOW(NULL,
"%s\n"
" <backend>[:<format>[:<version][!]]\n"
" legacy property, replaced by 'backend', 'databaseFormat',\n"
@@ -1907,7 +1907,7 @@ bool Cmdline::listPropValues(const ConfigPropertyRegistry &validProps,
opt.c_str());
return true;
} else if (!prop) {
- SE_LOG_ERROR(NULL, NULL, "%s: no such property", opt.c_str());
+ SE_LOG_ERROR(NULL, "%s: no such property", opt.c_str());
return false;
} else {
ostringstream out;
@@ -1923,7 +1923,7 @@ bool Cmdline::listPropValues(const ConfigPropertyRegistry &validProps,
} else {
out << " no documentation available" << endl;
}
- SE_LOG_SHOW(NULL, NULL, "%s", out.str().c_str());
+ SE_LOG_SHOW(NULL, "%s", out.str().c_str());
return true;
}
}
@@ -1968,7 +1968,7 @@ bool Cmdline::listProperties(const ConfigPropertyRegistry &validProps,
}
out << endl;
dumpComment(out, " ", comment);
- SE_LOG_SHOW(NULL, NULL, "%s", out.str().c_str());
+ SE_LOG_SHOW(NULL, "%s", out.str().c_str());
return true;
}
@@ -2034,8 +2034,8 @@ void Cmdline::listDatabases(SyncSource *source, const string &header)
out << endl;
}
}
- SE_LOG_SHOW(NULL, NULL, "%s", out.str().c_str());
- SE_LOG_SHOW(NULL, NULL, "\n");
+ SE_LOG_SHOW(NULL, "%s", out.str().c_str());
+ SE_LOG_SHOW(NULL, "\n");
}
void Cmdline::createDatabase(SyncSource *source, const string &header)
@@ -2051,7 +2051,7 @@ void Cmdline::createDatabase(SyncSource *source, const string &header)
SE_THROW("The 'database' property must be set to the name of the new database");
}
SyncSource::Database database = source->createDatabase(SyncSource::Database(databaseID, ""));
- SE_LOG_SHOW(NULL, NULL, "%s: database '%s' (%s) was created.",
+ SE_LOG_SHOW(NULL, "%s: database '%s' (%s) was created.",
header.c_str(),
database.m_name.c_str(),
database.m_uri.c_str());
@@ -2078,7 +2078,7 @@ void Cmdline::removeDatabase(SyncSource *source, const string &header)
}
source->deleteDatabase(database.m_uri);
- SE_LOG_SHOW(NULL, NULL, "%s: database '%s' (%s) was removed.",
+ SE_LOG_SHOW(NULL, "%s: database '%s' (%s) was removed.",
header.c_str(),
database.m_name.c_str(),
database.m_uri.c_str());
@@ -2095,7 +2095,7 @@ void Cmdline::dumpConfigs(const string &preamble,
if (!servers.size()) {
out << " none" << endl;
}
- SE_LOG_SHOW(NULL, NULL, "%s", out.str().c_str());
+ SE_LOG_SHOW(NULL, "%s", out.str().c_str());
}
void Cmdline::dumpConfigTemplates(const string &preamble,
@@ -2121,7 +2121,7 @@ void Cmdline::dumpConfigTemplates(const string &preamble,
if (!templates.size()) {
out << " none" << endl;
}
- SE_LOG(level, NULL, NULL, "%s", out.str().c_str());
+ SE_LOG(NULL, level, "%s", out.str().c_str());
}
void Cmdline::dumpProperties(const ConfigNode &configuredProps,
@@ -2184,7 +2184,7 @@ void Cmdline::dumpProperties(const ConfigNode &configuredProps,
}
}
- SE_LOG_SHOW(NULL, NULL, "%s", out.str().c_str());
+ SE_LOG_SHOW(NULL, "%s", out.str().c_str());
}
void Cmdline::dumpComment(ostream &stream,
@@ -2200,17 +2200,17 @@ void Cmdline::dumpComment(ostream &stream,
void Cmdline::usage(bool full, const string &error, const string &param)
{
- SE_LOG_SHOW(NULL, NULL, "%s", synopsis);
+ SE_LOG_SHOW(NULL, "%s", synopsis);
if (full) {
- SE_LOG_SHOW(NULL, NULL, "\nOptions:\n%s", options);
+ SE_LOG_SHOW(NULL, "\nOptions:\n%s", options);
}
if (error != "") {
- SE_LOG_SHOW(NULL, NULL, "\n");
- SE_LOG_ERROR(NULL, NULL, "%s", error.c_str());
+ SE_LOG_SHOW(NULL, "\n");
+ SE_LOG_ERROR(NULL, "%s", error.c_str());
}
if (param != "") {
- SE_LOG_INFO(NULL, NULL, "use '%s%s?' to get a list of valid parameters",
+ SE_LOG_INFO(NULL, "use '%s%s?' to get a list of valid parameters",
param.c_str(),
boost::ends_with(param, "=") ? "" : " ");
}
diff --git a/src/syncevo/CurlTransportAgent.cpp b/src/syncevo/CurlTransportAgent.cpp
index 01d92c76..2e520527 100644
--- a/src/syncevo/CurlTransportAgent.cpp
+++ b/src/syncevo/CurlTransportAgent.cpp
@@ -283,7 +283,7 @@ void CurlTransportAgent::checkCurl(CURLcode code, bool exception)
if(exception){
SE_THROW_EXCEPTION(TransportException, m_curlErrorText);
}else {
- SE_LOG_INFO(NULL, NULL, "CurlTransport Failure: %s", m_curlErrorText);
+ SE_LOG_INFO(NULL, "CurlTransport Failure: %s", m_curlErrorText);
}
}
}
diff --git a/src/syncevo/ForkExec.cpp b/src/syncevo/ForkExec.cpp
index e5dba48a..99a71e35 100644
--- a/src/syncevo/ForkExec.cpp
+++ b/src/syncevo/ForkExec.cpp
@@ -152,7 +152,7 @@ void ForkExecParent::start()
// boost::shared_ptr<ForkExecParent> me = ...;
GDBusCXX::DBusErrorCXX dbusError;
- SE_LOG_DEBUG(NULL, NULL, "ForkExecParent: preparing for child process %s", m_helper.c_str());
+ SE_LOG_DEBUG(NULL, "ForkExecParent: preparing for child process %s", m_helper.c_str());
m_server = GDBusCXX::DBusServerCXX::listen("", &dbusError);
if (!m_server) {
dbusError.throwFailure("starting server");
@@ -198,7 +198,7 @@ void ForkExecParent::start()
m_envStrings.push_back(ForkExecEnvVar + m_server->getAddress());
m_env.reset(AllocStringArray(m_envStrings));
- SE_LOG_DEBUG(NULL, NULL, "ForkExecParent: running %s with D-Bus address %s",
+ SE_LOG_DEBUG(NULL, "ForkExecParent: running %s with D-Bus address %s",
helper.c_str(), m_server->getAddress().c_str());
// Check which kind of output redirection is wanted.
@@ -227,7 +227,7 @@ void ForkExecParent::start()
setupPipe(m_err, m_errID, err);
setupPipe(m_out, m_outID, out);
- SE_LOG_DEBUG(NULL, NULL, "ForkExecParent: child process for %s has pid %ld",
+ SE_LOG_DEBUG(NULL, "ForkExecParent: child process for %s has pid %ld",
helper.c_str(), (long)m_childPid);
// TODO: introduce C++ wrapper around GSource
@@ -246,7 +246,7 @@ void ForkExecParent::setupPipe(GIOChannel *&channel, guint &sourceID, int fd)
channel = g_io_channel_unix_new(fd);
if (!channel) {
// failure
- SE_LOG_DEBUG(NULL, NULL, "g_io_channel_unix_new() returned NULL");
+ SE_LOG_DEBUG(NULL, "g_io_channel_unix_new() returned NULL");
close(fd);
return;
}
@@ -289,7 +289,7 @@ gboolean ForkExecParent::outputReady(GIOChannel *source,
if (status == G_IO_STATUS_EOF ||
(condition & (G_IO_HUP|G_IO_ERR)) ||
error) {
- SE_LOG_DEBUG(NULL, NULL, "reading helper %s done: %s",
+ SE_LOG_DEBUG(NULL, "reading helper %s done: %s",
source == me->m_out ? "stdout" :
me->m_mergedStdoutStderr ? "combined stdout/stderr" :
"stderr",
@@ -338,7 +338,7 @@ void ForkExecParent::checkCompletion() throw ()
m_onQuit(m_status);
if (!m_hasConnected ||
m_status != 0) {
- SE_LOG_DEBUG(NULL, NULL, "ForkExecParent: child was signaled %s, signal %d, int %d, term %d, int sent %s, term sent %s",
+ SE_LOG_DEBUG(NULL, "ForkExecParent: child was signaled %s, signal %d, int %d, term %d, int sent %s, term sent %s",
WIFSIGNALED(m_status) ? "yes" : "no",
WTERMSIG(m_status), SIGINT, SIGTERM,
m_sigIntSent ? "yes" : "no",
@@ -360,7 +360,7 @@ void ForkExecParent::checkCompletion() throw ()
} else {
error += " for unknown reasons";
}
- SE_LOG_ERROR(NULL, NULL, "%s", error.c_str());
+ SE_LOG_ERROR(NULL, "%s", error.c_str());
m_onFailure(STATUS_FATAL, error);
}
} catch (...) {
@@ -378,7 +378,7 @@ void ForkExecParent::checkCompletion() throw ()
void ForkExecParent::newClientConnection(GDBusCXX::DBusConnectionPtr &conn) throw()
{
try {
- SE_LOG_DEBUG(NULL, NULL, "ForkExecParent: child %s has connected",
+ SE_LOG_DEBUG(NULL, "ForkExecParent: child %s has connected",
m_helper.c_str());
m_hasConnected = true;
#ifndef GDBUS_CXX_HAVE_DISCONNECT
@@ -410,7 +410,7 @@ void ForkExecParent::stop(int signal)
return;
}
- SE_LOG_DEBUG(NULL, NULL, "ForkExecParent: killing %s with signal %d (%s %s)",
+ SE_LOG_DEBUG(NULL, "ForkExecParent: killing %s with signal %d (%s %s)",
m_helper.c_str(),
signal,
(!signal || signal == SIGINT) ? "SIGINT" : "",
@@ -438,7 +438,7 @@ void ForkExecParent::kill()
return;
}
- SE_LOG_DEBUG(NULL, NULL, "ForkExecParent: killing %s with SIGKILL",
+ SE_LOG_DEBUG(NULL, "ForkExecParent: killing %s with SIGKILL",
m_helper.c_str());
::kill(m_childPid, SIGKILL);
#ifndef GDBUS_CXX_HAVE_DISCONNECT
@@ -467,7 +467,7 @@ void ForkExecChild::connect()
SE_THROW("cannot connect to parent, was not forked");
}
- SE_LOG_DEBUG(NULL, NULL, "ForkExecChild: connecting to parent with D-Bus address %s",
+ SE_LOG_DEBUG(NULL, "ForkExecChild: connecting to parent with D-Bus address %s",
address);
GDBusCXX::DBusErrorCXX dbusError;
GDBusCXX::DBusConnectionPtr conn = dbus_get_bus_connection(address,
@@ -506,7 +506,7 @@ void ForkExecChild::connect()
void ForkExecChild::connectionLost()
{
- SE_LOG_DEBUG(NULL, NULL, "lost connection to parent");
+ SE_LOG_DEBUG(NULL, "lost connection to parent");
m_state = DISCONNECTED;
m_onQuit();
}
diff --git a/src/syncevo/LocalTransportAgent.cpp b/src/syncevo/LocalTransportAgent.cpp
index dddc47b8..97f0236b 100644
--- a/src/syncevo/LocalTransportAgent.cpp
+++ b/src/syncevo/LocalTransportAgent.cpp
@@ -176,12 +176,12 @@ class LocalTransportChild : public GDBusCXX::DBusRemoteObject
void LocalTransportAgent::logChildOutput(const std::string &level, const std::string &message)
{
ProcNameGuard guard(m_clientContext);
- SE_LOG(Logger::strToLevel(level.c_str()), NULL, NULL, "%s", message.c_str());
+ SE_LOG(NULL, Logger::strToLevel(level.c_str()), "%s", message.c_str());
}
void LocalTransportAgent::onChildConnect(const GDBusCXX::DBusConnectionPtr &conn)
{
- SE_LOG_DEBUG(NULL, NULL, "child is ready");
+ SE_LOG_DEBUG(NULL, "child is ready");
m_parent.reset(new GDBusCXX::DBusObjectHelper(conn,
LocalTransportParent::path(),
LocalTransportParent::interface(),
@@ -223,14 +223,14 @@ void LocalTransportAgent::onFailure(const std::string &error)
m_status = FAILED;
g_main_loop_quit(m_loop.get());
- SE_LOG_ERROR(NULL, NULL, "local transport failed: %s", error.c_str());
+ SE_LOG_ERROR(NULL, "local transport failed: %s", error.c_str());
m_parent.reset();
m_child.reset();
}
void LocalTransportAgent::onChildQuit(int status)
{
- SE_LOG_DEBUG(NULL, NULL, "child process has quit with status %d", status);
+ SE_LOG_DEBUG(NULL, "child process has quit with status %d", status);
g_main_loop_quit(m_loop.get());
}
@@ -264,7 +264,7 @@ void LocalTransportAgent::askPassword(const std::string &passwordName,
const boost::shared_ptr< GDBusCXX::Result1<const std::string &> > &reply)
{
// pass that work to our own SyncContext and its UI - currently blocks
- SE_LOG_DEBUG(NULL, NULL, "local sync parent: asked for password %s, %s",
+ SE_LOG_DEBUG(NULL, "local sync parent: asked for password %s, %s",
passwordName.c_str(),
descr.c_str());
try {
@@ -277,7 +277,7 @@ void LocalTransportAgent::askPassword(const std::string &passwordName,
boost::bind(PasswordException,
reply));
} else {
- SE_LOG_DEBUG(NULL, NULL, "local sync parent: password request failed because no m_server");
+ SE_LOG_DEBUG(NULL, "local sync parent: password request failed because no m_server");
reply->failed(GDBusCXX::dbus_error("org.syncevolution.localtransport.error",
"not connected to UI"));
}
@@ -288,7 +288,7 @@ void LocalTransportAgent::askPassword(const std::string &passwordName,
void LocalTransportAgent::storeSyncReport(const std::string &report)
{
- SE_LOG_DEBUG(NULL, NULL, "got child sync report:\n%s",
+ SE_LOG_DEBUG(NULL, "got child sync report:\n%s",
report.c_str());
m_clientReport = SyncReport(report);
}
@@ -312,7 +312,7 @@ static void gMainLoopQuit(GMainLoopCXX *loop)
void LocalTransportAgent::shutdown()
{
- SE_LOG_DEBUG(NULL, NULL, "parent is shutting down");
+ SE_LOG_DEBUG(NULL, "parent is shutting down");
if (m_forkexec) {
// block until child is done
boost::signals2::scoped_connection c(m_forkexec->m_onQuit.connect(boost::bind(gMainLoopQuit,
@@ -323,7 +323,7 @@ void LocalTransportAgent::shutdown()
// communication with the parent?
// m_forkexec->stop();
while (m_forkexec->getState() != ForkExecParent::TERMINATED) {
- SE_LOG_DEBUG(NULL, NULL, "waiting for child to stop");
+ SE_LOG_DEBUG(NULL, "waiting for child to stop");
g_main_loop_run(m_loop.get());
}
@@ -358,7 +358,7 @@ void LocalTransportAgent::storeReplyMsg(const std::string &contentType,
} else {
// Only an error if the client hasn't shut down normally.
if (m_clientReport.empty()) {
- SE_LOG_ERROR(NULL, NULL, "sending message to child failed: %s", error.c_str());
+ SE_LOG_ERROR(NULL, "sending message to child failed: %s", error.c_str());
m_status = FAILED;
}
}
@@ -368,7 +368,7 @@ void LocalTransportAgent::storeReplyMsg(const std::string &contentType,
void LocalTransportAgent::cancel()
{
if (m_forkexec) {
- SE_LOG_DEBUG(NULL, NULL, "killing local transport child in cancel()");
+ SE_LOG_DEBUG(NULL, "killing local transport child in cancel()");
m_forkexec->stop();
}
m_status = CANCELED;
@@ -382,7 +382,7 @@ TransportAgent::Status LocalTransportAgent::wait(bool noReply)
m_status = INACTIVE;
} else {
while (m_status == ACTIVE) {
- SE_LOG_DEBUG(NULL, NULL, "waiting for child to send message");
+ SE_LOG_DEBUG(NULL, "waiting for child to send message");
if (m_forkexec &&
m_forkexec->getState() == ForkExecParent::TERMINATED) {
m_status = FAILED;
@@ -465,7 +465,7 @@ public:
const string &descr,
const ConfigPasswordKey &key)
{
- SE_LOG_DEBUG(NULL, NULL, "local transport child: requesting password %s, %s via D-Bus",
+ SE_LOG_DEBUG(NULL, "local transport child: requesting password %s, %s via D-Bus",
passwordName.c_str(),
descr.c_str());
std::string password;
@@ -500,11 +500,11 @@ private:
void storePassword(std::string &res, std::string &errorRes, bool &haveRes, const std::string &password, const std::string &error)
{
if (!error.empty()) {
- SE_LOG_DEBUG(NULL, NULL, "local transport child: D-Bus password request failed: %s",
+ SE_LOG_DEBUG(NULL, "local transport child: D-Bus password request failed: %s",
error.c_str());
errorRes = error;
} else {
- SE_LOG_DEBUG(NULL, NULL, "local transport child: D-Bus password request succeeded");
+ SE_LOG_DEBUG(NULL, "local transport child: D-Bus password request succeeded");
res = password;
}
haveRes = true;
@@ -516,7 +516,7 @@ static void abortLocalSync(int sigterm)
// logging anything here is not safe (our own logging system might
// have been interrupted by the SIGTERM and thus be in an inconsistent
// state), but let's try it anyway
- SE_LOG_INFO(NULL, NULL, "local sync child shutting down due to SIGTERM");
+ SE_LOG_INFO(NULL, "local sync child shutting down due to SIGTERM");
// raise the signal again after disabling the handler, to ensure that
// the exit status is "killed by signal xxx" - good because then
// the whoever killed used gets the information that we didn't die for
@@ -628,7 +628,7 @@ class LocalTransportAgentChild : public TransportAgent, private LoggerBase
*/
void step(const std::string &status)
{
- SE_LOG_DEBUG(NULL, NULL, "local transport: %s", status.c_str());
+ SE_LOG_DEBUG(NULL, "local transport: %s", status.c_str());
if (!m_forkexec ||
m_forkexec->getState() == ForkExecChild::DISCONNECTED) {
SE_THROW("local transport child no longer has a parent, terminating");
@@ -644,13 +644,13 @@ class LocalTransportAgentChild : public TransportAgent, private LoggerBase
// Never free this state blocker. We can only abort and
// quit from now on.
static boost::shared_ptr<SuspendFlags::StateBlocker> abortGuard;
- SE_LOG_ERROR(NULL, NULL, "sync parent quit unexpectedly");
+ SE_LOG_ERROR(NULL, "sync parent quit unexpectedly");
abortGuard = SuspendFlags::getSuspendFlags().abort();
}
void onConnect(const GDBusCXX::DBusConnectionPtr &conn)
{
- SE_LOG_DEBUG(NULL, NULL, "child connected to parent");
+ SE_LOG_DEBUG(NULL, "child connected to parent");
// provide our own API
m_child.reset(new LocalTransportChildImpl(conn));
@@ -664,7 +664,7 @@ class LocalTransportAgentChild : public TransportAgent, private LoggerBase
void onFailure(SyncMLStatus status, const std::string &reason)
{
- SE_LOG_DEBUG(NULL, NULL, "child fork/exec failed: %s", reason.c_str());
+ SE_LOG_DEBUG(NULL, "child fork/exec failed: %s", reason.c_str());
// record failure for parent
if (!m_clientReport.getStatus()) {
@@ -693,7 +693,7 @@ class LocalTransportAgentChild : public TransportAgent, private LoggerBase
{
setMsgToParent(reply, "sync() was called");
Logger::setProcessName(clientContext);
- SE_LOG_DEBUG(NULL, NULL, "Sync() called, starting the sync");
+ SE_LOG_DEBUG(NULL, "Sync() called, starting the sync");
const char *delay = getenv("SYNCEVOLUTION_LOCAL_CHILD_DELAY2");
if (delay) {
Sleep(atoi(delay));
@@ -819,7 +819,7 @@ class LocalTransportAgentChild : public TransportAgent, private LoggerBase
const GDBusCXX::DBusArray<uint8_t> &data,
const LocalTransportChild::ReplyPtr &reply)
{
- SE_LOG_DEBUG(NULL, NULL, "child got message of %ld bytes", (long)data.first);
+ SE_LOG_DEBUG(NULL, "child got message of %ld bytes", (long)data.first);
setMsgToParent(LocalTransportChild::ReplyPtr(), "sendMsg() was called");
if (m_status == ACTIVE) {
m_msgToParent = reply;
@@ -896,14 +896,14 @@ public:
while (!m_parent) {
if (s.getState() != SuspendFlags::NORMAL) {
- SE_LOG_DEBUG(NULL, NULL, "aborted, returning while waiting for parent");
+ SE_LOG_DEBUG(NULL, "aborted, returning while waiting for parent");
return;
}
step("waiting for parent");
}
while (!m_client) {
if (s.getState() != SuspendFlags::NORMAL) {
- SE_LOG_DEBUG(NULL, NULL, "aborted, returning while waiting for Sync() call from parent");
+ SE_LOG_DEBUG(NULL, "aborted, returning while waiting for Sync() call from parent");
}
step("waiting for Sync() call from parent");
}
@@ -925,8 +925,8 @@ public:
new_action.sa_handler = abortLocalSync;
sigaction(SIGTERM, &new_action, NULL);
- SE_LOG_DEBUG(NULL, NULL, "LocalTransportChild: ignore SIGINT, die in SIGTERM");
- SE_LOG_INFO(NULL, NULL, "target side of local sync ready");
+ SE_LOG_DEBUG(NULL, "LocalTransportChild: ignore SIGINT, die in SIGTERM");
+ SE_LOG_INFO(NULL, "target side of local sync ready");
m_client->sync(&m_clientReport);
} catch (...) {
string explanation;
@@ -938,14 +938,14 @@ public:
}
if (m_parent) {
std::string report = m_clientReport.toString();
- SE_LOG_DEBUG(NULL, NULL, "child sending sync report after failure:\n%s", report.c_str());
+ SE_LOG_DEBUG(NULL, "child sending sync report after failure:\n%s", report.c_str());
m_parent->m_storeSyncReport.start(report,
boost::bind(&LocalTransportAgentChild::syncReportReceived, this, _1));
// wait for acknowledgement for report once:
// we are in some kind of error state, better
// do not wait too long
if (m_parent) {
- SE_LOG_DEBUG(NULL, NULL, "waiting for parent's ACK for sync report");
+ SE_LOG_DEBUG(NULL, "waiting for parent's ACK for sync report");
g_main_context_iteration(NULL, true);
}
}
@@ -955,7 +955,7 @@ public:
if (m_parent) {
// send final report, ignore result
std::string report = m_clientReport.toString();
- SE_LOG_DEBUG(NULL, NULL, "child sending sync report:\n%s", report.c_str());
+ SE_LOG_DEBUG(NULL, "child sending sync report:\n%s", report.c_str());
m_parent->m_storeSyncReport.start(report,
boost::bind(&LocalTransportAgentChild::syncReportReceived, this, _1));
while (!m_reportSent && m_parent &&
@@ -967,7 +967,7 @@ public:
void syncReportReceived(const std::string &error)
{
- SE_LOG_DEBUG(NULL, NULL, "sending sync report to parent: %s",
+ SE_LOG_DEBUG(NULL, "sending sync report to parent: %s",
error.empty() ? "done" : error.c_str());
m_reportSent = true;
}
@@ -998,7 +998,7 @@ public:
*/
virtual void shutdown()
{
- SE_LOG_DEBUG(NULL, NULL, "child local transport shutting down");
+ SE_LOG_DEBUG(NULL, "child local transport shutting down");
if (m_msgToParent) {
// Must send non-zero message, empty messages cause an
// error during D-Bus message decoding on the receiving
@@ -1022,7 +1022,7 @@ public:
*/
virtual void send(const char *data, size_t len)
{
- SE_LOG_DEBUG(NULL, NULL, "child local transport sending %ld bytes", (long)len);
+ SE_LOG_DEBUG(NULL, "child local transport sending %ld bytes", (long)len);
if (m_msgToParent) {
m_status = ACTIVE;
m_msgToParent->done(m_contentType, GDBusCXX::makeDBusArray(len, (uint8_t *)(data)));
@@ -1081,7 +1081,7 @@ public:
*/
virtual void getReply(const char *&data, size_t &len, std::string &contentType)
{
- SE_LOG_DEBUG(NULL, NULL, "processing %ld bytes in child", (long)m_message.size());
+ SE_LOG_DEBUG(NULL, "processing %ld bytes in child", (long)m_message.size());
if (m_status != GOT_REPLY) {
SE_THROW("getReply() called in child when no reply available");
}
@@ -1135,9 +1135,9 @@ int LocalTransportMain(int argc, char **argv)
child.reset();
return ret;
} catch ( const std::exception &ex ) {
- SE_LOG_ERROR(NULL, NULL, "%s", ex.what());
+ SE_LOG_ERROR(NULL, "%s", ex.what());
} catch (...) {
- SE_LOG_ERROR(NULL, NULL, "unknown error");
+ SE_LOG_ERROR(NULL, "unknown error");
}
return 1;
diff --git a/src/syncevo/LogRedirect.cpp b/src/syncevo/LogRedirect.cpp
index 30db2ba5..3a95b826 100644
--- a/src/syncevo/LogRedirect.cpp
+++ b/src/syncevo/LogRedirect.cpp
@@ -54,7 +54,7 @@ std::set<std::string> LogRedirect::m_knownErrors;
void LogRedirect::abortHandler(int sig) throw()
{
// Don't know state of logging system, don't log here!
- // SE_LOG_ERROR(NULL, NULL, "caught signal %d, shutting down", sig);
+ // SE_LOG_ERROR(NULL, "caught signal %d, shutting down", sig);
// shut down redirection, also flushes to log
if (m_redirect) {
diff --git a/src/syncevo/Logging.h b/src/syncevo/Logging.h
index 58888abb..ab30347e 100644
--- a/src/syncevo/Logging.h
+++ b/src/syncevo/Logging.h
@@ -311,40 +311,31 @@ class LoggerBase : public Logger
/**
- * Vararg macro which passes the message through a specific
- * Logger class instance (if non-NULL) and otherwise calls
- * the global logger directly. Adds source file and line.
+ * Wraps Logger::message() in the current default logger.
+ * and adds file and line where the message comes from.
+ *
+ * This macro reverses _prefix and _level to avoid the situation where
+ * the compiler mistakes a NULL _prefix with the _format parameter
+ * (happened once while doing code refactoring).
*
* @TODO make source and line info optional for release
* @TODO add function name (GCC extension)
*/
-#define SE_LOG(_level, _instance, _prefix, _format, _args...) \
- do { \
- if (_instance) { \
- static_cast<SyncEvo::Logger *>(_instance)->message(_level, \
- _prefix, \
- __FILE__, \
- __LINE__, \
- 0, \
- _format, \
- ##_args); \
- } else { \
- SyncEvo::LoggerBase::instance().message(_level, \
- _prefix, \
- __FILE__, \
- __LINE__, \
- 0, \
- _format, \
- ##_args); \
- } \
- } while(false)
-
-#define SE_LOG_SHOW(_instance, _prefix, _format, _args...) SE_LOG(SyncEvo::Logger::SHOW, _instance, _prefix, _format, ##_args)
-#define SE_LOG_ERROR(_instance, _prefix, _format, _args...) SE_LOG(SyncEvo::Logger::ERROR, _instance, _prefix, _format, ##_args)
-#define SE_LOG_WARNING(_instance, _prefix, _format, _args...) SE_LOG(SyncEvo::Logger::WARNING, _instance, _prefix, _format, ##_args)
-#define SE_LOG_INFO(_instance, _prefix, _format, _args...) SE_LOG(SyncEvo::Logger::INFO, _instance, _prefix, _format, ##_args)
-#define SE_LOG_DEV(_instance, _prefix, _format, _args...) SE_LOG(SyncEvo::Logger::DEV, _instance, _prefix, _format, ##_args)
-#define SE_LOG_DEBUG(_instance, _prefix, _format, _args...) SE_LOG(SyncEvo::Logger::DEBUG, _instance, _prefix, _format, ##_args)
+#define SE_LOG(_prefix, _level, _format, _args...) \
+ SyncEvo::LoggerBase::instance().message(_level, \
+ _prefix, \
+ __FILE__, \
+ __LINE__, \
+ NULL, \
+ _format, \
+ ##_args); \
+
+#define SE_LOG_SHOW(_prefix, _format, _args...) SE_LOG(_prefix, SyncEvo::Logger::SHOW, _format, ##_args)
+#define SE_LOG_ERROR(_prefix, _format, _args...) SE_LOG(_prefix, SyncEvo::Logger::ERROR, _format, ##_args)
+#define SE_LOG_WARNING(_prefix, _format, _args...) SE_LOG(_prefix, SyncEvo::Logger::WARNING, _format, ##_args)
+#define SE_LOG_INFO(_prefix, _format, _args...) SE_LOG(_prefix, SyncEvo::Logger::INFO, _format, ##_args)
+#define SE_LOG_DEV(_prefix, _format, _args...) SE_LOG(_prefix, SyncEvo::Logger::DEV, _format, ##_args)
+#define SE_LOG_DEBUG(_prefix, _format, _args...) SE_LOG(_prefix, SyncEvo::Logger::DEBUG, _format, ##_args)
SE_END_CXX
#endif // INCL_LOGGING
diff --git a/src/syncevo/MapSyncSource.cpp b/src/syncevo/MapSyncSource.cpp
index 5e28b4c5..6fc2e07e 100644
--- a/src/syncevo/MapSyncSource.cpp
+++ b/src/syncevo/MapSyncSource.cpp
@@ -104,7 +104,7 @@ void MapSyncSource::detectChanges(SyncSourceRevisions::ChangeMode mode)
}
}
if (!okay) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "unsupported or corrupt revision entry: %s = %s",
+ SE_LOG_DEBUG(getDisplayName(), "unsupported or corrupt revision entry: %s = %s",
mainid.c_str(),
value.c_str());
}
@@ -214,17 +214,17 @@ void MapSyncSource::beginSync(const std::string &lastToken, const std::string &r
}
// slow sync if token is empty
if (token.empty()) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "slow sync or testing, do full item scan to detect changes");
+ SE_LOG_DEBUG(getDisplayName(), "slow sync or testing, do full item scan to detect changes");
mode = SyncSourceRevisions::CHANGES_SLOW;
} else {
string oldRevision = m_metaNode->readProperty("databaseRevision");
if (!oldRevision.empty()) {
string newRevision = m_sub->subDatabaseRevision();
- SE_LOG_DEBUG(NULL, getDisplayName(), "old database revision '%s', new revision '%s'",
+ SE_LOG_DEBUG(getDisplayName(), "old database revision '%s', new revision '%s'",
oldRevision.c_str(),
newRevision.c_str());
if (newRevision == oldRevision) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "revisions match, no item changes");
+ SE_LOG_DEBUG(getDisplayName(), "revisions match, no item changes");
mode = SyncSourceRevisions::CHANGES_NONE;
}
@@ -235,7 +235,7 @@ void MapSyncSource::beginSync(const std::string &lastToken, const std::string &r
}
}
if (mode == SyncSourceRevisions::CHANGES_FULL) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "using full item scan to detect changes");
+ SE_LOG_DEBUG(getDisplayName(), "using full item scan to detect changes");
}
detectChanges(mode);
diff --git a/src/syncevo/ObexTransportAgent.cpp b/src/syncevo/ObexTransportAgent.cpp
index 7dce7009..f0d28dc7 100644
--- a/src/syncevo/ObexTransportAgent.cpp
+++ b/src/syncevo/ObexTransportAgent.cpp
@@ -154,8 +154,8 @@ void ObexTransportAgent::connectInit () {
SE_THROW_EXCEPTION (TransportException, "Error creating Bluetooth socket");
}
cxxptr<Socket> sockObj (new Socket (sockfd));
- SE_LOG_DEV(NULL,NULL, "Connecting Bluetooth device with address %s and channel %d",
- m_address.c_str(), m_port);
+ SE_LOG_DEV(NULL, "Connecting Bluetooth device with address %s and channel %d",
+ m_address.c_str(), m_port);
// Init the OBEX handle
ObexPtr handle(OBEX_Init (OBEX_TRANS_FD, obex_event, 0),
"Obex Handle");
@@ -199,7 +199,7 @@ void ObexTransportAgent::connectInit () {
m_handle = handle;
return;
} else {
- SE_LOG_ERROR (NULL, NULL, "connect failed with error code %d", errno);
+ SE_LOG_ERROR(NULL, "connect failed with error code %d", errno);
SE_THROW_EXCEPTION (TransportException, "ObexTransport: connect request failed with error");
}
}
@@ -214,7 +214,7 @@ void ObexTransportAgent::connectInit () {
}//Bluetooth
else {
m_status = FAILED;
- SE_LOG_ERROR (NULL, NULL, "ObexTransport: unsuported transport type");
+ SE_LOG_ERROR(NULL, "ObexTransport: unsuported transport type");
return;
}
}
@@ -289,7 +289,7 @@ void ObexTransportAgent::shutdown() {
* Send the request to peer
*/
void ObexTransportAgent::send(const char *data, size_t len) {
- SE_LOG_DEV (NULL, NULL, "ObexTransport send is called");
+ SE_LOG_DEV(NULL, "ObexTransport send is called");
cxxptr<Socket> sockObj = m_sock;
GIOChannelPtr channel = m_channel;
if(m_connectStatus != CONNECTED) {
@@ -337,7 +337,7 @@ void ObexTransportAgent::cancel() {
OBEX_TransportDisconnect(m_handle);
}
if (m_disconnecting) {
- SE_LOG_WARNING (NULL, NULL, "Cancel disconncting process");
+ SE_LOG_WARNING(NULL, "Cancel disconncting process");
if (m_status != CLOSED) {
m_status = FAILED;
}
@@ -646,14 +646,14 @@ void ObexTransportAgent::obex_callback (obex_object_t *object, int mode, int eve
try {
switch (event) {
case OBEX_EV_PROGRESS:
- SE_LOG_DEV (NULL, NULL, "OBEX progress");
+ SE_LOG_DEV(NULL, "OBEX progress");
break;
case OBEX_EV_REQDONE:
m_obexReady = true;
m_requestStart = 0;
if (obex_rsp != OBEX_RSP_SUCCESS) {
- SE_LOG_ERROR (NULL, NULL, "OBEX Request %d got a failed response %s",
- obex_cmd,OBEX_ResponseToString(obex_rsp));
+ SE_LOG_ERROR(NULL, "OBEX Request %d got a failed response %s",
+ obex_cmd,OBEX_ResponseToString(obex_rsp));
m_status = FAILED;
return;
} else {
@@ -668,18 +668,15 @@ void ObexTransportAgent::obex_callback (obex_object_t *object, int mode, int eve
if (headertype == OBEX_HDR_CONNECTION) {
m_connectId = header.bq4;
} else if (headertype == OBEX_HDR_WHO) {
- SE_LOG_DEV (NULL, NULL,
- "OBEX Transport: get header who from connect response with value %.*s",
+ SE_LOG_DEV(NULL, "OBEX Transport: get header who from connect response with value %.*s",
len, header.bs);
} else {
- SE_LOG_WARNING (NULL, NULL,
- "OBEX Transport: Unknow header from connect response");
+ SE_LOG_WARNING(NULL, "OBEX Transport: Unknow header from connect response");
}
}
if (m_connectId == 0) {
m_status = FAILED;
- SE_LOG_ERROR(NULL, NULL,
- "No connection id received from connect response");
+ SE_LOG_ERROR(NULL, "No connection id received from connect response");
}
m_connectStatus = CONNECTED;
@@ -706,24 +703,22 @@ void ObexTransportAgent::obex_callback (obex_object_t *object, int mode, int eve
} else if (headertype == OBEX_HDR_BODY) {
if (length ==0) {
length = len;
- SE_LOG_DEV (NULL, NULL,
- "No length header for get response is recevied, using body size %d", len);
+ SE_LOG_DEV(NULL, "No length header for get response is recevied, using body size %d", len);
}
if (length ==0) {
m_status = FAILED;
- SE_LOG_ERROR (NULL, NULL,
- "ObexTransport: Get zero sized response body for Get");
+ SE_LOG_ERROR(NULL, "ObexTransport: Get zero sized response body for Get");
}
m_buffer.set(new char[length], "buffer");
m_bufferSize = length;
memcpy (m_buffer, header.bs, length);
} else {
- SE_LOG_WARNING (NULL, NULL, "Unknow header received for Get cmd");
+ SE_LOG_WARNING(NULL, "Unknow header received for Get cmd");
}
}
if( !length || !m_buffer) {
m_status = FAILED;
- SE_LOG_ERROR (NULL, NULL, "Get Cmd response have no body");
+ SE_LOG_ERROR(NULL, "Get Cmd response have no body");
}
m_status = GOT_REPLY;
break;
@@ -741,7 +736,7 @@ void ObexTransportAgent::obex_callback (obex_object_t *object, int mode, int eve
m_obexReady = true;
m_status = CLOSED;
} else if (obex_rsp !=0) {
- SE_LOG_ERROR (NULL, NULL, "ObexTransport Error %d", obex_rsp);
+ SE_LOG_ERROR(NULL, "ObexTransport Error %d", obex_rsp);
m_status = FAILED;
return;
}
@@ -758,7 +753,7 @@ void ObexTransportAgent::obex_callback (obex_object_t *object, int mode, int eve
void ObexTransportAgent::handleException(const char *where)
{
- SE_LOG_DEBUG(NULL, NULL, "ObexTransport: exception thrown in %s", where);
+ SE_LOG_DEBUG(NULL, "ObexTransport: exception thrown in %s", where);
if (m_status == FAILED ||
m_status == CANCELED ) {
// don't change anything, don't bother the user with error
@@ -774,7 +769,7 @@ obex_object_t* ObexTransportAgent::newCmd(uint8_t cmd) {
obex_object_t *cmdObject = OBEX_ObjectNew (m_handle, cmd);
if(!cmdObject) {
m_status = FAILED;
- SE_LOG_ERROR (NULL, NULL, "ObexTransport: OBEX Object New failed");
+ SE_LOG_ERROR(NULL, "ObexTransport: OBEX Object New failed");
return NULL;
} else {
return cmdObject;
diff --git a/src/syncevo/SoupTransportAgent.cpp b/src/syncevo/SoupTransportAgent.cpp
index cd82e21f..0caec3d6 100644
--- a/src/syncevo/SoupTransportAgent.cpp
+++ b/src/syncevo/SoupTransportAgent.cpp
@@ -184,7 +184,7 @@ TransportAgent::Status SoupTransportAgent::wait(bool noReply)
if(m_status == TIME_OUT || m_status == FAILED){
std::string failure;
std::swap(failure, m_failure);
- SE_LOG_INFO(NULL, NULL, "SoupTransport Failure: %s", failure.c_str());
+ SE_LOG_INFO(NULL, "SoupTransport Failure: %s", failure.c_str());
}
if (!m_failure.empty()) {
std::string failure;
@@ -237,7 +237,7 @@ void SoupTransportAgent::HandleSessionCallback(SoupSession *session,
m_status = FAILED;
if (m_responseContentType.find("text") != std::string::npos) {
- SE_LOG_DEBUG(NULL, NULL, "unexpected HTTP response: status %d/%s, content type %s, body:\n%.*s",
+ SE_LOG_DEBUG(NULL, "unexpected HTTP response: status %d/%s, content type %s, body:\n%.*s",
msg->status_code, msg->reason_phrase ? msg->reason_phrase : "<no reason>",
m_responseContentType.c_str(),
m_response ? (int)m_response->length : 0,
diff --git a/src/syncevo/SuspendFlags.cpp b/src/syncevo/SuspendFlags.cpp
index 0fdc7c33..b47a8524 100644
--- a/src/syncevo/SuspendFlags.cpp
+++ b/src/syncevo/SuspendFlags.cpp
@@ -150,7 +150,7 @@ boost::shared_ptr<SuspendFlags::StateBlocker> SuspendFlags::block(boost::weak_pt
boost::shared_ptr<SuspendFlags::Guard> SuspendFlags::activate()
{
- SE_LOG_DEBUG(NULL, NULL, "SuspendFlags: (re)activating, currently %s",
+ SE_LOG_DEBUG(NULL, "SuspendFlags: (re)activating, currently %s",
m_senderFD > 0 ? "active" : "inactive");
int fds[2];
if (pipe(fds)) {
@@ -161,7 +161,7 @@ boost::shared_ptr<SuspendFlags::Guard> SuspendFlags::activate()
fcntl(fds[1], F_SETFL, fcntl(fds[1], F_GETFL) | O_NONBLOCK);
m_senderFD = fds[1];
m_receiverFD = fds[0];
- SE_LOG_DEBUG(NULL, NULL, "SuspendFlags: activating signal handler(s) with fds %d->%d",
+ SE_LOG_DEBUG(NULL, "SuspendFlags: activating signal handler(s) with fds %d->%d",
m_senderFD, m_receiverFD);
sigaction(SIGINT, NULL, &m_oldSigInt);
sigaction(SIGTERM, NULL, &m_oldSigTerm);
@@ -181,11 +181,11 @@ boost::shared_ptr<SuspendFlags::Guard> SuspendFlags::activate()
}
if (m_oldSigInt.sa_handler == SIG_DFL) {
sigaction(SIGINT, &new_action, NULL);
- SE_LOG_DEBUG(NULL, NULL, "SuspendFlags: catch SIGINT");
+ SE_LOG_DEBUG(NULL, "SuspendFlags: catch SIGINT");
}
if (m_oldSigTerm.sa_handler == SIG_DFL) {
sigaction(SIGTERM, &new_action, NULL);
- SE_LOG_DEBUG(NULL, NULL, "SuspendFlags: catch SIGTERM");
+ SE_LOG_DEBUG(NULL, "SuspendFlags: catch SIGTERM");
}
return boost::shared_ptr<Guard>(new GLibGuard(m_receiverFD));
@@ -193,18 +193,18 @@ boost::shared_ptr<SuspendFlags::Guard> SuspendFlags::activate()
void SuspendFlags::deactivate()
{
- SE_LOG_DEBUG(NULL, NULL, "SuspendFlags: deactivating fds %d->%d",
+ SE_LOG_DEBUG(NULL, "SuspendFlags: deactivating fds %d->%d",
m_senderFD, m_receiverFD);
if (m_receiverFD >= 0) {
sigaction(SIGTERM, &m_oldSigTerm, NULL);
sigaction(SIGINT, &m_oldSigInt, NULL);
- SE_LOG_DEBUG(NULL, NULL, "SuspendFlags: close m_receiverFD %d", m_receiverFD);
+ SE_LOG_DEBUG(NULL, "SuspendFlags: close m_receiverFD %d", m_receiverFD);
close(m_receiverFD);
- SE_LOG_DEBUG(NULL, NULL, "SuspendFlags: close m_senderFD %d", m_senderFD);
+ SE_LOG_DEBUG(NULL, "SuspendFlags: close m_senderFD %d", m_senderFD);
close(m_senderFD);
m_receiverFD = -1;
m_senderFD = -1;
- SE_LOG_DEBUG(NULL, NULL, "SuspendFlags: done with deactivation");
+ SE_LOG_DEBUG(NULL, "SuspendFlags: done with deactivation");
}
}
@@ -266,7 +266,7 @@ void SuspendFlags::printSignals()
if (m_receiverFD >= 0) {
unsigned char msg;
while (read(m_receiverFD, &msg, 1) == 1) {
- SE_LOG_DEBUG(NULL, NULL, "SuspendFlags: read %d from fd %d",
+ SE_LOG_DEBUG(NULL, "SuspendFlags: read %d from fd %d",
msg, m_receiverFD);
const char *str = NULL;
switch (msg) {
@@ -284,9 +284,9 @@ void SuspendFlags::printSignals()
break;
}
if (!str) {
- SE_LOG_DEBUG(NULL, NULL, "internal error: received invalid signal msg %d", msg);
+ SE_LOG_DEBUG(NULL, "internal error: received invalid signal msg %d", msg);
} else {
- SE_LOG(m_level, NULL, NULL, "%s", str);
+ SE_LOG(NULL, m_level, "%s", str);
}
m_stateChanged(*this);
}
diff --git a/src/syncevo/SyncConfig.cpp b/src/syncevo/SyncConfig.cpp
index 605ccb76..9631b2f9 100644
--- a/src/syncevo/SyncConfig.cpp
+++ b/src/syncevo/SyncConfig.cpp
@@ -498,7 +498,7 @@ SyncConfig::SyncConfig(const string &peer,
level = (ConfigLevel)(level + 1)) {
if (exists(level)) {
if (getConfigVersion(level, CONFIG_MIN_VERSION) > ConfigVersions[level][CONFIG_CUR_VERSION]) {
- SE_LOG_INFO(NULL, NULL, "config version check failed: %s has format %d, but this SyncEvolution release only supports format %d",
+ SE_LOG_INFO(NULL, "config version check failed: %s has format %d, but this SyncEvolution release only supports format %d",
ConfigLevel2String(level).c_str(),
getConfigVersion(level, CONFIG_MIN_VERSION),
ConfigVersions[level][CONFIG_CUR_VERSION]);
@@ -546,7 +546,7 @@ void SyncConfig::prepareConfigForWrite()
// keep compiler happy, not reached for _MAX
break;
}
- SE_LOG_INFO(NULL, NULL, "must change format of %s '%s' in backward-incompatible way",
+ SE_LOG_INFO(NULL, "must change format of %s '%s' in backward-incompatible way",
ConfigLevel2String(level).c_str(),
config.c_str());
if (m_configWriteMode == MIGRATE_AUTOMATICALLY) {
diff --git a/src/syncevo/SyncContext.cpp b/src/syncevo/SyncContext.cpp
index 39f00ee4..d727a56e 100644
--- a/src/syncevo/SyncContext.cpp
+++ b/src/syncevo/SyncContext.cpp
@@ -504,7 +504,7 @@ public:
m_path = m_logdir;
if (mkdir(m_path.c_str(), S_IRWXU) &&
errno != EEXIST) {
- SE_LOG_DEBUG(NULL, NULL, "%s: %s", m_path.c_str(), strerror(errno));
+ SE_LOG_DEBUG(NULL, "%s: %s", m_path.c_str(), strerror(errno));
SyncContext::throwError(m_path, errno);
}
}
@@ -690,7 +690,7 @@ public:
}
}
if (!mustkeep) {
- SE_LOG_DEBUG(NULL, NULL, "removing %s", path.c_str());
+ SE_LOG_DEBUG(NULL, "removing %s", path.c_str());
rm_r(path);
++deleted;
}
@@ -1089,7 +1089,7 @@ public:
string dir = databaseName(*source, suffix);
boost::shared_ptr<ConfigNode> node = ConfigNode::createFileNode(dir + ".ini");
- SE_LOG_DEBUG(NULL, NULL, "creating %s", dir.c_str());
+ SE_LOG_DEBUG(NULL, "creating %s", dir.c_str());
rm_r(dir);
BackupReport dummy;
if (source->getOperations().m_backupData) {
@@ -1127,7 +1127,7 @@ public:
dir, node);
source->getOperations().m_backupData(oldBackup, newBackup,
report ? source->*report : dummy);
- SE_LOG_DEBUG(NULL, NULL, "%s created", dir.c_str());
+ SE_LOG_DEBUG(NULL, "%s created", dir.c_str());
// remember that we have dumped at the beginning of a sync
if (suffix == "before") {
@@ -1226,7 +1226,7 @@ public:
// dump only if not done before or changed
if (m_intro != intro) {
- SE_LOG_SHOW(NULL, NULL, "%s", intro.c_str());
+ SE_LOG_SHOW(NULL, "%s", intro.c_str());
m_intro = intro;
}
@@ -1253,7 +1253,7 @@ public:
oldDir = databaseName(*source, oldSuffix, oldSession);
}
string newDir = databaseName(*source, newSuffix);
- SE_LOG_SHOW(NULL, NULL, "*** %s ***", source->getDisplayName().c_str());
+ SE_LOG_SHOW(NULL, "*** %s ***", source->getDisplayName().c_str());
string cmd = string("env CLIENT_TEST_COMPARISON_FAILED=10 " + config + " synccompare '" ) +
oldDir + "' '" + newDir + "'";
int ret = Execute(cmd, EXECUTE_NO_STDERR);
@@ -1261,16 +1261,16 @@ public:
WIFEXITED(ret) ? WEXITSTATUS(ret) :
-1) {
case 0:
- SE_LOG_SHOW(NULL, NULL, "no changes");
+ SE_LOG_SHOW(NULL, "no changes");
break;
case 10:
break;
default:
- SE_LOG_SHOW(NULL, NULL, "Comparison was impossible.");
+ SE_LOG_SHOW(NULL, "Comparison was impossible.");
break;
}
}
- SE_LOG_SHOW(NULL, NULL, "\n");
+ SE_LOG_SHOW(NULL, "\n");
return true;
}
@@ -1288,7 +1288,7 @@ public:
m_doLogging &&
(m_client.getDumpData() || m_client.getPrintChanges())) {
// dump initial databases
- SE_LOG_INFO(NULL, NULL, "creating complete data backup of source %s before sync (%s)",
+ SE_LOG_INFO(NULL, "creating complete data backup of source %s before sync (%s)",
sourceName.c_str(),
(m_client.getDumpData() && m_client.getPrintChanges()) ? "enabled with dumpData and needed for printChanges" :
m_client.getDumpData() ? "because it was enabled with dumpData" :
@@ -1320,7 +1320,7 @@ public:
(m_client.getDumpData() ||
(m_client.getPrintChanges() && m_reportTodo && !m_prepared.empty()))) {
try {
- SE_LOG_INFO(NULL, NULL, "creating complete data backup after sync (%s)",
+ SE_LOG_INFO(NULL, "creating complete data backup after sync (%s)",
(m_client.getDumpData() && m_client.getPrintChanges()) ? "enabled with dumpData and needed for printChanges" :
m_client.getDumpData() ? "because it was enabled with dumpData" :
m_client.getPrintChanges() ? "needed for printChanges" :
@@ -1353,18 +1353,18 @@ public:
string logfile = m_logdir.getLogfile();
if (status == STATUS_OK) {
- SE_LOG_SHOW(NULL, NULL, "\nSynchronization successful.");
+ SE_LOG_SHOW(NULL, "\nSynchronization successful.");
} else if (logfile.size()) {
- SE_LOG_SHOW(NULL, NULL, "\nSynchronization failed, see %s for details.",
+ SE_LOG_SHOW(NULL, "\nSynchronization failed, see %s for details.",
logfile.c_str());
} else {
- SE_LOG_SHOW(NULL, NULL, "\nSynchronization failed.");
+ SE_LOG_SHOW(NULL, "\nSynchronization failed.");
}
// pretty-print report
if (m_logLevel > LOGGING_QUIET) {
std::string procname = Logger::getProcessName();
- SE_LOG_SHOW(NULL, NULL, "\nChanges applied during synchronization%s%s%s:",
+ SE_LOG_SHOW(NULL, "\nChanges applied during synchronization%s%s%s:",
procname.empty() ? "" : " (",
procname.c_str(),
procname.empty() ? "" : ")");
@@ -1376,7 +1376,7 @@ public:
if (!slowSync.empty()) {
out << endl << slowSync;
}
- SE_LOG_SHOW(NULL, NULL, "%s", out.str().c_str());
+ SE_LOG_SHOW(NULL, "%s", out.str().c_str());
}
// compare databases?
@@ -1521,7 +1521,7 @@ string SyncContext::getUsedSyncURL() {
static void CancelTransport(TransportAgent *agent, SuspendFlags &flags)
{
if (flags.getState() == SuspendFlags::ABORT) {
- SE_LOG_DEBUG(NULL, NULL, "CancelTransport: cancelling because of SuspendFlags::ABORT");
+ SE_LOG_DEBUG(NULL, "CancelTransport: cancelling because of SuspendFlags::ABORT");
agent->cancel();
}
}
@@ -1586,7 +1586,7 @@ boost::shared_ptr<TransportAgent> SyncContext::createTransportAgent(void *gmainl
void SyncContext::displayServerMessage(const string &message)
{
- SE_LOG_INFO(NULL, NULL, "message from server: %s", message.c_str());
+ SE_LOG_INFO(NULL, "message from server: %s", message.c_str());
}
void SyncContext::displaySyncProgress(sysync::TProgressEventEnum type,
@@ -1611,20 +1611,20 @@ void SyncContext::displaySourceProgress(sysync::TProgressEventEnum type,
if (true || source.getFinalSyncMode() == SYNC_NONE) {
// not active, suppress output
} else if (extra2) {
- SE_LOG_INFO(NULL, NULL, "%s: preparing %d/%d",
+ SE_LOG_INFO(NULL, "%s: preparing %d/%d",
source.getDisplayName().c_str(), extra1, extra2);
} else {
- SE_LOG_INFO(NULL, NULL, "%s: preparing %d",
+ SE_LOG_INFO(NULL, "%s: preparing %d",
source.getDisplayName().c_str(), extra1);
}
break;
case sysync::PEV_DELETING:
/* deleting (zapping datastore), extra1=progress, extra2=total */
if (extra2) {
- SE_LOG_INFO(NULL, NULL, "%s: deleting %d/%d",
+ SE_LOG_INFO(NULL, "%s: deleting %d/%d",
source.getDisplayName().c_str(), extra1, extra2);
} else {
- SE_LOG_INFO(NULL, NULL, "%s: deleting %d",
+ SE_LOG_INFO(NULL, "%s: deleting %d",
source.getDisplayName().c_str(), extra1);
}
break;
@@ -1635,7 +1635,7 @@ void SyncContext::displaySourceProgress(sysync::TProgressEventEnum type,
// -1 is used for alerting a restore from backup. Synthesis won't use this
bool peerIsClient = getPeerIsClient();
if (extra1 != -1) {
- SE_LOG_INFO(NULL, NULL, "%s: %s %s sync%s (%s)",
+ SE_LOG_INFO(NULL, "%s: %s %s sync%s (%s)",
source.getDisplayName().c_str(),
extra2 ? "resuming" : "starting",
extra1 == 0 ? "normal" :
@@ -1723,14 +1723,14 @@ void SyncContext::displaySourceProgress(sysync::TProgressEventEnum type,
source.recordRestart();
}
} else {
- SE_LOG_INFO(NULL, NULL, "%s: restore from backup", source.getDisplayName().c_str());
+ SE_LOG_INFO(NULL, "%s: restore from backup", source.getDisplayName().c_str());
source.recordFinalSyncMode(SYNC_RESTORE_FROM_BACKUP);
}
break;
}
case sysync::PEV_SYNCSTART:
/* sync started */
- SE_LOG_INFO(NULL, NULL, "%s: started",
+ SE_LOG_INFO(NULL, "%s: started",
source.getDisplayName().c_str());
break;
case sysync::PEV_ITEMRECEIVED:
@@ -1738,10 +1738,10 @@ void SyncContext::displaySourceProgress(sysync::TProgressEventEnum type,
extra2=number of expected changes (if >= 0) */
if (source.getFinalSyncMode() == SYNC_NONE) {
} else if (extra2 > 0) {
- SE_LOG_INFO(NULL, NULL, "%s: received %d/%d",
+ SE_LOG_INFO(NULL, "%s: received %d/%d",
source.getDisplayName().c_str(), extra1, extra2);
} else {
- SE_LOG_INFO(NULL, NULL, "%s: received %d",
+ SE_LOG_INFO(NULL, "%s: received %d",
source.getDisplayName().c_str(), extra1);
}
break;
@@ -1750,10 +1750,10 @@ void SyncContext::displaySourceProgress(sysync::TProgressEventEnum type,
extra2=number of expected items to be sent (if >=0) */
if (source.getFinalSyncMode() == SYNC_NONE) {
} else if (extra2 > 0) {
- SE_LOG_INFO(NULL, NULL, "%s: sent %d/%d",
+ SE_LOG_INFO(NULL, "%s: sent %d/%d",
source.getDisplayName().c_str(), extra1, extra2);
} else {
- SE_LOG_INFO(NULL, NULL, "%s: sent %d",
+ SE_LOG_INFO(NULL, "%s: sent %d",
source.getDisplayName().c_str(), extra1);
}
break;
@@ -1763,7 +1763,7 @@ void SyncContext::displaySourceProgress(sysync::TProgressEventEnum type,
extra3=# deleted */
if (source.getFinalSyncMode() == SYNC_NONE) {
} else if (source.getFinalSyncMode() != SYNC_NONE) {
- SE_LOG_INFO(NULL, NULL, "%s: added %d, updated %d, removed %d",
+ SE_LOG_INFO(NULL, "%s: added %d, updated %d, removed %d",
source.getDisplayName().c_str(), extra1, extra2, extra3);
}
break;
@@ -1772,13 +1772,13 @@ void SyncContext::displaySourceProgress(sysync::TProgressEventEnum type,
syncmode in extra2 (0=normal, 1=slow, 2=first time),
extra3=1 for resumed session) */
if (source.getFinalSyncMode() == SYNC_NONE) {
- SE_LOG_INFO(NULL, NULL, "%s: inactive", source.getDisplayName().c_str());
+ SE_LOG_INFO(NULL, "%s: inactive", source.getDisplayName().c_str());
} else if(source.getFinalSyncMode() == SYNC_RESTORE_FROM_BACKUP) {
- SE_LOG_INFO(NULL, NULL, "%s: restore done %s",
+ SE_LOG_INFO(NULL, "%s: restore done %s",
source.getDisplayName().c_str(),
extra1 ? "unsuccessfully" : "successfully" );
} else {
- SE_LOG_INFO(NULL, NULL, "%s: %s%s sync done %s",
+ SE_LOG_INFO(NULL, "%s: %s%s sync done %s",
source.getDisplayName().c_str(),
extra3 ? "resumed " : "",
extra2 == 0 ? "normal" :
@@ -1790,16 +1790,16 @@ void SyncContext::displaySourceProgress(sysync::TProgressEventEnum type,
switch (extra1) {
case 401:
// TODO: reset cached password
- SE_LOG_INFO(NULL, NULL, "authorization failed, check username '%s' and password", getSyncUsername().c_str());
+ SE_LOG_INFO(NULL, "authorization failed, check username '%s' and password", getSyncUsername().c_str());
break;
case 403:
- SE_LOG_INFO(NULL, source.getDisplayName(), "log in succeeded, but server refuses access - contact server operator");
+ SE_LOG_INFO(source.getDisplayName(), "log in succeeded, but server refuses access - contact server operator");
break;
case 407:
- SE_LOG_INFO(NULL, NULL, "proxy authorization failed, check proxy username and password");
+ SE_LOG_INFO(NULL, "proxy authorization failed, check proxy username and password");
break;
case 404:
- SE_LOG_INFO(NULL, source.getDisplayName(), "server database not found, check URI '%s'", source.getURINonEmpty().c_str());
+ SE_LOG_INFO(source.getDisplayName(), "server database not found, check URI '%s'", source.getURINonEmpty().c_str());
break;
case 0:
break;
@@ -1812,7 +1812,7 @@ void SyncContext::displaySourceProgress(sysync::TProgressEventEnum type,
// because even "good" sources will get a bad status when the overall
// session turns bad. We also don't have good explanations for the
// status here.
- SE_LOG_ERROR(NULL, source.getDisplayName(), "%s", Status2String(SyncMLStatus(extra1)).c_str());
+ SE_LOG_ERROR(source.getDisplayName(), "%s", Status2String(SyncMLStatus(extra1)).c_str());
break;
}
source.recordStatus(SyncMLStatus(extra1));
@@ -1908,7 +1908,7 @@ void SyncContext::displaySourceProgress(sysync::TProgressEventEnum type,
extra2);
break;
default:
- SE_LOG_DEBUG(NULL, NULL, "%s: progress event %d, extra %d/%d/%d",
+ SE_LOG_DEBUG(NULL, "%s: progress event %d, extra %d/%d/%d",
source.getDisplayName().c_str(),
type, extra1, extra2, extra3);
}
@@ -1963,7 +1963,7 @@ void SyncContext::throwError(const string &action, int error)
void SyncContext::fatalError(void *object, const char *error)
{
- SE_LOG_ERROR(NULL, NULL, "%s", error);
+ SE_LOG_ERROR(NULL, "%s", error);
if (m_activeContext && m_activeContext->m_sourceListPtr) {
m_activeContext->m_sourceListPtr->syncDone(STATUS_FATAL, NULL);
}
@@ -2592,7 +2592,7 @@ void SyncContext::getConfigXML(string &xml, string &configname)
if (!subType.m_format.empty() && (
sourceType.m_format != subType.m_format ||
sourceType.m_forceFormat != subType.m_forceFormat)) {
- SE_LOG_WARNING(NULL, NULL,
+ SE_LOG_WARNING(NULL,
"Virtual data source \"%s\" and sub data source \"%s\" have different data format. Will use the format in virtual data source.",
vSource->getDisplayName().c_str(), source.c_str());
}
@@ -2750,7 +2750,7 @@ SharedEngine SyncContext::createEngine()
namespace {
void GnutlsLogFunction(int level, const char *str)
{
- SE_LOG_DEBUG(NULL, "GNUTLS", "level %d: %s", level, str);
+ SE_LOG_DEBUG("GNUTLS", "level %d: %s", level, str);
}
}
@@ -2818,7 +2818,7 @@ void SyncContext::initEngine(bool logXML)
try {
m_engine.InitEngineXML(xml.c_str());
} catch (const BadSynthesisResult &ex) {
- SE_LOG_ERROR(NULL, NULL,
+ SE_LOG_ERROR(NULL,
"internal error, invalid XML configuration (%s):\n%s",
m_sourceListPtr && !m_sourceListPtr->empty() ?
"with datastores" :
@@ -2828,7 +2828,7 @@ void SyncContext::initEngine(bool logXML)
}
if (logXML &&
getLogLevel() >= 5) {
- SE_LOG_DEV(NULL, NULL, "Full XML configuration:\n%s", xml.c_str());
+ SE_LOG_DEV(NULL, "Full XML configuration:\n%s", xml.c_str());
}
}
@@ -2887,7 +2887,7 @@ void SyncContext::initMain(const char *appname)
set_log_level(atoi(gnutlsdbg));
set_log_function(GnutlsLogFunction);
} else {
- SE_LOG_ERROR(NULL, NULL, "SYNCEVOLUTION_GNUTLS_DEBUG debugging not possible, log functions not found");
+ SE_LOG_ERROR(NULL, "SYNCEVOLUTION_GNUTLS_DEBUG debugging not possible, log functions not found");
}
}
}
@@ -2921,9 +2921,9 @@ void SyncContext::checkConfig(const std::string &operation) const
if (isConfigNeeded() &&
(!exists() || peer.empty())) {
if (peer.empty()) {
- SE_LOG_INFO(NULL, NULL, "Configuration \"%s\" does not refer to a sync peer.", m_server.c_str());
+ SE_LOG_INFO(NULL, "Configuration \"%s\" does not refer to a sync peer.", m_server.c_str());
} else {
- SE_LOG_INFO(NULL, NULL, "Configuration \"%s\" does not exist.", m_server.c_str());
+ SE_LOG_INFO(NULL, "Configuration \"%s\" does not exist.", m_server.c_str());
}
throwError(StringPrintf("Cannot proceed with %s without a configuration.", operation.c_str()));
}
@@ -2987,11 +2987,11 @@ SyncMLStatus SyncContext::sync(SyncReport *report)
try {
// dump some summary information at the beginning of the log
- SE_LOG_DEV(NULL, NULL, "SyncML server account: %s", getSyncUsername().c_str());
- SE_LOG_DEV(NULL, NULL, "client: SyncEvolution %s for %s", getSwv().c_str(), getDevType().c_str());
- SE_LOG_DEV(NULL, NULL, "device ID: %s", getDevID().c_str());
- SE_LOG_DEV(NULL, NULL, "%s", EDSAbiWrapperDebug());
- SE_LOG_DEV(NULL, NULL, "%s", SyncSource::backendsDebug().c_str());
+ SE_LOG_DEV(NULL, "SyncML server account: %s", getSyncUsername().c_str());
+ SE_LOG_DEV(NULL, "client: SyncEvolution %s for %s", getSwv().c_str(), getDevType().c_str());
+ SE_LOG_DEV(NULL, "device ID: %s", getDevID().c_str());
+ SE_LOG_DEV(NULL, "%s", EDSAbiWrapperDebug());
+ SE_LOG_DEV(NULL, "%s", SyncSource::backendsDebug().c_str());
// ensure that config can be modified (might have to be migrated first)
prepareConfigForWrite();
@@ -3019,13 +3019,13 @@ SyncMLStatus SyncContext::sync(SyncReport *report)
*/
ConfigPropertyRegistry& registry = SyncConfig::getRegistry();
BOOST_FOREACH(const ConfigProperty *prop, registry) {
- SE_LOG_DEBUG(NULL, NULL, "checking sync password %s", prop->getMainName().c_str());
+ SE_LOG_DEBUG(NULL, "checking sync password %s", prop->getMainName().c_str());
prop->checkPassword(getUserInterfaceNonNull(), m_server, *getProperties());
}
BOOST_FOREACH(SyncSource *source, sourceList) {
ConfigPropertyRegistry& registry = SyncSourceConfig::getRegistry();
BOOST_FOREACH(const ConfigProperty *prop, registry) {
- SE_LOG_DEBUG(NULL, NULL, "checking source %s password %s",
+ SE_LOG_DEBUG(NULL, "checking source %s password %s",
source->getName().c_str(),
prop->getMainName().c_str());
prop->checkPassword(getUserInterfaceNonNull(), m_server, *getProperties(),
@@ -3140,7 +3140,7 @@ bool SyncContext::sendSAN(uint16_t version)
if(serverId.empty()) {
serverId = getDevID();
}
- SE_LOG_DEBUG(NULL, NULL, "starting SAN %u auth %s nonce %s session %u server %s",
+ SE_LOG_DEBUG(NULL, "starting SAN %u auth %s nonce %s session %u server %s",
version,
uauthb64.c_str(),
nonce.c_str(),
@@ -3185,7 +3185,7 @@ bool SyncContext::sendSAN(uint16_t version)
mode = SA_TWO_WAY;
}
if (mode < SA_FIRST || mode > SA_LAST) {
- SE_LOG_DEV (NULL, NULL, "Ignoring data source %s with an invalid sync mode", name.c_str());
+ SE_LOG_DEV(NULL, "Ignoring data source %s with an invalid sync mode", name.c_str());
continue;
}
syncMode = mode;
@@ -3204,19 +3204,19 @@ bool SyncContext::sendSAN(uint16_t version)
int contentTypeB = StringToContentType (sourceType.m_format, sourceType.m_forceFormat);
if (contentTypeB == WSPCTC_UNKNOWN) {
contentTypeB = 0;
- SE_LOG_DEBUG (NULL, NULL, "Unknown datasource mimetype, use 0 as default");
+ SE_LOG_DEBUG(NULL, "Unknown datasource mimetype, use 0 as default");
}
- SE_LOG_DEBUG(NULL, NULL, "SAN source %s uri %s type %u mode %d",
+ SE_LOG_DEBUG(NULL, "SAN source %s uri %s type %u mode %d",
name.c_str(),
uri.c_str(),
contentTypeB,
mode);
if ( san.AddSync(mode, (uInt32) contentTypeB, uri.c_str())) {
- SE_LOG_ERROR(NULL, NULL, "SAN: adding server alerted sync element failed");
+ SE_LOG_ERROR(NULL, "SAN: adding server alerted sync element failed");
};
} else {
string mimetype = GetLegacyMIMEType(sourceType.m_format, sourceType.m_forceFormat);
- SE_LOG_DEBUG(NULL, NULL, "SAN source %s uri %s type %s",
+ SE_LOG_DEBUG(NULL, "SAN source %s uri %s type %s",
name.c_str(),
uri.c_str(),
mimetype.c_str());
@@ -3233,21 +3233,21 @@ bool SyncContext::sendSAN(uint16_t version)
size_t sanSize;
if (!legacy) {
if (san.GetPackage(buffer, sanSize)){
- SE_LOG_ERROR (NULL, NULL, "SAN package generating failed");
+ SE_LOG_ERROR(NULL, "SAN package generating failed");
return false;
}
//TODO log the binary SAN content
} else {
- SE_LOG_DEBUG(NULL, NULL, "SAN with overall sync mode %d", syncMode);
+ SE_LOG_DEBUG(NULL, "SAN with overall sync mode %d", syncMode);
if (san.GetPackageLegacy(buffer, sanSize, alertedSources, syncMode, getWBXML())){
- SE_LOG_ERROR (NULL, NULL, "SAN package generating failed");
+ SE_LOG_ERROR(NULL, "SAN package generating failed");
return false;
}
- //SE_LOG_DEBUG (NULL, NULL, "SAN package content: %s", (char*)buffer);
+ //SE_LOG_DEBUG(NULL, "SAN package content: %s", (char*)buffer);
}
m_agent = createTransportAgent();
- SE_LOG_INFO (NULL, NULL, "Server sending SAN");
+ SE_LOG_INFO(NULL, "Server sending SAN");
m_serverAlerted = true;
m_agent->setContentType(!legacy ?
TransportAgent::m_contentTypeServerAlertedNotificationDS
@@ -3315,12 +3315,12 @@ SyncMLStatus SyncContext::doSync()
// install signal handlers unless this was explicitly disabled
bool catchSignals = getenv("SYNCEVOLUTION_NO_SYNC_SIGNALS") == NULL;
if (catchSignals) {
- SE_LOG_DEBUG(NULL, NULL, "sync is starting, catch signals");
+ SE_LOG_DEBUG(NULL, "sync is starting, catch signals");
signalGuard = SuspendFlags::getSuspendFlags().activate();
}
// delay the sync for debugging purposes
- SE_LOG_DEBUG(NULL, NULL, "ready to sync");
+ SE_LOG_DEBUG(NULL, "ready to sync");
const char *delay = getenv("SYNCEVOLUTION_SYNC_DELAY");
if (delay) {
Sleep(atoi(delay));
@@ -3367,7 +3367,7 @@ SyncMLStatus SyncContext::doSync()
if (! status) {
if (sanFormat.empty()) {
- SE_LOG_DEBUG (NULL, NULL, "Server Alerted Sync init with SANFormat %d failed, trying with legacy format", version);
+ SE_LOG_DEBUG(NULL, "Server Alerted Sync init with SANFormat %d failed, trying with legacy format", version);
version = 11;
if (!sendSAN (version)) {
// return a proper error code
@@ -3537,7 +3537,7 @@ SyncMLStatus SyncContext::doSync()
// After exception occurs, stepCmd will be set to abort to force
// aborting, must avoid to change it back to suspend cmd.
if (checkForSuspend() && stepCmd == sysync::STEPCMD_GOTDATA) {
- SE_LOG_DEBUG(NULL, NULL, "suspending before SessionStep() in STEPCMD_GOTDATA as requested by user");
+ SE_LOG_DEBUG(NULL, "suspending before SessionStep() in STEPCMD_GOTDATA as requested by user");
stepCmd = sysync::STEPCMD_SUSPEND;
}
@@ -3555,7 +3555,7 @@ SyncMLStatus SyncContext::doSync()
stepCmd == sysync::STEPCMD_SENTDATA ||
stepCmd == sysync::STEPCMD_NEEDDATA) &&
checkForAbort()) {
- SE_LOG_DEBUG(NULL, NULL, "aborting before SessionStep() in %s as requested by script",
+ SE_LOG_DEBUG(NULL, "aborting before SessionStep() in %s as requested by script",
Step2String(stepCmd).c_str());
stepCmd = sysync::STEPCMD_ABORT;
}
@@ -3564,7 +3564,7 @@ SyncMLStatus SyncContext::doSync()
// let engine contine with its shutdown
if (stepCmd == sysync::STEPCMD_ABORT) {
if (aborting) {
- SE_LOG_DEBUG(NULL, NULL, "engine already notified of abort request, reverting to %s",
+ SE_LOG_DEBUG(NULL, "engine already notified of abort request, reverting to %s",
Step2String(previousStepCmd).c_str());
stepCmd = previousStepCmd;
} else {
@@ -3574,7 +3574,7 @@ SyncMLStatus SyncContext::doSync()
// same for suspending
if (stepCmd == sysync::STEPCMD_SUSPEND) {
if (suspending) {
- SE_LOG_DEBUG(NULL, NULL, "engine already notified of suspend request, reverting to %s",
+ SE_LOG_DEBUG(NULL, "engine already notified of suspend request, reverting to %s",
Step2String(previousStepCmd).c_str());
stepCmd = previousStepCmd;
suspending++;
@@ -3590,18 +3590,18 @@ SyncMLStatus SyncContext::doSync()
// and wait for response.
} else {
if (getLogLevel() > 4) {
- SE_LOG_DEBUG(NULL, NULL, "before SessionStep: %s", Step2String(stepCmd).c_str());
+ SE_LOG_DEBUG(NULL, "before SessionStep: %s", Step2String(stepCmd).c_str());
}
m_engine.SessionStep(session, stepCmd, &progressInfo);
if (getLogLevel() > 4) {
- SE_LOG_DEBUG(NULL, NULL, "after SessionStep: %s", Step2String(stepCmd).c_str());
+ SE_LOG_DEBUG(NULL, "after SessionStep: %s", Step2String(stepCmd).c_str());
}
reportStepCmd(stepCmd);
}
if (stepCmd == sysync::STEPCMD_SENDDATA &&
checkForScriptAbort(session)) {
- SE_LOG_DEBUG(NULL, NULL, "aborting after SessionStep() in STEPCMD_SENDDATA as requested by script");
+ SE_LOG_DEBUG(NULL, "aborting after SessionStep() in STEPCMD_SENDDATA as requested by script");
// Catch outgoing message and abort if requested by script.
// Report which sources are affected, based on their status code.
@@ -3619,20 +3619,20 @@ SyncMLStatus SyncContext::doSync()
sources);
if (!explanation.empty()) {
string sourceparam = boost::join(sources, " ");
- SE_LOG_ERROR(NULL, NULL,
+ SE_LOG_ERROR(NULL,
"Aborting because of unexpected slow sync for source(s): %s",
sourceparam.c_str());
- SE_LOG_INFO(NULL, NULL, "%s", explanation.c_str());
+ SE_LOG_INFO(NULL, "%s", explanation.c_str());
} else {
// we should not get here, but if we do, at least log something
- SE_LOG_ERROR(NULL, NULL, "aborting as requested by script");
+ SE_LOG_ERROR(NULL, "aborting as requested by script");
}
stepCmd = sysync::STEPCMD_ABORT;
continue;
} else if (stepCmd == sysync::STEPCMD_SENDDATA &&
checkForAbort()) {
// Catch outgoing message and abort if requested by user.
- SE_LOG_DEBUG(NULL, NULL, "aborting after SessionStep() in STEPCMD_SENDDATA as requested by user");
+ SE_LOG_DEBUG(NULL, "aborting after SessionStep() in STEPCMD_SENDDATA as requested by user");
stepCmd = sysync::STEPCMD_ABORT;
continue;
} else if (suspending == 1) {
@@ -3732,7 +3732,7 @@ SyncMLStatus SyncContext::doSync()
break;
}
case sysync::STEPCMD_RESENDDATA: {
- SE_LOG_INFO (NULL, NULL, "resend previous message, retry #%d", m_retries);
+ SE_LOG_INFO(NULL, "resend previous message, retry #%d", m_retries);
resendStart = time(NULL);
/* We are resending previous message, just read from the
* previous buffer */
@@ -3760,7 +3760,7 @@ SyncMLStatus SyncContext::doSync()
// Same if() as below for FAILED.
if (m_serverMode ||
!m_retryInterval || duration > m_retryDuration || requestNum == 1) {
- SE_LOG_INFO(NULL, NULL,
+ SE_LOG_INFO(NULL,
"Transport giving up after %d retries and %ld:%02ldmin",
m_retries,
(long)(duration / 60),
@@ -3797,9 +3797,9 @@ SyncMLStatus SyncContext::doSync()
stepCmd = sysync::STEPCMD_GOTDATA; // we have received response data
break;
} else {
- SE_LOG_DEBUG(NULL, NULL, "unexpected content type '%s' in reply, %d bytes:\n%.*s",
+ SE_LOG_DEBUG(NULL, "unexpected content type '%s' in reply, %d bytes:\n%.*s",
contentType.c_str(), (int)replylen, (int)replylen, reply);
- SE_LOG_ERROR(NULL, NULL, "unexpected reply from server; might be a temporary problem, try again later");
+ SE_LOG_ERROR(NULL, "unexpected reply from server; might be a temporary problem, try again later");
} //fall through to network failure case
}
/* If this is a network error, it usually failed quickly, retry
@@ -3811,11 +3811,11 @@ SyncMLStatus SyncContext::doSync()
// Send might have failed because of abort or
// suspend request.
if (checkForSuspend()) {
- SE_LOG_DEBUG(NULL, NULL, "suspending after TransportAgent::FAILED as requested by user");
+ SE_LOG_DEBUG(NULL, "suspending after TransportAgent::FAILED as requested by user");
stepCmd = sysync::STEPCMD_SUSPEND;
break;
} else if (checkForAbort()) {
- SE_LOG_DEBUG(NULL, NULL, "aborting after TransportAgent::FAILED as requested by user");
+ SE_LOG_DEBUG(NULL, "aborting after TransportAgent::FAILED as requested by user");
stepCmd = sysync::STEPCMD_ABORT;
break;
}
@@ -3825,7 +3825,7 @@ SyncMLStatus SyncContext::doSync()
// same if() as above for TIME_OUT
if (m_serverMode ||
!m_retryInterval || duration > m_retryDuration || requestNum == 1) {
- SE_LOG_INFO(NULL, NULL,
+ SE_LOG_INFO(NULL,
"Transport giving up after %d retries and %ld:%02ldmin",
m_retries,
(long)(duration / 60),
@@ -3837,10 +3837,10 @@ SyncMLStatus SyncContext::doSync()
if (leftTime >0 ) {
if (Sleep(leftTime) > 0) {
if (checkForSuspend()) {
- SE_LOG_DEBUG(NULL, NULL, "suspending after premature exit from sleep() caused by user suspend");
+ SE_LOG_DEBUG(NULL, "suspending after premature exit from sleep() caused by user suspend");
stepCmd = sysync::STEPCMD_SUSPEND;
} else {
- SE_LOG_DEBUG(NULL, NULL, "aborting after premature exit from sleep() caused by user abort");
+ SE_LOG_DEBUG(NULL, "aborting after premature exit from sleep() caused by user abort");
stepCmd = sysync::STEPCMD_ABORT;
}
break;
@@ -3856,11 +3856,11 @@ SyncMLStatus SyncContext::doSync()
// Send might have failed because of abort or
// suspend request.
if (checkForSuspend()) {
- SE_LOG_DEBUG(NULL, NULL, "suspending after TransportAgent::CANCELED as requested by user");
+ SE_LOG_DEBUG(NULL, "suspending after TransportAgent::CANCELED as requested by user");
stepCmd = sysync::STEPCMD_SUSPEND;
break;
} else if (checkForAbort()) {
- SE_LOG_DEBUG(NULL, NULL, "aborting after TransportAgent::CANCELED as requested by user");
+ SE_LOG_DEBUG(NULL, "aborting after TransportAgent::CANCELED as requested by user");
stepCmd = sysync::STEPCMD_ABORT;
break;
}
@@ -3884,26 +3884,26 @@ SyncMLStatus SyncContext::doSync()
// loop until session done or aborted with error
} catch (const BadSynthesisResult &result) {
if (result.result() == sysync::LOCERR_USERABORT && aborting) {
- SE_LOG_INFO(NULL, NULL, "Aborted as requested.");
+ SE_LOG_INFO(NULL, "Aborted as requested.");
stepCmd = sysync::STEPCMD_DONE;
} else if (result.result() == sysync::LOCERR_USERSUSPEND && suspending) {
- SE_LOG_INFO(NULL, NULL, "Suspended as requested.");
+ SE_LOG_INFO(NULL, "Suspended as requested.");
stepCmd = sysync::STEPCMD_DONE;
} else if (aborting) {
// aborting very early can lead to results different from LOCERR_USERABORT
// => don't treat this as error
- SE_LOG_INFO(NULL, NULL, "Aborted with unexpected result (%d)",
+ SE_LOG_INFO(NULL, "Aborted with unexpected result (%d)",
static_cast<int>(result.result()));
stepCmd = sysync::STEPCMD_DONE;
} else {
Exception::handle(&status);
- SE_LOG_DEBUG(NULL, NULL, "aborting after catching fatal error");
+ SE_LOG_DEBUG(NULL, "aborting after catching fatal error");
// Don't tell engine to abort when it already did.
stepCmd = aborting ? sysync::STEPCMD_DONE : sysync::STEPCMD_ABORT;
}
} catch (...) {
Exception::handle(&status);
- SE_LOG_DEBUG(NULL, NULL, "aborting after catching fatal error");
+ SE_LOG_DEBUG(NULL, "aborting after catching fatal error");
// Don't tell engine to abort when it already did.
stepCmd = aborting ? sysync::STEPCMD_DONE : sysync::STEPCMD_ABORT;
}
@@ -3970,7 +3970,7 @@ void SyncContext::status()
SyncReport::WITHOUT_CONFLICTS|
SyncReport::WITHOUT_REJECTS|
SyncReport::WITH_TOTAL);
- SE_LOG_INFO(NULL, NULL, "Local item changes:\n%s",
+ SE_LOG_INFO(NULL, "Local item changes:\n%s",
out.str().c_str());
sourceList.accessSession(getLogDir());
@@ -3989,9 +3989,9 @@ void SyncContext::status()
}
}
} else {
- SE_LOG_SHOW(NULL, NULL, "Previous log directory not found.");
+ SE_LOG_SHOW(NULL, "Previous log directory not found.");
if (getLogDir().empty()) {
- SE_LOG_SHOW(NULL, NULL, "Enable the 'logdir' option and synchronize to use this feature.");
+ SE_LOG_SHOW(NULL, "Enable the 'logdir' option and synchronize to use this feature.");
}
}
}
@@ -4021,11 +4021,11 @@ static void logRestoreReport(const SyncReport &report, bool dryrun)
if (!report.empty()) {
stringstream out;
report.prettyPrint(out, SyncReport::WITHOUT_SERVER|SyncReport::WITHOUT_CONFLICTS|SyncReport::WITH_TOTAL);
- SE_LOG_INFO(NULL, NULL, "Item changes %s applied locally during restore:\n%s",
+ SE_LOG_INFO(NULL, "Item changes %s applied locally during restore:\n%s",
dryrun ? "to be" : "that were",
out.str().c_str());
- SE_LOG_INFO(NULL, NULL, "The same incremental changes will be applied to the server during the next sync.");
- SE_LOG_INFO(NULL, NULL, "Use -sync refresh-from-client to replace the complete data on the server.");
+ SE_LOG_INFO(NULL, "The same incremental changes will be applied to the server during the next sync.");
+ SE_LOG_INFO(NULL, "Use -sync refresh-from-client to replace the complete data on the server.");
}
}
diff --git a/src/syncevo/SyncSource.cpp b/src/syncevo/SyncSource.cpp
index 888ac457..c56506de 100644
--- a/src/syncevo/SyncSource.cpp
+++ b/src/syncevo/SyncSource.cpp
@@ -358,7 +358,7 @@ void SyncSource::requestAnotherSync()
// stored; instead only a per-session request is set. That's okay
// for now because restarting is limited to sessions with only
// one source active (intentional simplification).
- SE_LOG_DEBUG(NULL, getDisplayName(), "requesting another sync");
+ SE_LOG_DEBUG(getDisplayName(), "requesting another sync");
SyncContext::requestAnotherSync();
}
@@ -839,7 +839,7 @@ void ItemCache::backupItem(const std::string &item,
if (link(oldfilename.c_str(), filename.str().c_str())) {
// Hard linking failed. Record this, then continue
// by ignoring the old file.
- SE_LOG_DEBUG(NULL, NULL, "hard linking old %s new %s: %s",
+ SE_LOG_DEBUG(NULL, "hard linking old %s new %s: %s",
oldfilename.c_str(),
filename.str().c_str(),
strerror(errno));
@@ -1247,7 +1247,7 @@ std::string SyncSourceLogging::getDescription(const string &luid)
void SyncSourceLogging::insertItemAsKey(sysync::KeyH aItemKey, sysync::ItemID newID)
{
std::string description = getDescription(aItemKey);
- SE_LOG_INFO(NULL, getDisplayName(),
+ SE_LOG_INFO(getDisplayName(),
description.empty() ? "%s <%s>" : "%s \"%s\"",
"adding",
!description.empty() ? description.c_str() : "???");
@@ -1256,7 +1256,7 @@ void SyncSourceLogging::insertItemAsKey(sysync::KeyH aItemKey, sysync::ItemID ne
void SyncSourceLogging::updateItemAsKey(sysync::KeyH aItemKey, sysync::cItemID aID, sysync::ItemID newID)
{
std::string description = getDescription(aItemKey);
- SE_LOG_INFO(NULL, getDisplayName(),
+ SE_LOG_INFO(getDisplayName(),
description.empty() ? "%s <%s>" : "%s \"%s\"",
"updating",
!description.empty() ? description.c_str() : aID ? aID->item : "???");
@@ -1265,7 +1265,7 @@ void SyncSourceLogging::updateItemAsKey(sysync::KeyH aItemKey, sysync::cItemID a
void SyncSourceLogging::deleteItem(sysync::cItemID aID)
{
std::string description = getDescription(aID->item);
- SE_LOG_INFO(NULL, getDisplayName(),
+ SE_LOG_INFO(getDisplayName(),
description.empty() ? "%s <%s>" : "%s \"%s\"",
"deleting",
!description.empty() ? description.c_str() : aID->item);
diff --git a/src/syncevo/SynthesisDBPlugin.cpp b/src/syncevo/SynthesisDBPlugin.cpp
index 6e13f2b2..6c92a5a6 100644
--- a/src/syncevo/SynthesisDBPlugin.cpp
+++ b/src/syncevo/SynthesisDBPlugin.cpp
@@ -74,7 +74,7 @@ TSyError SyncEvolution_Module_CreateContext( CContext *mContext, cAppCharP mod
}
}
- SE_LOG_DEBUG(NULL, NULL, "CreateContext %s/%s/%s => %d",
+ SE_LOG_DEBUG(NULL, "CreateContext %s/%s/%s => %d",
moduleName, subName, mContextName, err);
return err;
}
@@ -90,7 +90,7 @@ CVersion SyncEvolution_Module_Version(CContext mContext)
CVersion v = Plugin_Version(BuildNumber);
if (mContext) {
- SE_LOG_DEBUG(NULL, NULL, "Module_Version = %08lx", (long)v);
+ SE_LOG_DEBUG(NULL, "Module_Version = %08lx", (long)v);
}
return v;
}
@@ -122,7 +122,7 @@ TSyError SyncEvolution_Module_Capabilities( CContext mContext, appCharP *mCapabi
}
*mCapabilities= StrAlloc(s.str().c_str());
- SE_LOG_DEBUG(NULL, NULL, "Module_Capabilities:\n%s", *mCapabilities);
+ SE_LOG_DEBUG(NULL, "Module_Capabilities:\n%s", *mCapabilities);
return LOCERR_OK;
} /* Module_Capabilities */
@@ -133,7 +133,7 @@ TSyError SyncEvolution_Module_PluginParams( CContext mContext,
cAppCharP mConfigParams, CVersion engineVersion )
{
SyncSource *source = MoC(mContext);
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "Module_PluginParams\n Engine=%08lX\n %s",
+ SE_LOG_DEBUG(source ? source->getDisplayName() : "", "Module_PluginParams\n Engine=%08lX\n %s",
(long)engineVersion, mConfigParams);
/*return LOCERR_CFGPARSE;*/ /* if there are unsupported params */
return LOCERR_OK;
@@ -152,7 +152,7 @@ extern "C"
TSyError SyncEvolution_Module_DeleteContext( CContext mContext )
{
SyncSource *source = MoC(mContext);
- SE_LOG_DEBUG(NULL, NULL, "Module_DeleteContext %s",
+ SE_LOG_DEBUG(NULL, "Module_DeleteContext %s",
source ? source->getName().c_str() : "'session'");
if (source) {
source->popSynthesisAPI();
@@ -171,7 +171,7 @@ extern "C"
TSyError SyncEvolution_Session_CreateContext( CContext *sContext, cAppCharP sessionName, DB_Callback sCB )
{
*sContext = (CContext)SyncContext::findContext(sessionName);
- SE_LOG_DEBUG(NULL, NULL, "Session_CreateContext '%s' %s",
+ SE_LOG_DEBUG(NULL, "Session_CreateContext '%s' %s",
sessionName, *sContext ? "found" : "not found");
if (*sContext) {
return LOCERR_OK;
@@ -191,7 +191,7 @@ TSyError SyncEvolution_Session_AdaptItem( CContext sContext, appCharP *sItemData
{
/**** CAN BE ADAPTED BY USER ****/
// SyncContext* sc= SeC( sContext );
- SE_LOG_DEBUG(NULL, NULL, "Session_AdaptItem '%s' '%s' '%s' id=%d",
+ SE_LOG_DEBUG(NULL, "Session_AdaptItem '%s' '%s' '%s' id=%d",
*sItemData1,*sItemData2,*sLocalVars, sIdentifier);
return LOCERR_OK;
} /* Session_AdaptItem */
@@ -217,14 +217,14 @@ TSyError SyncEvolution_Session_CheckDevice( CContext sContext,
sc->flush();
} else if (id != aDeviceID) {
// We are using the wrong configuration?! Refuse to continue.
- SE_LOG_ERROR(NULL, NULL, "remote device ID '%s' in config does not match the one from the peer '%s' - incorrect configuration?!",
+ SE_LOG_ERROR(NULL, "remote device ID '%s' in config does not match the one from the peer '%s' - incorrect configuration?!",
id.c_str(), aDeviceID);
res = DB_Forbidden;
}
*sDevKey= StrAlloc(aDeviceID);
*nonce = StrAlloc(sc->getNonce().c_str());
- SE_LOG_DEBUG(NULL, NULL, "Session_CheckDevice dev='%s' nonce='%s' res=%d",
+ SE_LOG_DEBUG(NULL, "Session_CheckDevice dev='%s' nonce='%s' res=%d",
*sDevKey, *nonce, res);
return res;
} /* Session_CheckDevice */
@@ -252,7 +252,7 @@ TSyError SyncEvolution_Session_SaveNonce( CContext sContext, cAppCharP nonce )
if (!sc) {
return LOCERR_WRONGUSAGE;
}
- SE_LOG_DEBUG(NULL, NULL, "Session_SaveNonce nonce='%s'",
+ SE_LOG_DEBUG(NULL, "Session_SaveNonce nonce='%s'",
nonce);
sc->setNonce(nonce);
sc->flush();
@@ -269,7 +269,7 @@ TSyError SyncEvolution_Session_SaveDeviceInfo( CContext sContext, cAppCharP aDev
if (!sc) {
return LOCERR_WRONGUSAGE;
}
- SE_LOG_DEBUG(NULL, NULL, "Session_SaveDeviceInfo info='%s'",
+ SE_LOG_DEBUG(NULL, "Session_SaveDeviceInfo info='%s'",
aDeviceInfo );
sc->setDeviceData(aDeviceInfo);
sc->flush();
@@ -321,7 +321,7 @@ TSyError SyncEvolution_Session_Login( CContext sContext, cAppCharP sUsername, ap
res = LOCERR_OK;
}
- SE_LOG_DEBUG(NULL, NULL, "Session_Login usr='%s' expected user='%s' res=%d",
+ SE_LOG_DEBUG(NULL, "Session_Login usr='%s' expected user='%s' res=%d",
sUsername, user.c_str(), res);
return res;
} /* Session_Login */
@@ -399,7 +399,7 @@ TSyError SyncEvolution_CreateContext( CContext *aContext, cAppCharP aContextName
*aContext = (CContext)source;
err = LOCERR_OK;
}
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "'%s' dev='%s' usr='%s' err=%d",
+ SE_LOG_DEBUG(source ? source->getDisplayName() : "", "'%s' dev='%s' usr='%s' err=%d",
aContextName, sDevKey, sUsrKey, err);
return err;
}
@@ -413,7 +413,7 @@ uInt32 SyncEvolution_ContextSupport( CContext aContext, cAppCharP aContextRules
if (!source) {
return LOCERR_WRONGUSAGE;
}
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "ContextSupport %s", aContextRules);
+ SE_LOG_DEBUG(source->getDisplayName(), "ContextSupport %s", aContextRules);
return 0;
}
@@ -427,7 +427,7 @@ uInt32 SyncEvolution_FilterSupport( CContext aContext, cAppCharP aFilterRules )
if (!source) {
return LOCERR_WRONGUSAGE;
}
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "FilterSupport %s", aFilterRules);
+ SE_LOG_DEBUG(source->getDisplayName(), "FilterSupport %s", aFilterRules);
return 0;
} /* FilterSupport */
@@ -443,7 +443,7 @@ TSyError SyncEvolution_LoadAdminData( CContext aContext, cAppCharP aLocDB,
return LOCERR_WRONGUSAGE;
}
TSyError res = source->getOperations().m_loadAdminData(*source, aLocDB, aRemDB, adminData);
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "LoadAdminData '%s' '%s', '%s' res=%d",
+ SE_LOG_DEBUG(source->getDisplayName(), "LoadAdminData '%s' '%s', '%s' res=%d",
aLocDB, aRemDB, *adminData ? *adminData : "", res);
return res;
} /* LoadAdminData */
@@ -458,7 +458,7 @@ TSyError SyncEvolution_SaveAdminData( CContext aContext, cAppCharP adminData )
return LOCERR_WRONGUSAGE;
}
TSyError res = source->getOperations().m_saveAdminData(*source, adminData);
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "SaveAdminData '%s' res=%d", adminData, res);
+ SE_LOG_DEBUG(source->getDisplayName(), "SaveAdminData '%s' res=%d", adminData, res);
return res;
} /* SaveAdminData */
@@ -486,7 +486,7 @@ bool SyncEvolution_ReadNextMapItem( CContext aContext, MapID mID, bool aFirst )
res = source->handleException();
}
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "ReadNextMapItem '%s' + %x = '%s' + %d first=%s res=%d",
+ SE_LOG_DEBUG(source->getDisplayName(), "ReadNextMapItem '%s' + %x = '%s' + %d first=%s res=%d",
res ? NullPtrCheck(mID->localID) : "(none)",
res ? mID->ident : 0,
res ? NullPtrCheck(mID->remoteID) : "(none)",
@@ -506,7 +506,7 @@ TSyError SyncEvolution_InsertMapItem( CContext aContext, cMapID mID )
return LOCERR_WRONGUSAGE;
}
TSyError res = source->getOperations().m_insertMapItem(*source, mID);
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "InsertMapItem '%s' + %x = '%s' + %x res=%d",
+ SE_LOG_DEBUG(source->getDisplayName(), "InsertMapItem '%s' + %x = '%s' + %x res=%d",
NullPtrCheck(mID->localID), mID->ident,
NullPtrCheck(mID->remoteID), mID->flags,
res);
@@ -523,7 +523,7 @@ TSyError SyncEvolution_UpdateMapItem( CContext aContext, cMapID mID )
return LOCERR_WRONGUSAGE;
}
TSyError res = source->getOperations().m_updateMapItem(*source, mID);
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "UpdateMapItem '%s' + %x = '%s' + %x, res=%d",
+ SE_LOG_DEBUG(source->getDisplayName(), "UpdateMapItem '%s' + %x = '%s' + %x, res=%d",
mID->localID, mID->ident,
mID->remoteID, mID->flags,
res);
@@ -541,7 +541,7 @@ TSyError SyncEvolution_DeleteMapItem( CContext aContext, cMapID mID )
return LOCERR_WRONGUSAGE;
}
TSyError res = source->getOperations().m_deleteMapItem(*source, mID);
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "DeleteMapItem '%s' + %x = '%s' + %x res=%d",
+ SE_LOG_DEBUG(source->getDisplayName(), "DeleteMapItem '%s' + %x = '%s' + %x res=%d",
mID->localID, mID->ident,
mID->remoteID, mID->flags,
res);
@@ -596,7 +596,7 @@ TSyError SyncEvolution_AdaptItem( CContext aContext, appCharP *aItemData1,
if (!source) {
return LOCERR_WRONGUSAGE;
}
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "AdaptItem '%s' '%s' '%s' id=%d",
+ SE_LOG_DEBUG(source->getDisplayName(), "AdaptItem '%s' '%s' '%s' id=%d",
*aItemData1, *aItemData2, *aLocalVars, aIdentifier);
return LOCERR_OK;
} /* AdaptItem */
@@ -616,7 +616,7 @@ TSyError SyncEvolution_StartDataRead( CContext aContext, cAppCharP lastToken,
return LOCERR_WRONGUSAGE;
}
TSyError res = source->getOperations().m_startDataRead(*source, lastToken, resumeToken);
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "StartDataRead last='%s' resume='%s' res=%d",
+ SE_LOG_DEBUG(source->getDisplayName(), "StartDataRead last='%s' resume='%s' res=%d",
lastToken, resumeToken, res);
return res;
}
@@ -634,7 +634,7 @@ TSyError SyncEvolution_ReadNextItemAsKey( CContext aContext, ItemID aID, KeyH aI
*aStatus = 0;
memset(aID, 0, sizeof(*aID));
TSyError res = source->getOperations().m_readNextItem(*source, aID, aStatus, aFirst);
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "ReadNextItemAsKey aStatus=%d aID=(%s,%s) res=%d",
+ SE_LOG_DEBUG(source->getDisplayName(), "ReadNextItemAsKey aStatus=%d aID=(%s,%s) res=%d",
*aStatus, aID->item, aID->parent, res);
return res;
}
@@ -647,7 +647,7 @@ TSyError SyncEvolution_ReadItemAsKey( CContext aContext, cItemID aID, KeyH aItem
return LOCERR_WRONGUSAGE;
}
TSyError res = source->getOperations().m_readItemAsKey(*source, aID, aItemKey);
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "ReadItemAsKey aID=(%s,%s) res=%d",
+ SE_LOG_DEBUG(source->getDisplayName(), "ReadItemAsKey aID=(%s,%s) res=%d",
aID->item, aID->parent, res);
return res;
}
@@ -687,7 +687,7 @@ sysync::TSyError SyncEvolution_ReadBlob(CContext aContext, cItemID aID, cAppCh
res = LOCERR_NOTIMP;
}
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "ReadBlob aID=(%s,%s) aBlobID=(%s) aBlkPtr=%p aBlkSize=%lu aTotSize=%lu aFirst=%s aLast=%s res=%d",
+ SE_LOG_DEBUG(source->getDisplayName(), "ReadBlob aID=(%s,%s) aBlobID=(%s) aBlkPtr=%p aBlkSize=%lu aTotSize=%lu aFirst=%s aLast=%s res=%d",
aID->item,aID->parent, aBlobID, aBlkPtr,
aBlkSize ? (unsigned long)*aBlkSize : 0,
aTotSize ? (unsigned long)*aTotSize : 0,
@@ -704,7 +704,7 @@ TSyError SyncEvolution_EndDataRead( CContext aContext )
return LOCERR_WRONGUSAGE;
}
TSyError res = source->getOperations().m_endDataRead(*source);
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "EndDataRead res=%d", res);
+ SE_LOG_DEBUG(source->getDisplayName(), "EndDataRead res=%d", res);
return res;
}
@@ -719,7 +719,7 @@ TSyError SyncEvolution_StartDataWrite( CContext aContext )
if (!source) {
return LOCERR_WRONGUSAGE;
}
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "StartDataWrite");
+ SE_LOG_DEBUG(source->getDisplayName(), "StartDataWrite");
return LOCERR_OK;
}
@@ -732,7 +732,7 @@ TSyError SyncEvolution_InsertItemAsKey( CContext aContext, KeyH aItemKey, ItemID
return LOCERR_WRONGUSAGE;
}
TSyError res = source->getOperations().m_insertItemAsKey(*source, aItemKey, newID);
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "InsertItemAsKey res=%d\n", res);
+ SE_LOG_DEBUG(source->getDisplayName(), "InsertItemAsKey res=%d\n", res);
return res;
}
@@ -746,7 +746,7 @@ TSyError SyncEvolution_UpdateItemAsKey( CContext aContext, KeyH aItemKey, cItemI
return LOCERR_WRONGUSAGE;
}
TSyError res = source->getOperations().m_updateItemAsKey(*source, aItemKey, aID, updID);
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "aID=(%s,%s) res=%d",
+ SE_LOG_DEBUG(source->getDisplayName(), "aID=(%s,%s) res=%d",
aID->item,aID->parent, res);
return res;
}
@@ -760,7 +760,7 @@ TSyError SyncEvolution_MoveItem( CContext aContext, cItemID aID, cAppCharP newPa
if (!source) {
return LOCERR_WRONGUSAGE;
}
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "MoveItem aID=(%s,%s) => (%s,%s)",
+ SE_LOG_DEBUG(source->getDisplayName(), "MoveItem aID=(%s,%s) => (%s,%s)",
aID->item,aID->parent, aID->item,newParID);
return LOCERR_NOTIMP;
}
@@ -775,7 +775,7 @@ TSyError SyncEvolution_DeleteItem( CContext aContext, cItemID aID )
return LOCERR_WRONGUSAGE;
}
TSyError res = source->getOperations().m_deleteItem(*source, aID);
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "DeleteItem aID=(%s,%s) res=%d",
+ SE_LOG_DEBUG(source->getDisplayName(), "DeleteItem aID=(%s,%s) res=%d",
aID->item, aID->parent, res);
return res;
}
@@ -789,7 +789,7 @@ TSyError SyncEvolution_FinalizeLocalID( CContext aContext, cItemID aID, ItemID u
if (!source) {
return LOCERR_WRONGUSAGE;
}
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "FinalizeLocalID not implemented");
+ SE_LOG_DEBUG(source->getDisplayName(), "FinalizeLocalID not implemented");
return LOCERR_NOTIMP;
}
@@ -802,7 +802,7 @@ TSyError SyncEvolution_DeleteSyncSet( CContext aContext )
if (!source) {
return LOCERR_WRONGUSAGE;
}
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "DeleteSyncSet not implemented");
+ SE_LOG_DEBUG(source->getDisplayName(), "DeleteSyncSet not implemented");
return LOCERR_NOTIMP;
}
@@ -830,7 +830,7 @@ TSyError SyncEvolution_WriteBlob(CContext aContext, cItemID aID, cAppCharP aBlo
res = LOCERR_NOTIMP;
}
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "WriteBlob aID=(%s,%s) aBlobID=(%s) aBlkPtr=%p aBlkSize=%lu aTotSize=%lu aFirst=%s aLast=%s res=%d",
+ SE_LOG_DEBUG(source->getDisplayName(), "WriteBlob aID=(%s,%s) aBlobID=(%s) aBlkPtr=%p aBlkSize=%lu aTotSize=%lu aFirst=%s aLast=%s res=%d",
aID->item,aID->parent, aBlobID, aBlkPtr, (unsigned long)aBlkSize, (unsigned long)aTotSize,
aFirst ? "true" : "false", aLast ? "true" : "false", res);
return res;
@@ -846,7 +846,7 @@ TSyError SyncEvolution_DeleteBlob( CContext aContext, cItemID aID, cAppCharP aBl
}
TSyError res = source->getOperations().m_deleteBlob(*source, aID, aBlobID);
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "DeleteBlob aID=(%s,%s) aBlobID=(%s) res=%d",
+ SE_LOG_DEBUG(source->getDisplayName(), "DeleteBlob aID=(%s,%s) aBlobID=(%s) res=%d",
aID->item,aID->parent, aBlobID, res);
return res;
} /* DeleteBlob */
@@ -859,7 +859,7 @@ TSyError SyncEvolution_EndDataWrite( CContext aContext, bool success, appCharP *
return LOCERR_WRONGUSAGE;
}
TSyError res = source->getOperations().m_endDataWrite(*source, success, newToken);
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "EndDataWrite %s '%s' res=%d",
+ SE_LOG_DEBUG(source->getDisplayName(), "EndDataWrite %s '%s' res=%d",
success ? "COMMIT":"ROLLBACK", *newToken, res);
return res;
}
@@ -873,7 +873,7 @@ TSyError SyncEvolution_DeleteContext( CContext aContext )
if (!source) {
return LOCERR_WRONGUSAGE;
}
- SE_LOG_DEBUG(NULL, source->getDisplayName(), "DeleteContext");
+ SE_LOG_DEBUG(source->getDisplayName(), "DeleteContext");
source->popSynthesisAPI();
return LOCERR_OK;
}
diff --git a/src/syncevo/TrackingSyncSource.cpp b/src/syncevo/TrackingSyncSource.cpp
index ca8c2951..153c0077 100644
--- a/src/syncevo/TrackingSyncSource.cpp
+++ b/src/syncevo/TrackingSyncSource.cpp
@@ -49,16 +49,16 @@ void TrackingSyncSource::checkStatus(SyncSourceReport &changes)
string oldRevision = m_metaNode->readProperty("databaseRevision");
if (!oldRevision.empty()) {
string newRevision = databaseRevision();
- SE_LOG_DEBUG(NULL, getDisplayName(), "old database revision '%s', new revision '%s'",
+ SE_LOG_DEBUG(getDisplayName(), "old database revision '%s', new revision '%s'",
oldRevision.c_str(),
newRevision.c_str());
if (newRevision == oldRevision) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "revisions match, no item changes");
+ SE_LOG_DEBUG(getDisplayName(), "revisions match, no item changes");
mode = CHANGES_NONE;
}
}
if (mode == CHANGES_FULL) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "using full item scan to detect changes");
+ SE_LOG_DEBUG(getDisplayName(), "using full item scan to detect changes");
}
detectChanges(*m_trackingNode, mode);
@@ -86,17 +86,17 @@ void TrackingSyncSource::beginSync(const std::string &lastToken, const std::stri
}
// slow sync if token is empty
if (token.empty()) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "slow sync or testing, do full item scan to detect changes");
+ SE_LOG_DEBUG(getDisplayName(), "slow sync or testing, do full item scan to detect changes");
mode = CHANGES_SLOW;
} else {
string oldRevision = m_metaNode->readProperty("databaseRevision");
if (!oldRevision.empty()) {
string newRevision = databaseRevision();
- SE_LOG_DEBUG(NULL, getDisplayName(), "old database revision '%s', new revision '%s'",
+ SE_LOG_DEBUG(getDisplayName(), "old database revision '%s', new revision '%s'",
oldRevision.c_str(),
newRevision.c_str());
if (newRevision == oldRevision) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "revisions match, no item changes");
+ SE_LOG_DEBUG(getDisplayName(), "revisions match, no item changes");
mode = CHANGES_NONE;
}
@@ -107,7 +107,7 @@ void TrackingSyncSource::beginSync(const std::string &lastToken, const std::stri
}
}
if (mode == CHANGES_FULL) {
- SE_LOG_DEBUG(NULL, getDisplayName(), "using full item scan to detect changes");
+ SE_LOG_DEBUG(getDisplayName(), "using full item scan to detect changes");
}
bool forceSlowSync = detectChanges(*m_trackingNode, mode);
diff --git a/src/syncevo/util.cpp b/src/syncevo/util.cpp
index 542d26af..63b12a27 100644
--- a/src/syncevo/util.cpp
+++ b/src/syncevo/util.cpp
@@ -252,7 +252,7 @@ int Execute(const std::string &cmd, ExecuteFlags flags) throw()
if (flags & EXECUTE_NO_STDOUT) {
fullcmd += " >/dev/null";
}
- SE_LOG_DEBUG(NULL, NULL, "running command via system(): %s", cmd.c_str());
+ SE_LOG_DEBUG(NULL, "running command via system(): %s", cmd.c_str());
ret = system(fullcmd.c_str());
} else {
// Need to catch at least one of stdout or stderr. A
@@ -260,7 +260,7 @@ int Execute(const std::string &cmd, ExecuteFlags flags) throw()
// are read after system() returns. But we want true
// streaming of the output, so use fork()/exec() plus
// reliable output redirection.
- SE_LOG_DEBUG(NULL, NULL, "running command via fork/exec with output redirection: %s", cmd.c_str());
+ SE_LOG_DEBUG(NULL, "running command via fork/exec with output redirection: %s", cmd.c_str());
LogRedirect io(flags);
pid_t child = fork();
switch (child) {
@@ -296,7 +296,7 @@ int Execute(const std::string &cmd, ExecuteFlags flags) throw()
}
case -1:
// error handling in parent when fork() fails
- SE_LOG_ERROR(NULL, NULL, "%s: fork() failed: %s",
+ SE_LOG_ERROR(NULL, "%s: fork() failed: %s",
cmd.c_str(), strerror(errno));
break;
default:
@@ -831,7 +831,7 @@ SyncMLStatus Exception::handle(SyncMLStatus *status,
try {
throw;
} catch (const TransportException &ex) {
- SE_LOG_DEBUG(NULL, logPrefix, "TransportException thrown at %s:%d",
+ SE_LOG_DEBUG(logPrefix, "TransportException thrown at %s:%d",
ex.m_file.c_str(), ex.m_line);
error = std::string(TRANSPORT_PROBLEM) + ex.what();
new_status = SyncMLStatus(sysync::LOCERR_TRANSPFAIL);
@@ -842,7 +842,7 @@ SyncMLStatus Exception::handle(SyncMLStatus *status,
Status2String(new_status).c_str());
} catch (const StatusException &ex) {
new_status = ex.syncMLStatus();
- SE_LOG_DEBUG(NULL, logPrefix, "exception thrown at %s:%d",
+ SE_LOG_DEBUG(logPrefix, "exception thrown at %s:%d",
ex.m_file.c_str(), ex.m_line);
error = StringPrintf("%s%s: %s",
SYNCEVOLUTION_PROBLEM,
@@ -852,7 +852,7 @@ SyncMLStatus Exception::handle(SyncMLStatus *status,
level = Logger::DEBUG;
}
} catch (const Exception &ex) {
- SE_LOG_DEBUG(NULL, logPrefix, "exception thrown at %s:%d",
+ SE_LOG_DEBUG(logPrefix, "exception thrown at %s:%d",
ex.m_file.c_str(), ex.m_line);
error = ex.what();
} catch (const std::exception &ex) {
@@ -866,7 +866,7 @@ SyncMLStatus Exception::handle(SyncMLStatus *status,
if (flags & HANDLE_EXCEPTION_NO_ERROR) {
level = Logger::DEBUG;
}
- SE_LOG(level, NULL, logPrefix, "%s", error.c_str());
+ SE_LOG(logPrefix, level, "%s", error.c_str());
if (flags & HANDLE_EXCEPTION_FATAL) {
// Something unexpected went wrong, can only shut down.
::abort();
diff --git a/src/syncevolution.cpp b/src/syncevolution.cpp
index f5f227e6..8b23c11d 100644
--- a/src/syncevolution.cpp
+++ b/src/syncevolution.cpp
@@ -196,7 +196,7 @@ private:
const std::string &newOwner)
{
if (name == "org.syncevolution") {
- SE_LOG_ERROR(NULL, NULL, "The SyncEvolution D-Bus service died unexpectedly. A running sync might still be able to complete normally, but the command line cannot report progress anymore and has to quit.");
+ SE_LOG_ERROR(NULL, "The SyncEvolution D-Bus service died unexpectedly. A running sync might still be able to complete normally, but the command line cannot report progress anymore and has to quit.");
m_result = false;
g_main_loop_quit(m_loop);
}
@@ -473,7 +473,7 @@ int main( int argc, char **argv )
}
return 1;
#else
- SE_LOG_ERROR(NULL, NULL, "this syncevolution binary was compiled without support for monitoring a background sync");
+ SE_LOG_ERROR(NULL, "this syncevolution binary was compiled without support for monitoring a background sync");
return 1;
#endif
} else if(cmdline.status() &&
@@ -488,7 +488,7 @@ int main( int argc, char **argv )
}
return 1;
#else
- SE_LOG_SHOW(NULL, NULL, "this syncevolution binary was compiled without support for monitoring a background sync");
+ SE_LOG_SHOW(NULL, "this syncevolution binary was compiled without support for monitoring a background sync");
return 1;
#endif
} else if (useDaemon ||
@@ -504,12 +504,12 @@ int main( int argc, char **argv )
} else {
// User didn't select --use-daemon and thus doesn't need to know about it
// not being available.
- // SE_LOG_SHOW(NULL, NULL, "WARNING: cannot run syncevolution as daemon. "
+ // SE_LOG_SHOW(NULL, "WARNING: cannot run syncevolution as daemon. "
// "Trying to run it without daemon.");
}
#else
if (useDaemon.wasSet()) {
- SE_LOG_SHOW(NULL, NULL, "ERROR: this syncevolution binary was compiled without support of daemon. "
+ SE_LOG_SHOW(NULL, "ERROR: this syncevolution binary was compiled without support of daemon. "
"Either run syncevolution with '--use-daemon=no' or without that option.");
return 1;
}
@@ -535,9 +535,9 @@ int main( int argc, char **argv )
}
}
} catch ( const std::exception &ex ) {
- SE_LOG_ERROR(NULL, NULL, "%s", ex.what());
+ SE_LOG_ERROR(NULL, "%s", ex.what());
} catch (...) {
- SE_LOG_ERROR(NULL, NULL, "unknown error");
+ SE_LOG_ERROR(NULL, "unknown error");
}
return 1;
@@ -575,7 +575,7 @@ bool RemoteDBusServer::checkStarted(bool printError)
{
if(!m_attached) {
if (printError) {
- SE_LOG_ERROR(NULL, NULL, "SyncEvolution D-Bus server not available.");
+ SE_LOG_ERROR(NULL, "SyncEvolution D-Bus server not available.");
}
return false;
}
@@ -616,12 +616,12 @@ void RemoteDBusServer::versionCb(const StringMap &versions,
{
replyInc();
if (!error.empty()) {
- SE_LOG_DEBUG(NULL, NULL, "Server.GetVersions(): %s", error.c_str());
+ SE_LOG_DEBUG(NULL, "Server.GetVersions(): %s", error.c_str());
} else {
StringMap::const_iterator it = versions.find("version");
if (it != versions.end() &&
it->second != VERSION) {
- SE_LOG_INFO(NULL, NULL,
+ SE_LOG_INFO(NULL,
"proceeding despite version mismatch between command line client 'syncevolution' and 'syncevo-dbus-server' (%s != %s)",
it->second.c_str(),
VERSION);
@@ -667,7 +667,7 @@ void RemoteDBusServer::infoResponseCb(const string &error)
{
replyInc();
if(!error.empty()) {
- SE_LOG_ERROR(NULL, NULL, "information response failed.");
+ SE_LOG_ERROR(NULL, "information response failed.");
m_result = false;
}
g_main_loop_quit(m_loop);
@@ -683,7 +683,7 @@ void RemoteDBusServer::sessionChangedCb(const DBusObject_t &object, bool active)
void RemoteDBusServer::daemonGone()
{
//print error info and exit
- SE_LOG_ERROR(NULL, NULL, "Background sync daemon has gone.");
+ SE_LOG_ERROR(NULL, "Background sync daemon has gone.");
exit(1);
}
@@ -782,9 +782,9 @@ void RemoteDBusServer::startSessionCb(const DBusObject_t &sessionPath, const str
{
replyInc();
if(!error.empty()) {
- SE_LOG_ERROR(NULL, NULL, "starting D-Bus session failed: %s", error.c_str());
+ SE_LOG_ERROR(NULL, "starting D-Bus session failed: %s", error.c_str());
if (error.find("org.freedesktop.DBus.Error.UnknownMethod") != error.npos) {
- SE_LOG_INFO(NULL, NULL, "syncevo-dbus-server is most likely too old");
+ SE_LOG_INFO(NULL, "syncevo-dbus-server is most likely too old");
}
m_result = false;
g_main_loop_quit(m_loop);
@@ -816,9 +816,9 @@ void RemoteDBusServer::runningSessions()
vector<DBusObject_t> sessions = DBusClientCall1< vector<DBusObject_t> >(*this, "GetSessions")();
if (sessions.empty()) {
- SE_LOG_SHOW(NULL, NULL, "Background sync daemon is idle.");
+ SE_LOG_SHOW(NULL, "Background sync daemon is idle.");
} else {
- SE_LOG_SHOW(NULL, NULL, "Running session(s): ");
+ SE_LOG_SHOW(NULL, "Running session(s): ");
// create local objects for sessions
BOOST_FOREACH(const DBusObject_t &path, sessions) {
@@ -837,7 +837,7 @@ void RemoteDBusServer::runningSessions()
session.setConfigName(config);
if (!session.configName().empty()) {
- SE_LOG_SHOW(NULL, NULL, " %s (%s)", session.configName().c_str(), session.getPath());
+ SE_LOG_SHOW(NULL, " %s (%s)", session.configName().c_str(), session.getPath());
}
}
}
@@ -879,7 +879,7 @@ bool RemoteDBusServer::monitor(const string &peer)
vector<DBusObject_t> sessions = DBusClientCall1< vector<DBusObject_t> >(*this, "GetSessions")();
if (sessions.empty()) {
- SE_LOG_SHOW(NULL, NULL, "Background sync daemon is idle, no session available to be be monitored.");
+ SE_LOG_SHOW(NULL, "Background sync daemon is idle, no session available to be be monitored.");
} else {
// cheating: client and server might normalize the peer name differently...
string peerNorm = SyncConfig::normalizeConfigString(peer);
@@ -897,9 +897,9 @@ bool RemoteDBusServer::monitor(const string &peer)
if (peer.empty() ||
peerNorm == session->configName()) {
- SE_LOG(Logger::SHOW, NULL, NULL, "Monitoring '%s' (%s)\n",
- session->configName().c_str(),
- session->getPath());
+ SE_LOG_SHOW(NULL, "Monitoring '%s' (%s)\n",
+ session->configName().c_str(),
+ session->getPath());
// set DBusServer::m_session so that RemoteSession::logOutput gets called
// and enable printing that output
m_session = session;
@@ -910,12 +910,12 @@ bool RemoteDBusServer::monitor(const string &peer)
g_main_loop_run(getLoop());
}
- SE_LOG(Logger::SHOW, NULL, NULL, "Monitoring done");
+ SE_LOG_SHOW(NULL, "Monitoring done");
return true;
}
}
}
- SE_LOG_SHOW(NULL, NULL, "'%s' is not running.", peer.c_str());
+ SE_LOG_SHOW(NULL, "'%s' is not running.", peer.c_str());
}
return false;
}
@@ -948,7 +948,7 @@ void RemoteSession::executeCb(const string &error)
{
m_server.replyInc();
if(!error.empty()) {
- SE_LOG_ERROR(NULL, NULL, "running the command line inside the D-Bus server failed");
+ SE_LOG_ERROR(NULL, "running the command line inside the D-Bus server failed");
m_server.setResult(false);
//end to print outputs
m_output = false;
@@ -989,7 +989,7 @@ void RemoteSession::setConfigName(const Config_t &config)
static void interruptCb(const std::string &error)
{
if (!error.empty()) {
- SE_LOG_DEBUG(NULL, NULL, "interruptAsync() error from remote: %s", error.c_str());
+ SE_LOG_DEBUG(NULL, "interruptAsync() error from remote: %s", error.c_str());
}
}
@@ -1004,7 +1004,7 @@ void RemoteSession::logOutput(Logger::Level level, const string &log, const stri
{
if(m_output) {
ProcNameGuard guard(procname);
- SE_LOG(level, NULL, NULL, "%s", log.c_str());
+ SE_LOG(NULL, level, "%s", log.c_str());
}
}
@@ -1051,7 +1051,7 @@ void RemoteSession::handleInfoReq(const string &type, const StringMap &params, S
}
resp["password"] = string(buffer);
} else {
- SE_LOG_ERROR(NULL, NULL, "could not read password for %s", descr.c_str());
+ SE_LOG_ERROR(NULL, "could not read password for %s", descr.c_str());
}
}
}
diff --git a/test/ClientTest.cpp b/test/ClientTest.cpp
index 6bbc3223..305ea27d 100644
--- a/test/ClientTest.cpp
+++ b/test/ClientTest.cpp
@@ -4219,7 +4219,7 @@ bool SyncTests::doConversionCallback(bool *success,
type.c_str(),
type.c_str(),
convertedItem)) {
- SE_LOG_ERROR(NULL, NULL, "failed parsing as %s:\n%s",
+ SE_LOG_ERROR(NULL, "failed parsing as %s:\n%s",
type.c_str(),
item.c_str());
} else {
@@ -5198,7 +5198,7 @@ public:
virtual void send(const char *data, size_t len)
{
if (m_interruptAtMessage == m_messageCount) {
- SE_LOG_DEBUG(NULL, NULL, "TransportFaultInjector: interrupt before sending message #%d", m_messageCount);
+ SE_LOG_DEBUG(NULL, "TransportFaultInjector: interrupt before sending message #%d", m_messageCount);
}
m_messageCount++;
if (m_interruptAtMessage >= 0 &&
@@ -5211,7 +5211,7 @@ public:
m_status = m_wrappedAgent->wait();
if (m_interruptAtMessage == m_messageCount) {
- SE_LOG_DEBUG(NULL, NULL, "TransportFaultInjector: interrupt after receiving reply #%d", m_messageCount);
+ SE_LOG_DEBUG(NULL, "TransportFaultInjector: interrupt after receiving reply #%d", m_messageCount);
}
m_messageCount++;
if (m_interruptAtMessage >= 0 &&
@@ -5275,7 +5275,7 @@ public:
m_interruptAtMessage < m_messageCount &&
m_interruptAtMessage >= m_messageCount - 3) {
int offset = m_interruptAtMessage - m_messageCount + 4;
- SE_LOG_DEBUG(NULL, NULL, "TransportResendProxy: interrupt %s",
+ SE_LOG_DEBUG(NULL, "TransportResendProxy: interrupt %s",
offset == 1 ? "before sending message" :
offset == 2 ? "directly after sending message" :
"after receiving reply");
@@ -5324,7 +5324,7 @@ public:
len = 0;
} else {
if (m_interruptAtMessage == m_messageCount) {
- SE_LOG_DEBUG(NULL, NULL, "UserSuspendInjector: user suspend after getting reply #%d", m_messageCount);
+ SE_LOG_DEBUG(NULL, "UserSuspendInjector: user suspend after getting reply #%d", m_messageCount);
}
m_messageCount++;
if (m_interruptAtMessage >= 0 &&
@@ -5911,7 +5911,7 @@ void SyncTests::doSync(const SyncOptions &options)
simplifyFilename(logname);
syncCounter++;
- SE_LOG_DEBUG(NULL, NULL, "%d. starting %s with sync mode %s",
+ SE_LOG_DEBUG(NULL, "%d. starting %s with sync mode %s",
syncCounter, logname.c_str(), PrettyPrintSyncMode(options.m_syncMode).c_str());
try {
@@ -6212,7 +6212,7 @@ std::string ClientTest::import(ClientTest &client, TestingSyncSource &source, co
{
list<string> items;
getItems(file, items, realfile);
- SE_LOG_DEBUG(NULL, NULL, "importing %d test cases from file %s", (int)items.size(), realfile.c_str());
+ SE_LOG_DEBUG(NULL, "importing %d test cases from file %s", (int)items.size(), realfile.c_str());
std::string failures;
bool doImport = !luids || luids->empty();
std::list<std::string>::const_iterator it;
@@ -6498,7 +6498,7 @@ static std::string additionalYearly(const std::string &single,
}
- SE_LOG_DEBUG(NULL, NULL, "additional yearly: start %d, skip %d, index %d/%d:\n%s",
+ SE_LOG_DEBUG(NULL, "additional yearly: start %d, skip %d, index %d/%d:\n%s",
start, skip, index, total,
event.c_str());
return event;
@@ -6540,7 +6540,7 @@ static std::string additionalMonthly(const std::string &single,
}
}
- SE_LOG_DEBUG(NULL, NULL, "additional monthly: start %d, skip %d, index %d/%d:\n%s",
+ SE_LOG_DEBUG(NULL, "additional monthly: start %d, skip %d, index %d/%d:\n%s",
start, skip, index, total,
event.c_str());
return event;
@@ -6662,7 +6662,7 @@ static std::string additionalWeekly(const std::string &single,
}
}
- SE_LOG_DEBUG(NULL, NULL, "additional weekly: start %d, skip %d, index %d/%d:\n%s",
+ SE_LOG_DEBUG(NULL, "additional weekly: start %d, skip %d, index %d/%d:\n%s",
start, skip, index, total,
event.c_str());
return event;
@@ -7711,7 +7711,7 @@ void CheckSyncReport::check(SyncMLStatus status, SyncReport &report) const
serverAdded, serverUpdated, serverDeleted);
str << "Expected sync mode: " << PrettyPrintSyncMode(syncMode) << "\n";
str << "Expected cycles: " << restarts + 1 << "\n";
- SE_LOG_INFO(NULL, NULL, "sync report:\n%s\n", str.str().c_str());
+ SE_LOG_INFO(NULL, "sync report:\n%s\n", str.str().c_str());
if (mustSucceed) {
// both STATUS_OK and STATUS_HTTP_OK map to the same
@@ -7725,13 +7725,13 @@ void CheckSyncReport::check(SyncMLStatus status, SyncReport &report) const
const std::string &name = entry.first;
const SyncSourceReport &source = entry.second;
- SE_LOG_DEBUG(NULL, NULL, "Checking sync source %s...", name.c_str());
+ SE_LOG_DEBUG(NULL, "Checking sync source %s...", name.c_str());
if (mustSucceed) {
CLIENT_TEST_EQUAL(name, STATUS_OK, source.getStatus());
}
check(name, source);
}
- SE_LOG_DEBUG(NULL, NULL, "Done with checking sync report.");
+ SE_LOG_DEBUG(NULL, "Done with checking sync report.");
}
void CheckSyncReport::check(const std::string &name, const SyncSourceReport &source) const
diff --git a/test/ClientTest.h b/test/ClientTest.h
index d3665b37..7fa37a22 100644
--- a/test/ClientTest.h
+++ b/test/ClientTest.h
@@ -974,7 +974,7 @@ public:
/** write log message into *.log file of a test */
#define CLIENT_TEST_LOG(_format, _args...) \
- SE_LOG_DEBUG(NULL, NULL, "\n%s:%d *** " _format, \
+ SE_LOG_DEBUG(NULL, "\n%s:%d *** " _format, \
getBasename(__FILE__).c_str(), __LINE__, \
##_args)
diff --git a/test/ClientTestAssert.h b/test/ClientTestAssert.h
index 35e81e43..defdb0ac 100644
--- a/test/ClientTestAssert.h
+++ b/test/ClientTestAssert.h
@@ -99,9 +99,9 @@ static void inline ClientTestExceptionHandle(const char *file, int line, const s
#define CT_WRAP_ASSERT(_file, _line, _assert) \
do { \
try { \
- SE_LOG_DEBUG(NULL, NULL, "%s:%d: starting %s", getBasename(_file).c_str(), _line, #_assert); \
+ SE_LOG_DEBUG(NULL, "%s:%d: starting %s", getBasename(_file).c_str(), _line, #_assert); \
_assert; \
- SE_LOG_DEBUG(NULL, NULL, "%s:%d: ending %s", getBasename(_file).c_str(), _line, #_assert); \
+ SE_LOG_DEBUG(NULL, "%s:%d: ending %s", getBasename(_file).c_str(), _line, #_assert); \
} catch (...) { \
ClientTestExceptionHandle(_file, _line); \
} \
@@ -110,12 +110,12 @@ static void inline ClientTestExceptionHandle(const char *file, int line, const s
#define CT_WRAP_ASSERT_MESSAGE(_file, _line, _message, _assert) \
do { \
try { \
- SE_LOG_DEBUG(NULL, NULL, "%s:%d: starting %s %s", \
+ SE_LOG_DEBUG(NULL, "%s:%d: starting %s %s", \
getBasename(_file).c_str(), _line, \
std::string(_message).c_str(), \
#_assert); \
_assert; \
- SE_LOG_DEBUG(NULL, NULL, "%s:%d: ending %s", getBasename(_file).c_str(), _line, #_assert); \
+ SE_LOG_DEBUG(NULL, "%s:%d: ending %s", getBasename(_file).c_str(), _line, #_assert); \
} catch (...) { \
ClientTestExceptionHandle(_file, _line, _message); \
} \
diff --git a/test/client-test-main.cpp b/test/client-test-main.cpp
index cc078aa7..b5f9ed5f 100644
--- a/test/client-test-main.cpp
+++ b/test/client-test-main.cpp
@@ -142,7 +142,7 @@ public:
m_logger->setLevel(Logger::DEBUG);
LoggerBase::pushLogger(m_logger.get());
}
- SE_LOG_DEBUG(NULL, NULL, "*** starting %s ***", m_currentTest.c_str());
+ SE_LOG_DEBUG(NULL, "*** starting %s ***", m_currentTest.c_str());
m_failures.reset();
m_testFailed = false;
@@ -188,9 +188,9 @@ public:
result = "okay";
}
- SE_LOG_DEBUG(NULL, NULL, "*** ending %s: %s ***", m_currentTest.c_str(), result.c_str());
+ SE_LOG_DEBUG(NULL, "*** ending %s: %s ***", m_currentTest.c_str(), result.c_str());
if (!failure.empty()) {
- SE_LOG_ERROR(NULL, NULL, "%s", failure.c_str());
+ SE_LOG_ERROR(NULL, "%s", failure.c_str());
}
if (&LoggerBase::instance() == m_logger.get()) {
LoggerBase::popLogger();