From 4ffd6b9e6b61c9eaa323e4f4d537db5d1a36872d Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Fri, 24 Sep 2010 12:28:11 +0200 Subject: 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) --- lib/main.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'lib/main.js') 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) { -- cgit