mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 15:17:29 +09:00
Issue #991 Part 6: Services
This commit is contained in:
parent
f1d39b624e
commit
c54c6d3bd2
3 changed files with 3 additions and 15 deletions
|
|
@ -149,10 +149,7 @@ TokenServerClientServerError.prototype._toStringFields = function() {
|
||||||
*/
|
*/
|
||||||
this.TokenServerClient = function TokenServerClient() {
|
this.TokenServerClient = function TokenServerClient() {
|
||||||
this._log = Log.repository.getLogger("Common.TokenServerClient");
|
this._log = Log.repository.getLogger("Common.TokenServerClient");
|
||||||
let level = "Debug";
|
let level = Services.prefs.getCharPref(PREF_LOG_LEVEL, "Debug");
|
||||||
try {
|
|
||||||
level = Services.prefs.getCharPref(PREF_LOG_LEVEL);
|
|
||||||
} catch (ex) {}
|
|
||||||
this._log.level = Log.Level[level];
|
this._log.level = Log.Level[level];
|
||||||
}
|
}
|
||||||
TokenServerClient.prototype = {
|
TokenServerClient.prototype = {
|
||||||
|
|
|
||||||
|
|
@ -51,11 +51,7 @@ WeaveCrypto.prototype = {
|
||||||
this.prefBranch = Services.prefs.getBranch("services.sync.log.");
|
this.prefBranch = Services.prefs.getBranch("services.sync.log.");
|
||||||
this.prefBranch.addObserver("cryptoDebug", this.observer, false);
|
this.prefBranch.addObserver("cryptoDebug", this.observer, false);
|
||||||
this.observer._self = this;
|
this.observer._self = this;
|
||||||
try {
|
this.debug = this.prefBranch.getBoolPref("cryptoDebug", false);
|
||||||
this.debug = this.prefBranch.getBoolPref("cryptoDebug");
|
|
||||||
} catch (x) {
|
|
||||||
this.debug = false;
|
|
||||||
}
|
|
||||||
XPCOMUtils.defineLazyGetter(this, 'encoder', () => new TextEncoder(UTF_LABEL));
|
XPCOMUtils.defineLazyGetter(this, 'encoder', () => new TextEncoder(UTF_LABEL));
|
||||||
XPCOMUtils.defineLazyGetter(this, 'decoder', () => new TextDecoder(UTF_LABEL, { fatal: true }));
|
XPCOMUtils.defineLazyGetter(this, 'decoder', () => new TextDecoder(UTF_LABEL, { fatal: true }));
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -125,12 +125,7 @@ this.Status = {
|
||||||
resetSync: function resetSync() {
|
resetSync: function resetSync() {
|
||||||
// Logger setup.
|
// Logger setup.
|
||||||
let logPref = PREFS_BRANCH + "log.logger.status";
|
let logPref = PREFS_BRANCH + "log.logger.status";
|
||||||
let logLevel = "Trace";
|
let logLevel = Services.prefs.getCharPref(logPref, "Trace");
|
||||||
try {
|
|
||||||
logLevel = Services.prefs.getCharPref(logPref);
|
|
||||||
} catch (ex) {
|
|
||||||
// Use default.
|
|
||||||
}
|
|
||||||
this._log.level = Log.Level[logLevel];
|
this._log.level = Log.Level[logLevel];
|
||||||
|
|
||||||
this._log.info("Resetting Status.");
|
this._log.info("Resetting Status.");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue