зеркало из 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) {
|
_isEqual: function SyncEngine__isEqual(item) {
|
||||||
let local = this._createRecord(item.id);
|
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 &&
|
if (item.parentid == local.parentid &&
|
||||||
item.sortindex == local.sortindex &&
|
item.sortindex == local.sortindex &&
|
||||||
item.deleted == local.deleted &&
|
item.deleted == local.deleted &&
|
||||||
|
@ -434,7 +435,8 @@ SyncEngine.prototype = {
|
||||||
|
|
||||||
// Apply incoming records
|
// Apply incoming records
|
||||||
_applyIncoming: function SyncEngine__applyIncoming(item) {
|
_applyIncoming: function SyncEngine__applyIncoming(item) {
|
||||||
this._log.trace("Incoming:\n" + item);
|
if (this._log.level <= Log4Moz.Level.Trace)
|
||||||
|
this._log.trace("Incoming: " + item);
|
||||||
try {
|
try {
|
||||||
this._tracker.ignoreAll = true;
|
this._tracker.ignoreAll = true;
|
||||||
this._store.applyIncoming(item);
|
this._store.applyIncoming(item);
|
||||||
|
@ -470,7 +472,8 @@ SyncEngine.prototype = {
|
||||||
|
|
||||||
for (let id in this._tracker.changedIDs) {
|
for (let id in this._tracker.changedIDs) {
|
||||||
let out = this._createRecord(id);
|
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"));
|
out.encrypt(ID.get("WeaveCryptoID"));
|
||||||
up.pushData(JSON.parse(out.serialize())); // FIXME: inefficient
|
up.pushData(JSON.parse(out.serialize())); // FIXME: inefficient
|
||||||
|
|
Загрузка…
Ссылка в новой задаче