Skip to content

Commit

Permalink
Tweak log entries to be more search friendly.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Jun 16, 2015
1 parent d19798e commit 3051b32
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Expand Up @@ -118,7 +118,7 @@ public function synchronize($params = array())
return;
}
$this->_logger->debug(sprintf(
'History: Incremental update for user: %s, folder: %s, prefix: %s',
'[KOLAB_STORAGE] Incremental Horde_History update for user: %s, folder: %s, prefix: %s',
$user, $folder, $prefix)
);
}
Expand All @@ -133,13 +133,13 @@ public function synchronize($params = array())
// (An update results in an ADDED + DELETED folder action)
if ($this->_data->objectIdExists($object_uid) == true) {
$this->_logger->debug(sprintf(
'History: Object still existing: object: %s, vanished IMAP uid: %d. Skipping delete.',
'[KOLAB_STORAGE] Object still existing: object: %s, vanished IMAP uid: %d. Skipping delete from Horde_History.',
$object_uid, $bid)
);
continue;
}
$this->_logger->debug(
sprintf('History: Object deleted: uid: %d -> %s',
sprintf('[KOLAB_STORAGE] Object deleted: uid: %d -> %s, logging in Horde_History.',
$bid, $object_uid)
);
$this->_history->log(
Expand All @@ -153,7 +153,7 @@ public function synchronize($params = array())
return;
}
$this->_logger->debug(sprintf(
'History: Full history sync for user: %s, folder: %s, is_reset: %d, prefix: %s',
'[KOLAB_STORAGE] Full Horde_History sync for user: %s, folder: %s, is_reset: %d, prefix: %s',
$user, $folder, $is_reset, $prefix)
);
$this->_completeSynchronization($prefix, $is_reset);
Expand Down Expand Up @@ -190,7 +190,7 @@ protected function _completeSynchronization($prefix, $is_reset)
$last = $this->_history->getLatestEntry($full_id);
if ($last === false || $last['action'] != 'delete') {
$this->_logger->debug(sprintf(
'History: Cleaning up already removed object: %s', $full_id)
'[KOLAB_STORAGE] Cleaning up already removed object from Horde_History: %s', $full_id)
);
$this->_history->log(
$full_id, array('action' => 'delete'), true
Expand All @@ -212,7 +212,7 @@ protected function _updateLog($object, $bid, $force = false)
if ($last === false) {
// New, unknown object
$this->_logger->debug(sprintf(
'History: New object: %s, uid: %d',
'[KOLAB_STORAGE] New object to log in Horde_History: %s, uid: %d',
$object, $bid)
);
$this->_history->log(
Expand All @@ -224,7 +224,7 @@ protected function _updateLog($object, $bid, $force = false)
// (a foreign client is sending an update over a slow link)
if ($last['action'] == 'delete') {
$this->_logger->debug(sprintf(
'History: Re-adding previously deleted object: %s, uid: %d',
'[KOLAB_STORAGE] Re-adding previously deleted object in Horde_History: %s, uid: %d',
$object, $bid)
);
$this->_history->log(
Expand All @@ -234,7 +234,7 @@ protected function _updateLog($object, $bid, $force = false)

if (!isset($last['bid']) || $last['bid'] != $bid || $force) {
$this->_logger->debug(sprintf(
'History: Modifying object: %s, uid: %d, force: %d',
'[KOLAB_STORAGE] Modifying object in Horde_History: %s, uid: %d, force: %d',
$object, $bid, $force)
);
$this->_history->log(
Expand Down
Expand Up @@ -61,7 +61,7 @@ public function synchronize($params = array())
unset($folder_id['type']);

$this->_logger->debug(sprintf(
'Resyncing Horde_History for Kolab: last_sync: %d, logged sync: %d, folder. %s',
'[KOLAB_STORAGE] Resyncing Horde_History for Kolab: last_sync: %d, logged sync: %d, folder. %s',
$params['last_sync'],
$this->_history->getActionTimestamp($timestamp_key, 'sync'),
print_r($folder_id, true))
Expand Down

0 comments on commit 3051b32

Please sign in to comment.