beautification and version numbering
This commit is contained in:
@@ -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(".");
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -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);
|
||||||
Reference in New Issue
Block a user