aboutsummaryrefslogtreecommitdiffstats
path: root/lib/main.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-09-24 12:28:11 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-09-24 12:28:11 +0200
commit4ffd6b9e6b61c9eaa323e4f4d537db5d1a36872d (patch)
tree542c7162a1924149e70a1e0004f4a221d48d4615 /lib/main.js
parentf31ed4f55d9a33bb39a5e409b36878b5ac4ae470 (diff)
downloadbugzilla-triage-4ffd6b9e6b61c9eaa323e4f4d537db5d1a36872d.tar.gz
Fix Logger object to be self contained and use storage properly
* there is really no other way than using module.storage directly Sucks! * all logger-related logic should go to the module and not be flying around (import TS, clear, isEmpty)
Diffstat (limited to 'lib/main.js')
-rw-r--r--lib/main.js9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/main.js b/lib/main.js
index a5700d6..9eb62f0 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -13,7 +13,6 @@
"use strict";
var prompts = require("prompts");
var logger = require("logger");
-var myStorage = require("simple-storage").storage;
var browser = require("tab-browser");
var selfMod = require("self");
var Request = require("request").Request;
@@ -89,13 +88,7 @@ function initialize(callback) {
}, this);
}
- if (!myStorage.logs) {
- myStorage.logs = {};
- }
-
- var logConstructor = logger.Logger;
- config.logger = new logConstructor(myStorage.logs,
- JSON.parse(selfMod.data.load("bugzillalabelAbbreviations.json")));
+ config.logger = new logger.Logger(JSON.parse(selfMod.data.load("bugzillalabelAbbreviations.json")));
config.matches = config.gJSONData.configData.matches;
config.skipMatches = config.matches.map(function(x) {