зеркало из https://github.com/mozilla/gecko-dev.git
Conditionally log trace records to avoid always doing record.toString().
--HG-- extra : rebase_source : 65d8025324ed95eac29d530e2699a2f29c8a2cb7
This commit is contained in:
Родитель
0f1121ec90
Коммит
aec89471ca
|
@ -368,7 +368,8 @@ SyncEngine.prototype = {
|
|||
|
||||
_isEqual: function SyncEngine__isEqual(item) {
|
||||
let local = this._createRecord(item.id);
|
||||
this._log.trace("Local record: \n" + local);
|
||||
if (this._log.level <= Log4Moz.Level.Trace)
|
||||
this._log.trace("Local record: " + local);
|
||||
if (item.parentid == local.parentid &&
|
||||
item.sortindex == local.sortindex &&
|
||||
item.deleted == local.deleted &&
|
||||
|
@ -434,7 +435,8 @@ SyncEngine.prototype = {
|
|||
|
||||
// Apply incoming records
|
||||
_applyIncoming: function SyncEngine__applyIncoming(item) {
|
||||
this._log.trace("Incoming:\n" + item);
|
||||
if (this._log.level <= Log4Moz.Level.Trace)
|
||||
this._log.trace("Incoming: " + item);
|
||||
try {
|
||||
this._tracker.ignoreAll = true;
|
||||
this._store.applyIncoming(item);
|
||||
|
@ -470,7 +472,8 @@ SyncEngine.prototype = {
|
|||
|
||||
for (let id in this._tracker.changedIDs) {
|
||||
let out = this._createRecord(id);
|
||||
this._log.trace("Outgoing:\n" + out);
|
||||
if (this._log.level <= Log4Moz.Level.Trace)
|
||||
this._log.trace("Outgoing: " + out);
|
||||
|
||||
out.encrypt(ID.get("WeaveCryptoID"));
|
||||
up.pushData(JSON.parse(out.serialize())); // FIXME: inefficient
|
||||
|
|
Загрузка…
Ссылка в новой задаче