From e8eb66590053c2bcd425a635b5c883b18a3444d2 Mon Sep 17 00:00:00 2001 From: Psychedelic Squid Date: Thu, 15 Mar 2012 05:32:45 +0800 Subject: [PATCH] Add routing for web display of logs. --- modules/web.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/web.js b/modules/web.js index e3ac0fa..a6bd581 100644 --- a/modules/web.js +++ b/modules/web.js @@ -16,6 +16,11 @@ var webInterface = function(dbot) { //res.render('index', { }); }); + // Displays any logs collected by the logging module + app.get('/log', function(req, res) { + res.render('log', { 'name': dbot.name, 'log': (dbot.log || []) }); + }); + // Lists the quote categories app.get('/quotes', function(req, res) { res.render('quotelist', { 'name': dbot.name, 'quotelist': Object.keys(dbot.db.quoteArrs) });