ACP event log

This commit is contained in:
calzoneman 2014-02-07 10:45:28 -06:00
parent afa17165f7
commit 0a480515d7
6 changed files with 101 additions and 2 deletions

View file

@ -370,6 +370,7 @@ function handleDeleteChannel(req, res) {
});
return;
}
db.channels.drop(name, function (err) {
if (!err) {
Logger.eventlog.log("[channel] " + loginName + "@" +
@ -688,6 +689,7 @@ function handlePasswordRecover(req, res) {
}
db.deletePasswordReset(hash);
Logger.eventlog.log("[account] " + ip + " recovered password for " + row.name);
sendJade(res, "account-passwordrecover", {
recovered: true,

View file

@ -100,6 +100,13 @@ function handleReadHttplog(req, res) {
readLog(res, path.join(__dirname, "..", "..", "http.log"), 1048576);
}
/**
* Handles a request to read the event log
*/
function handleReadEventlog(req, res) {
readLog(res, path.join(__dirname, "..", "..", "events.log"), 1048576);
}
/**
* Handles a request to read a channel log
*/
@ -117,6 +124,7 @@ module.exports = {
app.get("/acp/syslog", checkAdmin(handleReadSyslog));
app.get("/acp/errlog", checkAdmin(handleReadErrlog));
app.get("/acp/httplog", checkAdmin(handleReadHttplog));
app.get("/acp/eventlog", checkAdmin(handleReadEventlog));
app.get("/acp/chanlog/:name", checkAdmin(handleReadChanlog));
}
};