Merge weave to weave-partial-view.

This commit is contained in:
Edward Lee 2009-09-10 23:18:33 -07:00
Родитель 439d963fbf da76f65a99
Коммит 1a4b100a73
4 изменённых файлов: 21 добавлений и 16 удалений

Просмотреть файл

@ -578,8 +578,9 @@ SyncEngine.prototype = {
// Upload outgoing records
_uploadOutgoing: function SyncEngine__uploadOutgoing() {
let outnum = [i for (i in this._tracker.changedIDs)].length;
this._log.debug("Preparing " + outnum + " outgoing records");
if (outnum) {
this._log.debug("Preparing " + outnum + " outgoing records");
// collection we'll upload
let up = new Collection(this.engineURL);
let count = 0;

Просмотреть файл

@ -230,14 +230,11 @@ HistoryStore.prototype = {
if (this.urlExists(uri))
curvisits = this._getVisits(record.histUri);
let visit;
while ((visit = record.visits.pop())) {
if (curvisits.filter(function(i) i.date == visit.date).length)
continue;
this._log.debug(" visit " + visit.date);
this._hsvc.addVisit(uri, visit.date, null, visit.type,
(visit.type == 5 || visit.type == 6), 0);
}
// Add visits if there's no local visit with the same date
for each (let {date, type} in record.visits)
if (curvisits.every(function(cur) cur.date != date))
Svc.History.addVisit(uri, date, null, type, type == 5 || type == 6, 0);
this._hsvc.setPageTitle(uri, record.title);
},

Просмотреть файл

@ -240,8 +240,18 @@ Resource.prototype = {
if (this._log.level <= Log4Moz.Level.Trace)
this._log.trace(action + " Body: " + this._data);
}
else
this._log.debug(action + " fail: " + status + " " + this._data);
else {
let log = "debug";
let mesg = action + " fail: " + status;
// Only log the full response body (may be HTML) when Trace logging
if (this._log.level <= Log4Moz.Level.Trace) {
log = "trace";
mesg += " " + this._data;
}
this._log[log](mesg);
}
}
// Got a response but no header; must be cached (use default values)
catch(ex) {

Просмотреть файл

@ -488,8 +488,6 @@ WeaveSvc.prototype = {
_verifyLogin: function _verifyLogin()
this._catch(this._notify("verify-login", "", function() {
this._log.debug("Verifying login for user " + this.username);
this._setCluster();
let res = new Resource(this.infoURL);
try {
@ -521,7 +519,6 @@ WeaveSvc.prototype = {
_verifyPassphrase: function _verifyPassphrase()
this._catch(this._notify("verify-passphrase", "", function() {
this._log.debug("Verifying passphrase");
try {
let pubkey = PubKeys.getDefaultKey();
let privkey = PrivKeys.get(pubkey.privateKeyUri);
@ -665,7 +662,7 @@ WeaveSvc.prototype = {
this._setSyncFailure(LOGIN_FAILED_NO_PASSWORD);
throw "No password given or found in password manager";
}
this._log.debug("Logging in user " + this.username);
this._log.info("Logging in user " + this.username);
if (!this._verifyLogin()) {
// verifyLogin sets the failure states here
@ -1079,7 +1076,7 @@ WeaveSvc.prototype = {
for each (let engine in [Clients].concat(Engines.getEnabled()))
engine.lastModified = info.obj[engine.name] || 0;
this._log.debug("Refreshing client list");
this._log.trace("Refreshing client list");
Clients.sync();
// Process the incoming commands if we have any