add tests to log
This commit is contained in:
parent
ec58e90437
commit
43bd277959
4 changed files with 51 additions and 6 deletions
|
|
@ -110,7 +110,7 @@ PublicKeyRing.fromObj = function(opts) {
|
|||
}
|
||||
|
||||
if (opts.cache && opts.cache.addressToPath) {
|
||||
log.info('PublicKeyRing: Using address cache');
|
||||
log.debug('PublicKeyRing: Using address cache');
|
||||
pkr.cache.addressToPath = opts.cache.addressToPath;
|
||||
pkr.rebuildCache();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
'use strict';
|
||||
var _ = require('lodash');
|
||||
var preconditions = require('preconditions').singleton();
|
||||
|
||||
function LocalStorage() {
|
||||
this.type = 'DB';
|
||||
|
||||
preconditions.checkState(typeof localStorage !== 'undefined',
|
||||
'localstorage not available, cannot run plugin');
|
||||
};
|
||||
|
||||
LocalStorage.prototype.init = function() {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
var config = config || require('../../config');
|
||||
var _ = require('lodash');
|
||||
var ls;
|
||||
|
||||
var LS = require('../plugins/LocalStorage');
|
||||
var ls = new LS();
|
||||
|
||||
try {
|
||||
var LS = require('../plugins/LocalStorage');
|
||||
ls = new LS();
|
||||
} catch(e) {};
|
||||
|
||||
/**
|
||||
* @desc
|
||||
|
|
@ -122,9 +124,9 @@ Logger.prototype.setLevel = function(level) {
|
|||
var logger = new Logger('copay');
|
||||
var error = new Error();
|
||||
|
||||
var logLevel = config.logLevel;
|
||||
var logLevel = config.logLevel || 'info';
|
||||
|
||||
if (ls.getItem) {
|
||||
if (ls && ls.getItem) {
|
||||
ls.getItem("config", function(err, value) {
|
||||
if (err) return;
|
||||
var localConfig = JSON.parse(value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue