beautification and version numbering

This commit is contained in:
Joe
2019-01-07 08:58:16 -06:00
parent 67e2135df9
commit 66eb2edc1a
2 changed files with 4 additions and 9 deletions

View File

@@ -19,7 +19,7 @@ const logger = winston.createLogger({
] ]
}); });
logger.log("info", "Starting casRpsLogExtractor"); logger.log("info", "Starting casRpsLogExtractor v0.1 by j.tretter@gmail.com");
const config = JSON.parse(fs.readFileSync("casRpsLogExtractor.config.json", "utf8")); const config = JSON.parse(fs.readFileSync("casRpsLogExtractor.config.json", "utf8"));
logger.log("debug", "Config" + JSON.stringify(config)) logger.log("debug", "Config" + JSON.stringify(config))
@@ -77,11 +77,6 @@ sql.connect(config.sqlConfig, err => {
allRows=[]; allRows=[];
} }
if (lastOutMaxPKey !== maxPKey) { process.stdout.write(".");
process.stdout.write("[" + maxPKey + "]\n");
lastOutMaxPKey = maxPKey;
} else {
process.stdout.write(".");
}
}); });
}) })

View File

@@ -22,13 +22,12 @@ const logger = winston.createLogger({
const ruleEngine = new RuleEngine("*"); const ruleEngine = new RuleEngine("*");
logger.log("info", "Service Starting."); logger.log("info", "Service Starting logAggregator v0.1 by j.tretter@gmail.com");
const server = micro(async (req, res) => { const server = micro(async (req, res) => {
const js = await json(req); const js = await json(req);
try { try {
allInputLines = JSON.parse(js); allInputLines = JSON.parse(js);
send(res, 200, "OK");
} catch (ex) { } catch (ex) {
logger.log("error", "Input not in JSON format:" + js); logger.log("error", "Input not in JSON format:" + js);
send(res, 401, "Input not in JSON Format"); send(res, 401, "Input not in JSON Format");
@@ -50,6 +49,7 @@ const server = micro(async (req, res) => {
} }
} }
send(res, 200, "OK");
}); });
server.listen(2222); server.listen(2222);